Skip to content

Add missing docstrings for Item, MediaReference, RationalTime - #2052

Closed
hikmetba-bit wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
hikmetba-bit:docs/2042-item-mediareference-rationaltime-docstrings
Closed

hikmetba-bit wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
hikmetba-bit:docs/2042-item-mediareference-rationaltime-docstrings

Conversation

@hikmetba-bit

Copy link
Copy Markdown

Summary

Addresses the three concrete examples named in #2042:

  • Item had no class docstring at all.
  • MediaReference had 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 autogenerated docs/tutorials/otio-serialized-schema.md, or in plain help()` output.

While in there, I also documented Item.source_range/color/markers/effects, MediaReference.available_range/available_image_bounds/is_missing_reference, and SerializableObjectWithMetadata.name/metadata. That last one is inherited by essentially every schema class, so it fixes the empty name/metadata parameter descriptions across the whole generated schema doc, not just on Item/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.md is generated by make doc-model-update, which requires building the native _otio extension. 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 — running make doc-model-update before merge will refresh it correctly.

Test plan

  • Could not build/run the test suite locally (no C++ toolchain available in this environment).
  • Verified by manual review: cross-checked every new :class:~X`` reference against the actual bound class names in the same file, confirmed the def_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

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>
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@hikmetba-bit

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant