Skip to content

Commit

Permalink
Minor patch for #142
Browse files Browse the repository at this point in the history
- Remove the page tag in README.md
- Detect formula in option description

ref #146
  • Loading branch information
hugary1995 committed Jun 14, 2024
1 parent 1692e8b commit bb510c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Overview {#overview}
# Overview

[![Documentation](https://github.com/reverendbedford/neml2/actions/workflows/build_docs.yml/badge.svg?branch=main)](https://reverendbedford.github.io/neml2/) [![tests](https://github.com/reverendbedford/neml2/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/reverendbedford/neml2/actions/workflows/tests.yml)

Expand Down
12 changes: 9 additions & 3 deletions scripts/syntax_to_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def get_sections(syntax):

with open(logfile, "w") as log:
missing = 0
log.write("## Missing syntax\n")
log.write("## Syntax check\n\n")
sections = get_sections(syntax)
for section in sections:
with open((outdir / section.lower()).with_suffix(".md"), "w") as stream:
Expand Down Expand Up @@ -120,7 +120,7 @@ def get_sections(syntax):
)
missing += 1
log.write(
" * '{}'.'{}' is missing option description\n".format(
" * '{}/{}' is missing option description\n".format(
input_type, param_name
)
)
Expand All @@ -130,6 +130,12 @@ def get_sections(syntax):
param_name, info["doc"]
)
)
if "\\f" in info["doc"]:
log.write(
" * '{}/{}' has formula in its option description\n".format(
input_type, param_name
)
)
stream.write(" - <u>Type</u>: {}\n".format(param_type))
if param_value:
stream.write(" - <u>Default</u>: {}\n".format(param_value))
Expand All @@ -140,4 +146,4 @@ def get_sections(syntax):
)

if missing == 0:
log.write("Nothing, good job! :purple_heart:")
log.write("No syntax error, good job! :purple_heart:")

0 comments on commit bb510c5

Please sign in to comment.