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

Documentation generation for function callbacks #482

Merged
merged 32 commits into from
Mar 29, 2021

Conversation

joshessman-llnl
Copy link
Member

Summary

To save space and maintain generality function arguments/return types are stored as integers (corresponding to the FunctionTag enum) in the datastore.

To produce legible documentation for the MFEM coefficient and nested struct examples this PR also modifies the SphinxWriter to only display documentation for the first element of an array/dictionary instead of the same schema for each element. This logic is currently part of the sphinx-specific generation logic but could be simplified considerably if moved to the Writer-independent traversal logic.

@joshessman-llnl joshessman-llnl added Documentation Issues related to documentation Inlet labels Feb 22, 2021
@white238
Copy link
Member

https://axom.readthedocs.io/en/feature-essman-document_callbacks/

@@ -73,9 +73,28 @@ void writerHelper(Writer& writer, const Container& container)
{
// Use a pre-order traversal for readability
writer.documentContainer(container);
for(const auto& sub_container_entry : container.getChildContainers())
// If the current container contains a collection, visit that last to ensure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- Default Value
- Range/Valid Values
- Required
* - 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is helpful..

- Required
* - coef
- The function representing the BC coefficient
- Double(Vector, Double)
Copy link
Member

@white238 white238 Feb 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Should we have two columns? one for return type and one for parameters? Is this clear enough that the first double is the return type?

Copy link
Member

@white238 white238 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While still not perfect. This is a definite improvement. The array of primitives is probably going to need a large amount of work that is out of the scope of this PR. Thanks @joshessman-llnl !

@joshessman-llnl
Copy link
Member Author

This should get merged after #490 due to the changes made in that PR relating to traversal logic.

@white238 white238 requested a review from agcapps March 29, 2021 19:21
Copy link
Member

@agcapps agcapps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your hard work, @joshessman-llnl .

@joshessman-llnl joshessman-llnl merged commit fca1bf2 into develop Mar 29, 2021
@joshessman-llnl joshessman-llnl deleted the feature/essman/document_callbacks branch March 29, 2021 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to documentation Inlet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document function callbacks in SphinxWriter inlet::SphinxDocWriter should ignore internal container groups
4 participants