-
Notifications
You must be signed in to change notification settings - Fork 36
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
Automate examples in documentation (#603) #625
Conversation
CONTRIBUTING.md
Outdated
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 change is not related to this issue, so should be reverted.
.github/workflows/update_docs.yml
Outdated
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.
Should this workflow be empty?
source_file_path = 'examples/example.py' # Path to the source code file | ||
doc_file_path = 'docs/source/examples.rst' # Path to the documentation file |
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.
So I believe we would like to use our validation models that are defined here as the source and update the example section that corresponds to that model in docs/source/concepts.
For example, CopyNumberCount validation model would generate the docs example here. We'd want the docs example to also add the id
field which is the out.ga4gh_identify
field in the validation model.
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 the clarification! I will use the validation models as the source for generating the documentation examples. specifically I will extract the relevant data from each model, including the out.ga4gh_identify field and update the example section in docs/source/concepts. I’ll proceed with implementing this and updating the documentation accordingly.
This pull request addresses issue #603 by automating the process of updating examples in the documentation. The following changes have been made:
scripts/update_examples.py
to extract examples dynamically.docs/source/examples.rst
to include extracted examples.examples/example.py
as a source for the examples.conf.py
to support dynamic updates..github/workflows/update_docs.yml
to automate this process.Please review and let me know if further updates are needed.