-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conversation
…ocument_callbacks
docs: update comments explaining specialized traversal logic
src/axom/inlet/Inlet.cpp
Outdated
@@ -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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this 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 !
…ng schemas for nested structures
…e more interesting syntax help
This should get merged after #490 due to the changes made in that PR relating to traversal logic. |
…document_callbacks
There was a problem hiding this 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 .
Summary
Container
to record function signature information to the datastoreTo 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 theWriter
-independent traversal logic.