Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why aren't Condition and ConditionSet being generated in our documentation? #292

Open
pgleeson opened this issue Jul 22, 2022 · 5 comments
Assignees
Labels
bug Something isn't working specification

Comments

@pgleeson
Copy link
Member

Both missing from https://mdf.readthedocs.io/en/latest/api/Specification.html.

That page is generated from https://github.com/ModECI/MDF/blob/main/docs/README.md, which is a markdown export of https://github.com/ModECI/MDF/blob/main/src/modeci_mdf/mdf.py, which has classes Condition and ConditionSet...

@Monsurat-Onabajo
Copy link
Contributor

The condition and the conditionset are not being generated in the documentation because it is not documented in the readme file, even though it is addressed in the mdf.py directory, It is the readme.md file that is being fed into the readthedocs documentation so it is only issues that are addressed in the readme.md that will be mirrored in the readthedocs documentation

@Monsurat-Onabajo
Copy link
Contributor

The Specification.html page is generated from https://github.com/ModECI/MDF/blob/main/docs/sphinx/source/api/Specification.rst not the markdown file as i stated earlier

@jdcpni jdcpni added the bug Something isn't working label Apr 19, 2023
@jdcpni
Copy link
Contributor

jdcpni commented Apr 19, 2023

The above is a workaround, but needs cleaner / standard implementation

@Monsurat-Onabajo
Copy link
Contributor

The above is a workaround, but needs cleaner / standard implementation
This has been solved here:
https://github.com/ModECI/MDF/actions/runs/4126125824

@pgleeson
Copy link
Member Author

The remaining issue is that the docs for ConditionSet etc. should be automatically generated from the first line here:

MDF/docs/generate.py

Lines 44 to 56 in c61fc54

doc = mod.generate_documentation(format="markdown")
doc_md_1 = condition.generate_documentation(format="markdown")
doc_md_2 = condition_set.generate_documentation(format="markdown")
comment = "**Note: the ModECI MDF specification is still in development!** See [here](https://github.com/ModECI/MDF/issues) for ongoing discussions."
comment_rst = "**Note: the ModECI MDF specification is still in development!** See `here <https://github.com/ModECI/MDF/issues>`_ for ongoing discussions."
with open("README.md", "w") as d:
d.write("# Specification of ModECI v%s\n" % MODECI_MDF_VERSION)
d.write("%s\n" % comment)
d.write(doc)
d.write(doc_md_1)
d.write(doc_md_2)

so doc_md_1 shouldn't be required. The way the markdown is generated from mod doesn't "connect" all the way down to ConditionSet as it should (and as it does for Node, Edge etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working specification
Projects
None yet
Development

No branches or pull requests

3 participants