Skip to content
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

Added support for pathlib.Path filepath arguments for adapter IO functions #1704

Merged

Conversation

timlehr
Copy link
Contributor

@timlehr timlehr commented Feb 29, 2024

Simple little PR: Currently the read_from_file, write_to_file of opentimelineio.adapter do not support pathlib.Path objects for their filepath argument. This addresses this.

Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's recommended to use os.fspath to convert a Path object into a string.

src/py-opentimelineio/opentimelineio/adapters/__init__.py Outdated Show resolved Hide resolved
src/py-opentimelineio/opentimelineio/adapters/__init__.py Outdated Show resolved Hide resolved
@timlehr
Copy link
Contributor Author

timlehr commented Feb 29, 2024

@JeanChristopheMorinPerso Thanks, I changed the code accordingly!

Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@meshula meshula merged commit 134b9b2 into AcademySoftwareFoundation:extract_adapters Feb 29, 2024
39 checks passed
Copy link
Collaborator

@meshula meshula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

reinecke pushed a commit that referenced this pull request Apr 4, 2024
reinecke pushed a commit that referenced this pull request Apr 12, 2024
reinecke pushed a commit that referenced this pull request Apr 12, 2024
reinecke pushed a commit that referenced this pull request Jun 12, 2024
reinecke pushed a commit that referenced this pull request Jun 12, 2024
…tions (#1704)

Signed-off-by: Tim Lehr <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
reinecke pushed a commit that referenced this pull request Jun 12, 2024
…tions (#1704)

Signed-off-by: Tim Lehr <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
reinecke added a commit that referenced this pull request Jun 12, 2024
* Prepare plugin detection for removal of the cmx_3600 adapter (#1488)

* add "extract_adapters" to CI triggers
* use "otiod" as override example

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Extracted CMX3600 adapter and related sample data and tests (#1487)

* Removed the cmx_3600 adapter
* Removed sample data only used by the cmx_3600 adapter
* Add "extract_adapters" to CI triggers
* otioz test called for an edl we removed. Replaced with an otio file
* Converted screening_example.edl to screening_example.otio and used it in tests
* Removed other adapter suffixes from plugin tests as they belong to adapters soon to be extracted
* Autogenerated docs for CMX3600 removed

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Extract AAF Adapter from OTIO core and establish separate git repo (#1348)

* Remove AAF adapter
* Add Note about the AAF adapter being moved

Signed-off-by: Mark Reid <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove fcp adapter (#1501)

* removing the fcp adapter and it's test files
* replaced premiere_example.xml with premiere_example.otio to pass console tests.
* updated auto generated docs

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove svg adapter (#1502)

* removed svg adapter and related test files
* updated auto documentation

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove maya sequencer adapter related files (#1520)

* Remove maya adapter related files
* Update docs

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove fcp x xml adapter related files (#1529)

* remove fcp x xml adapter files
* update docs

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* remove hls adapter related files (#1535)

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* remove ale adapter related files (#1536)

* remove ale adapter related files

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove burnins adapter related files (#1537)

* extract burnin files
* remove test

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* extract xges adapter files (#1538)

* extract xges adapter files

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove the remains of "contrib"

* Removed the "contrib" directory tree and all references to the contrib adapters.
* Plugin system, setup and auto doc scripts no longer rely on contrib files.
* Also removed some entries on other adapters left behind in the adapters.md file.
* add README_contrib.md to the manifest

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* fixed `doc-plugins-update` when custom hooks are in environment (#1644)

Signed-off-by: Tim Lehr <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* added support for pathlib.Path filepath arguments for adapter IO functions (#1704)

Signed-off-by: Tim Lehr <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Removed orphaned FCP XML adapter post-rebase.

Signed-off-by: Eric Reinecke <[email protected]>

* Update README.md to point users to the adapter repos

Co-authored-by: Daniel Flehner Heen <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Updated documentation about adapters to better reflect the current landscape

Signed-off-by: Eric Reinecke <[email protected]>

* Removed contrib plugin manifest from package data

Signed-off-by: Eric Reinecke <[email protected]>

* Removed extract_adapters branch from CI references

Signed-off-by: Eric Reinecke <[email protected]>

---------

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Mark Reid <[email protected]>
Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Tim Lehr <[email protected]>
Co-authored-by: Daniel Flehner Heen <[email protected]>
Co-authored-by: Mark Reid <[email protected]>
Co-authored-by: Rob Osborne <[email protected]>
Co-authored-by: Tim Lehr <[email protected]>
darbyjohnston pushed a commit to darbyjohnston/OpenTimelineIO that referenced this pull request Jun 14, 2024
* Prepare plugin detection for removal of the cmx_3600 adapter (AcademySoftwareFoundation#1488)

* add "extract_adapters" to CI triggers
* use "otiod" as override example

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Extracted CMX3600 adapter and related sample data and tests (AcademySoftwareFoundation#1487)

* Removed the cmx_3600 adapter
* Removed sample data only used by the cmx_3600 adapter
* Add "extract_adapters" to CI triggers
* otioz test called for an edl we removed. Replaced with an otio file
* Converted screening_example.edl to screening_example.otio and used it in tests
* Removed other adapter suffixes from plugin tests as they belong to adapters soon to be extracted
* Autogenerated docs for CMX3600 removed

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Extract AAF Adapter from OTIO core and establish separate git repo (AcademySoftwareFoundation#1348)

* Remove AAF adapter
* Add Note about the AAF adapter being moved

Signed-off-by: Mark Reid <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove fcp adapter (AcademySoftwareFoundation#1501)

* removing the fcp adapter and it's test files
* replaced premiere_example.xml with premiere_example.otio to pass console tests.
* updated auto generated docs

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove svg adapter (AcademySoftwareFoundation#1502)

* removed svg adapter and related test files
* updated auto documentation

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove maya sequencer adapter related files (AcademySoftwareFoundation#1520)

* Remove maya adapter related files
* Update docs

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove fcp x xml adapter related files (AcademySoftwareFoundation#1529)

* remove fcp x xml adapter files
* update docs

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* remove hls adapter related files (AcademySoftwareFoundation#1535)

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* remove ale adapter related files (AcademySoftwareFoundation#1536)

* remove ale adapter related files

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove burnins adapter related files (AcademySoftwareFoundation#1537)

* extract burnin files
* remove test

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* extract xges adapter files (AcademySoftwareFoundation#1538)

* extract xges adapter files

Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Remove the remains of "contrib"

* Removed the "contrib" directory tree and all references to the contrib adapters.
* Plugin system, setup and auto doc scripts no longer rely on contrib files.
* Also removed some entries on other adapters left behind in the adapters.md file.
* add README_contrib.md to the manifest

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* fixed `doc-plugins-update` when custom hooks are in environment (AcademySoftwareFoundation#1644)

Signed-off-by: Tim Lehr <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* added support for pathlib.Path filepath arguments for adapter IO functions (AcademySoftwareFoundation#1704)

Signed-off-by: Tim Lehr <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Removed orphaned FCP XML adapter post-rebase.

Signed-off-by: Eric Reinecke <[email protected]>

* Update README.md to point users to the adapter repos

Co-authored-by: Daniel Flehner Heen <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>

* Updated documentation about adapters to better reflect the current landscape

Signed-off-by: Eric Reinecke <[email protected]>

* Removed contrib plugin manifest from package data

Signed-off-by: Eric Reinecke <[email protected]>

* Removed extract_adapters branch from CI references

Signed-off-by: Eric Reinecke <[email protected]>

---------

Signed-off-by: apetrynet <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Eric Reinecke <[email protected]>
Signed-off-by: Mark Reid <[email protected]>
Signed-off-by: rosborne132 <[email protected]>
Signed-off-by: Tim Lehr <[email protected]>
Co-authored-by: Daniel Flehner Heen <[email protected]>
Co-authored-by: Mark Reid <[email protected]>
Co-authored-by: Rob Osborne <[email protected]>
Co-authored-by: Tim Lehr <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
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.

3 participants