Repository navigation
[Editorial P2.6]: Timeline builder and OTIO compare tool - #73
jakubjezek001 wants to merge 7 commits into
Conversation
b1b2b44 to
a6f0f16
Compare
|
Cross-review finding 73-1:
The host stores Failing input (OTIO 0.18.1, py3.9): give the Fix: pass the class name from the track kind ( Severity: should-fix (template for P2.7, fixture gap hides it). |
|
Cross-review finding 73-2: no test fails when
Failing input after the mutation: two timelines where the right one has one clip less in Fix: add a test for a missing and an added list element (expect Severity: should-fix (the code is right today, the guard is missing). |
|
Cross-review finding 73-3:
Fix: catch the import error in the shim ( Severity: minor. |
|
Cross-review finding 73-4:
Fix: one subprocess test: Severity: minor. |
|
Cross-review finding 73-5:
The host Failing input: Ten seconds become 240 frames, a wrong available range (and wrong audio source range) for any non-24 Resolve audio. If it is kept for byte-identical adoption, list it in the PR body and add a 25 fps audio clip to the fixture so P2.8 has to decide; otherwise use the shared helper and say so. Severity: should-fix (undeclared divergence, bug carried into the template). |
|
Cross-review finding 73-6: reference provenance is inconsistent (Resolve utils blob, unmarked edits) and the sync check never runs in CI
I diffed every reference against the host blobs at the recorded commits: the copied code is verbatim, apart from these:
Fix: record the blob that matches the recorded commit (or move the recorded commit forward), record a blob for each helper file in each header, mark or drop the codespell edit, and either run the sync job in CI against the host Severity: minor. |
|
Cross-review finding 73-7:
Severity: minor. |
|
Cross-review finding 73-8: acceptance criteria 1 and 2 of #18 are not literally met, yet the PR says Issue #18 asks for: "Builds timelines equal (by
I did not find a divergence between builder and reference on 900 randomised numeric variants of the three inputs (record gaps, offsets, speeds, overlaps) or on a multi-channel Resolve audio track, so I do not claim a behaviour bug here. The deliberate host quirks (negative record gap folds an overlap onto Fix: either keep Severity: should-fix (process, needs an explicit decision). |
a6f0f16 to
74bab55
Compare
|
Author answers to 73-1 to 73-8, fixed in 8ba3d9c (head of this PR) unless noted.
|
642e593 to
1a045e8
Compare
Library module with a command line shim. Ignores key order and the rate of a zero time, compares rates strictly and reports a readable path per difference. Exit codes 0 equal, 1 different, 2 unreadable.
TimelineBuilder, ClipSpec, MediaSpec and MarkerSpec build an OTIO timeline from plain data: media references with the image sequence fallback, source ranges, record and track-end gaps, markers and effects. Behaviour the hosts disagree on stays a parameter. compat gets has_image_sequence_reference().
Each reference copies the host's export code verbatim and replaces only the host reads. The builder is compared with each by otio_compare, and each reference with a golden file written on OTIO 0.15. A hostsync test fails when a host file changed since it was copied.
Paths contain list indexes such as children[0:Clip "a"], which fnmatch read as a character class. Only * and ? are wildcards now. Document the gap quirks the builder keeps on purpose.
73-1 tagged Hiero audio track in the fixture, specs name AudioTrack; 73-2 compare tests for lists of different length; 73-3 compare exits 2 for a missing OTIO and for JSON that is not OTIO; 73-4 subprocess tests of tools/otio_compare.py; 73-5 pin the kept Resolve 24 fps audio quirk; 73-6 record the helper blobs in the reference headers; 73-7 tests/AGENTS.md lists the new tests, fixtures and marker.
Digits of a shot and a version next to the frame range must not confuse the references or the builder: sequence names in the Flame, Hiero and Resolve inputs are now shot0010_v0010_[1001-1024].exr and shot0020_v0010.[0001-0100].exr / .%04d.exr. Goldens regenerated on OTIO 0.15; only name_prefix changed.
|
Follow-up to the review comment on #69 about shot and version names: the host fixtures now use |
1a045e8 to
ddefb0c
Compare
Changelog Description
New shared
ayon_editorial.otio.builder:TimelineBuilder,ClipSpec,MediaSpecandMarkerSpecbuild an OTIO timeline from plain data, replacing the shared skeleton of the Flame, Hiero and Resolve exporters. Newotio_compare(libraryayon_editorial.otio.compareandtools/otio_compare.py) compares two OTIO files and is used for every host adoption step (P2.7 to P2.9).Additional info
gap_mode(recordfor Flame and Hiero,track_endfor Resolve),ClipSpec.offset_at_clip_rate(Resolve conforms the source offset in a different order, which differs for mixed rates: 86503.5035 vs 86503.4865 for 23.976 media on a 24 timeline),sequence_fallback_padded, marker rate and anchor.TimelineBuilder):recordgaps can be zero or negative on overlaps and skip the- 1after a previous out of 0;track_endassumes the timeline rate.otio.time.timecode_to_framesis right; P2.8 decides, a test pins the difference.compat.has_image_sequence_reference()added; on the 0.15 floorImageSequenceReferencealways exists, so the fallback is kept but never runs there.otio_compare: dict key order ignored, rate of a zero time ignored, other rates strict, int vs float is a difference,--ignoretakes globs where only*and?are wildcards. Exit codes 0 equal, 1 different, 2 unreadable. The logic is in the package so a host Python console can run before/after without the checkout.--ignore) is fixed.How the builder is checked without a host:
tests/resources/host_exports/{flame,hiero,resolve}_reference.pycopy each host exporter verbatim (only host reads replaced, markedHOST-READ; the header records the host commit and git blob). The builder, fed by<host>_specs.pyfrom the same synthetic input, is compared with each reference byotio_compareand each reference with a golden.otiowritten on OTIO 0.15.test_host_reference_sync.pychecks the blobs recorded in the headers always and, withAYON_EDITORIAL_HOST_ROOTset to the folder holding the host checkouts, that the host files still have them (not run in CI). The<host>_specs.pyfiles are the templates P2.7 to P2.9 copy into the host.These references are modelled on the code, not exported from a host. The real proof is the before/after export of a human in each host (P2.7 to P2.9).
Found while writing the references:
get_reformatted_filenameinotio/utils.pycalls.searchon a plain string and would raise; it is only reached on OTIO withoutImageSequenceReference, so it is dead today.Start TCconversion fails on OTIO 0.18 for a rounded 23.976 rate (SMPTE timecode does not support it) and works on 0.15. If Resolve reports the rounded rate, newer OTIO breaks the export there; the reference uses the unrounded rate.Testing notes:
./tools/manage.sh run-tests(also run on Python 3.9 with OTIO 0.15, 0.16 and 0.17)AYON_EDITORIAL_HOST_ROOT=<folder with the host checkouts> ./tools/manage.sh run-testsruns the host-sync checks.python tools/otio_compare.py a.otio b.otioDependency
Refs #18
The issue stays open: its criterion "equal to fixture exports from each host" is met by references modelled on the host code, not by real exports. Close it when a human has done the before/after exports of P2.7 to P2.9.
Checklist
ruff checkandpytestpasspython create_package.py --skip-zipbuildstests/test_dcc_agnostic.py)