Conversation
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2033 +/- ##
==========================================
+ Coverage 83.25% 83.47% +0.21%
==========================================
Files 180 182 +2
Lines 13479 13517 +38
Branches 1253 1254 +1
==========================================
+ Hits 11222 11283 +61
+ Misses 2085 2061 -24
- Partials 172 173 +1
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
@anAirdrop Thanks for the fixes, these look great! Would you mind just addressing the DCO signoff issue and then I think we should be able to merge! |
c551391 to
16510c1
Compare
|
done! let me know if I can do anything else. |
The adapter-writing tutorial and two example scripts (conform.py, shot_detect.py) built target_url values by concatenating "file://" directly onto a filesystem path. Per RFC 3986, this only produces a correct file URI when the path is POSIX-absolute; for a relative path or a Windows drive-letter path (e.g. "C:/show/movie.mov"), the first path segment is parsed as the URL's host/netloc, silently corrupting the URL (e.g. "file://C:/show/movie.mov" instead of the correct "file:///C:/show/movie.mov"). opentimelineio.url_utils.url_from_filepath() already handles this correctly (absolute vs. relative paths, Windows drive letters, UNC paths) and is covered by tests/test_url_conversions.py. This change points the docs and examples at that existing utility instead of hand-rolling the URL. Signed-off-by: Ian Roth <anairdrop@gmail.com>
16510c1 to
9d3de92
Compare
Summary
Fixes the
target_urlexamples indocs/tutorials/write-an-adapter.mdand two example scripts (examples/conform.py,examples/shot_detect.py) that builtfile://URLs by string-concatenating"file://" + path. This only produces a valid URI for POSIX-absolute paths; for relative or Windows drive-letter paths, the first path segment is silently parsed as the URL's host (RFC 3986), producing a corrupted URL.opentimelineio.url_utils.url_from_filepath()already handles this correctly (seetests/test_url_conversions.py), this PR just points the docs and examples at it instead of hand-rolling the URL.Related to #1985. This is the narrow docs/examples fix mentioned in that thread, scoped separately from the larger Application Integrator's Guide rewrite being discussed there.
Test plan
url_utils.pyitself is unchanged and already covered bytests/test_url_conversions.py.examples/conform.pyandexamples/shot_detect.pyhave no existing dedicated test coverage (they are standalone CLI examples, not part of the installed package), did not want to expand the scope of this PR to add new test infrastructure for the examples directory.python -m py_compileon both edited example scripts.