Add missing docstrings for Item, MediaReference, RationalTime - #2052
Closed
hikmetba-bit wants to merge 1 commit into
Closed
hikmetba-bit wants to merge 1 commit into
hikmetba-bit wants to merge 1 commit into
Conversation
Addresses the concrete examples named in AcademySoftwareFoundation#2042: - Item had no class docstring at all. - MediaReference had no class docstring at all. - RationalTime's docstring used a Sphinx :math: role that renders as raw, confusing text outside of the Sphinx build (e.g. in the autogenerated otio-serialized-schema doc / interactive help()). Also documents Item.source_range/color/markers/effects, MediaReference.available_range/available_image_bounds/is_missing_reference, and SerializableObjectWithMetadata.name/metadata (the last of which, being inherited, fixes the empty name/metadata parameter descriptions across every schema class in the generated schema doc). Note: docs/tutorials/otio-serialized-schema.md is generated by `make doc-model-update`, which requires a full build of the native _otio extension. I don't have a C++ toolchain in this environment to run it, so that generated file is intentionally left untouched here — whoever merges this will need to run `make doc-model-update` to refresh it (the project's own test suite will point this out). Contributes to AcademySoftwareFoundation#2042 (that issue is a broader documentation audit; this covers its three named examples plus one high-leverage base class rather than the full checklist). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Author
|
Closing as a duplicate of #2051, which I opened concurrently in a separate session and just consolidated with the extra property-level docstrings from this PR (Item.source_range/color/markers/effects/available_image_bounds, MediaReference.available_range/available_image_bounds/is_missing_reference, RationalTime.value/rate). Apologies for the noise — #2051 now has everything from both. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the three concrete examples named in #2042:
Itemhad no class docstring at all.MediaReferencehad no class docstring at all.RationalTime's docstring used a Sphinx:math:role (:math:\rt.value/rt.rate`) that renders as raw, confusing text outside of the actual Sphinx build — e.g. in the autogenerateddocs/tutorials/otio-serialized-schema.md, or in plainhelp()` output.While in there, I also documented
Item.source_range/color/markers/effects,MediaReference.available_range/available_image_bounds/is_missing_reference, andSerializableObjectWithMetadata.name/metadata. That last one is inherited by essentially every schema class, so it fixes the emptyname/metadataparameter descriptions across the whole generated schema doc, not just onItem/MediaReference.This is #2042's three named examples plus one high-leverage base class — not the full documentation checklist the issue asks for, which is a much bigger, open-ended audit better done incrementally.
Important note for the merger
docs/tutorials/otio-serialized-schema.mdis generated bymake doc-model-update, which requires building the native_otioextension. I don't have a C++ toolchain in this sandbox, so I could not run it, and deliberately left that generated file untouched rather than hand-edit it (the name/metadata change alone would touch dozens of unrelated lines across the whole file, which is exactly the kind of thing that file's generator, not a human, should produce). The project's own test suite should flag that it's stale — runningmake doc-model-updatebefore merge will refresh it correctly.Test plan
:class:~X`` reference against the actual bound class names in the same file, confirmed thedef_property/`def_property_readonly` docstring-argument pattern against existing working examples in this same file (e.g. `Item.enabled`), and traced through `autogen_serialized_datamodel.py` to confirm exactly which docstrings feed the generated schema doc (via `inspect.getdoc`) before deciding what to change.🤖 Generated with Claude Code