-
Notifications
You must be signed in to change notification settings - Fork 309
Autogenerate documentation of the serialized data model #521
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
Autogenerate documentation of the serialized data model #521
Conversation
- now has instructions on how to update the documentation.
Codecov Report
@@ Coverage Diff @@
## master #521 +/- ##
==========================================
- Coverage 88.82% 88.68% -0.14%
==========================================
Files 68 69 +1
Lines 7394 7497 +103
==========================================
+ Hits 6568 6649 +81
- Misses 826 848 +22
Continue to review full report at Codecov.
|
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.
I really like the idea of this! It keeps documentation up to date with schema changes, allows looking for schema changes based on git history of the documentation, and forces schema changes to be spotlit in PRs.
One thought that occurs to me is that it may be nice to add a more terse version of this schema document that doesn't include docstrings. If looking at the git history of this schema dump to find material schema changes docstring refinement and updates will, more often than not, be cosmetic in that context. By having a dump without docstrings available there will be a file where all changes in git history are material changes to the schema.
@reinecke interesting suggestion. Where would you put a document like that? (just the schema, no docstrings). |
- Use `backticks` around the module path - Use keyword arguments for format template filling
Knee-jerk, Also this suggestion may live a bit in the uncanny valley between documenting the data model and having a more formal spec, so I'd understand if it felt out-of-scope for this PR. |
I think this is a good idea as long as it is clearly labelled as auto-generated. This can be a good evolutionary step towards the formal spec. |
|
I think the output should go into |
@reinecke @jminor just to clarify:
|
- new version is autogenerated and unit tested!
- second doc isn't linked by the documentation, and only has lists of the fields
Alright, I created a second file, that isn't linked by the docs but is in that directory. The unit test runs against the exhaustive one (with docstrings) to ensure that document is always up to date. |
Overall, that seems to hit the mark.
So it seems that test failures looking for diffs in these have separate goals:
All this is a long way of saying, would it make sense to have the with docstring version auto-generated as part of the documentation publishing rather than checking it into the repo? Then the without one is checked into the repo and triggers test failure when out of sync. |
Adds a script that autogenerates a markdown file containing the serialized classes and their serialized properties only. Also adds a unit test that checks to see if that document needs to be updated.
TODO:
opentime
classes as welldocs
folder.Resulting page can be viewed here: https://github.com/ssteinbach/OpenTimelineIO/blob/document_serialized_data_model/docs/tutorials/otio-serialized-schema.md
Schema only page (no documentation):
https://github.com/ssteinbach/OpenTimelineIO/blob/document_serialized_data_model/docs/tutorials/otio-serialized-schema-only-fields.md