From 2b9c3a46df3ccfa922fea299e669c397419c76bd Mon Sep 17 00:00:00 2001 From: Eric Reinecke Date: Wed, 3 Apr 2024 14:59:48 -0700 Subject: [PATCH] Release v0.16.0 changes (#1716) * freeze runners to their current versions according to this: https://github.com/actions/runner-images * drop .dev1 suffix * check the README.md for any updates * update CONTRIBUTORS.md * Added note to the readme about OpenTimelineio-Plugins * c++ code formatted --------- Signed-off-by: Eric Reinecke --- .github/workflows/python-package.yml | 24 +++++++-------- CONTRIBUTORS.md | 4 +++ README.md | 4 +++ setup.py | 2 +- src/opentimelineio/CORE_VERSION_MAP.cpp | 2 +- src/opentimelineio/clip.h | 10 +++--- src/opentimelineio/composition.cpp | 6 ++-- src/opentimelineio/composition.h | 12 ++++---- src/opentimelineio/deserialization.cpp | 11 +++++-- src/opentimelineio/externalReference.h | 9 +++--- src/opentimelineio/gap.cpp | 10 +++--- src/opentimelineio/generatorReference.h | 13 ++++---- src/opentimelineio/imageSequenceReference.h | 24 ++++++++------- src/opentimelineio/item.h | 5 ++- src/opentimelineio/mediaReference.h | 9 +++--- src/opentimelineio/missingReference.h | 9 +++--- src/opentimelineio/serialization.cpp | 34 +++++++++++++-------- src/opentimelineio/stackAlgorithm.cpp | 27 +++++++++------- 18 files changed, 126 insertions(+), 89 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ba8673b7d5..693d2aba5f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -6,7 +6,7 @@ name: OpenTimelineIO # for configuring which build will be a C++ coverage build / coverage report env: GH_COV_PY: 3.7 - GH_COV_OS: ubuntu-latest + GH_COV_OS: ubuntu-22.04 GH_DEPENDABOT: dependabot on: @@ -24,15 +24,15 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-22.04, windows-2022, macos-12] # Unfortunately the CMake test target is OS dependent so we set it as # a variable here. include: - - os: ubuntu-latest + - os: ubuntu-22.04 OTIO_TEST_TARGET: test - - os: windows-latest + - os: windows-2022 OTIO_TEST_TARGET: RUN_TESTS - - os: macos-latest + - os: macos-12 OTIO_TEST_TARGET: test env: @@ -92,13 +92,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-22.04, windows-2022, macos-12] python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] include: - - { os: ubuntu-latest, shell: bash } - - { os: macos-latest, shell: bash } - - { os: windows-latest, shell: pwsh } - - { os: windows-latest, shell: msys2, python-version: 'mingw64' } + - { os: ubuntu-22.04, shell: bash } + - { os: macos-12, shell: bash } + - { os: windows-2022, shell: pwsh } + - { os: windows-2022, shell: msys2, python-version: 'mingw64' } defaults: run: @@ -162,7 +162,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-22.04, windows-2022, macos-12] python-build: ['cp37*', 'cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*'] steps: - uses: actions/checkout@v3 @@ -184,7 +184,7 @@ jobs: package_sdist: needs: py_build_test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d22caf37a3..a4c8e418be 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -21,11 +21,13 @@ If you know of anyone missing from this list, please contact us: https://lists.a * Eric ([eric-with-a-c](https://github.com/eric-with-a-c)) * Eric Desruisseaux ([desruie](https://github.com/desruie)) * Eric Reinecke ([reinecke](https://github.com/reinecke)) +* Evan Blaudy ([EvanBldy](https://github.com/EvanBldy)) * Flavian Liger ([flavienliger](https://github.com/flavienliger)) * Fredrik Brännbacka ([smaragden](https://github.com/smaragden)) * Freeson Wang ([freesonluxo](https://github.com/freesonluxo)) * Félix Bourbonnais ([BadSingleton](https://github.com/BadSingleton)) * Félix David ([Tilix4](https://github.com/Tilix4)) +* Gonzalo Garramuño ([ggarra13](https://github.com/ggarra13)) * Henry Wilkes ([hwilkes-igalia](https://github.com/hwilkes-igalia)) * Jean-Christophe Morin ([JeanChristopheMorinPerso](https://github.com/JeanChristopheMorinPerso)) * Jeff Horrocks ([jhorrocks-tl](https://github.com/jhorrocks-tl)) @@ -38,6 +40,7 @@ If you know of anyone missing from this list, please contact us: https://lists.a * Joshua Minor ([jminor](https://github.com/jminor)) * Julian Yu-Chung Chen ([jchen9](https://github.com/jchen9)) * Karthik Ramesh Iyer ([KarthikRIyer](https://github.com/KarthikRIyer)) +* Konstantin Maslyuk ([kalemas](https://github.com/kalemas)) * Laura Savidge ([lsavidge](https://github.com/lsavidge)) * Mark Final ([foundry-markf](https://github.com/foundry-markf)) * Mark Reid ([markreidvfx](https://github.com/markreidvfx)) @@ -47,6 +50,7 @@ If you know of anyone missing from this list, please contact us: https://lists.a * Michael Jefferies ([michaeljefferies](https://github.com/michaeljefferies)) * Mike Koetter ([mikekoetter](https://github.com/mikekoetter)) * Mike Mahony ([mikemahony](https://github.com/mikemahony)) +* Nicholas Bui LeTourneau ([nickblt](https://github.com/nickblt)) * Nick Porcino ([meshula](https://github.com/meshula)) * Pedro Labonia ([pedrolabonia](https://github.com/pedrolabonia)) * Peter Targett ([peter-targett](https://github.com/peter-targett)) diff --git a/README.md b/README.md index 3b4b7dae51..b3b4ceba1e 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,10 @@ To provide interoperability with other file formats or applications lacking a native integration, the opentimelineio community has built a number of python adapter plugins. This includes Final Cut Pro XML, AAF, CMX 3600 EDL, and more. +**Note: for releases after v0.16, the [OpenTimelineIO PyPI package](https://pypi.org/project/OpenTimelineIO/) will only include the core libraries and file formats. Users that need the full set of adapter plugins should use the [OpenTimelineIO-Plugins PyPI Package](https://pypi.org/project/OpenTimelineIO-Plugins/). Each OpenTimelineIO release will have a matching OpenTimelineIO-Plugins release.** + +For more information: https://github.com/AcademySoftwareFoundation/OpenTimelineIO/issues/1386 + For more information about this, including supported formats, see: https://opentimelineio.readthedocs.io/en/latest/tutorials/adapters.html Other Plugins diff --git a/setup.py b/setup.py index a50a74d781..bd625dc165 100644 --- a/setup.py +++ b/setup.py @@ -218,7 +218,7 @@ def cmake_install(self): # Metadata that gets stamped into the __init__ files during the build phase. PROJECT_METADATA = { - "version": "0.16.0.dev1", + "version": "0.16.0", "author": 'Contributors to the OpenTimelineIO project', "author_email": 'otio-discussion@lists.aswf.io', "license": 'Apache 2.0 License', diff --git a/src/opentimelineio/CORE_VERSION_MAP.cpp b/src/opentimelineio/CORE_VERSION_MAP.cpp index 7a8c21aecb..37328b8e2e 100644 --- a/src/opentimelineio/CORE_VERSION_MAP.cpp +++ b/src/opentimelineio/CORE_VERSION_MAP.cpp @@ -78,7 +78,7 @@ const label_to_schema_version_map CORE_VERSION_MAP{ { "Transition", 1 }, { "UnknownSchema", 1 }, } }, - { "0.16.0.dev1", + { "0.16.0", { { "Adapter", 1 }, { "Clip", 2 }, diff --git a/src/opentimelineio/clip.h b/src/opentimelineio/clip.h index d7f8195bd7..5d7d5baccf 100644 --- a/src/opentimelineio/clip.h +++ b/src/opentimelineio/clip.h @@ -23,11 +23,11 @@ class Clip : public Item using Parent = Item; Clip( - std::string const& name = std::string(), - MediaReference* media_reference = nullptr, - std::optional const& source_range = std::nullopt, - AnyDictionary const& metadata = AnyDictionary(), - std::string const& active_media_reference_key = default_media_key); + std::string const& name = std::string(), + MediaReference* media_reference = nullptr, + std::optional const& source_range = std::nullopt, + AnyDictionary const& metadata = AnyDictionary(), + std::string const& active_media_reference_key = default_media_key); void set_media_reference(MediaReference* media_reference); MediaReference* media_reference() const noexcept; diff --git a/src/opentimelineio/composition.cpp b/src/opentimelineio/composition.cpp index 2bf12ad887..57dfc4c0b1 100644 --- a/src/opentimelineio/composition.cpp +++ b/src/opentimelineio/composition.cpp @@ -342,9 +342,9 @@ Composition::range_of_child(Composable const* child, ErrorStatus* error_status) } return (reference_space != this) ? transformed_time_range( - *result_range, - reference_space, - error_status) + *result_range, + reference_space, + error_status) : *result_range; } diff --git a/src/opentimelineio/composition.h b/src/opentimelineio/composition.h index 9a8802f681..675d18c3e2 100644 --- a/src/opentimelineio/composition.h +++ b/src/opentimelineio/composition.h @@ -143,9 +143,9 @@ class Composition : public Item int64_t _bisect_right( RationalTime const& tgt, std::function const& key_func, - ErrorStatus* error_status = nullptr, - std::optional lower_search_bound = std::optional(0), - std::optional upper_search_bound = std::nullopt) const; + ErrorStatus* error_status = nullptr, + std::optional lower_search_bound = std::optional(0), + std::optional upper_search_bound = std::nullopt) const; // Return the index of the last item in seq such that all e in seq[:index] // have key_func(e) < tgt, and all e in seq[index:] have key_func(e) >= tgt. @@ -159,9 +159,9 @@ class Composition : public Item int64_t _bisect_left( RationalTime const& tgt, std::function const& key_func, - ErrorStatus* error_status = nullptr, - std::optional lower_search_bound = std::optional(0), - std::optional upper_search_bound = std::nullopt) const; + ErrorStatus* error_status = nullptr, + std::optional lower_search_bound = std::optional(0), + std::optional upper_search_bound = std::nullopt) const; std::vector> _children; diff --git a/src/opentimelineio/deserialization.cpp b/src/opentimelineio/deserialization.cpp index 5bfa60a6d1..9090e23ade 100644 --- a/src/opentimelineio/deserialization.cpp +++ b/src/opentimelineio/deserialization.cpp @@ -617,7 +617,8 @@ SerializableObject::Reader::_decode(_Resolver& resolver) { IMATH_NAMESPACE::V2d min, max; return _fetch("min", &min) && _fetch("max", &max) - ? std::any(IMATH_NAMESPACE::Box2d(std::move(min), std::move(max))) + ? std::any( + IMATH_NAMESPACE::Box2d(std::move(min), std::move(max))) : std::any(); } else @@ -776,13 +777,17 @@ SerializableObject::Reader::_read_optional( return true; } bool -SerializableObject::Reader::read(std::string const& key, std::optional* value) +SerializableObject::Reader::read( + std::string const& key, + std::optional* value) { return _read_optional(key, value); } bool -SerializableObject::Reader::read(std::string const& key, std::optional* value) +SerializableObject::Reader::read( + std::string const& key, + std::optional* value) { return _read_optional(key, value); } diff --git a/src/opentimelineio/externalReference.h b/src/opentimelineio/externalReference.h index 42141a2228..6488fc8730 100644 --- a/src/opentimelineio/externalReference.h +++ b/src/opentimelineio/externalReference.h @@ -20,10 +20,11 @@ class ExternalReference final : public MediaReference using Parent = MediaReference; ExternalReference( - std::string const& target_url = std::string(), - std::optional const& available_range = std::nullopt, - AnyDictionary const& metadata = AnyDictionary(), - std::optional const& available_image_bounds = std::nullopt); + std::string const& target_url = std::string(), + std::optional const& available_range = std::nullopt, + AnyDictionary const& metadata = AnyDictionary(), + std::optional const& available_image_bounds = + std::nullopt); std::string target_url() const noexcept { return _target_url; } diff --git a/src/opentimelineio/gap.cpp b/src/opentimelineio/gap.cpp index c7bb28b0a6..b310d4df84 100644 --- a/src/opentimelineio/gap.cpp +++ b/src/opentimelineio/gap.cpp @@ -21,11 +21,11 @@ Gap::Gap( std::vector const& markers, AnyDictionary const& metadata) : Parent( - name, - TimeRange(RationalTime(0, duration.rate()), duration), - metadata, - effects, - markers) + name, + TimeRange(RationalTime(0, duration.rate()), duration), + metadata, + effects, + markers) {} Gap::~Gap() diff --git a/src/opentimelineio/generatorReference.h b/src/opentimelineio/generatorReference.h index 75017c8166..1bbb21e5a8 100644 --- a/src/opentimelineio/generatorReference.h +++ b/src/opentimelineio/generatorReference.h @@ -20,12 +20,13 @@ class GeneratorReference final : public MediaReference using Parent = MediaReference; GeneratorReference( - std::string const& name = std::string(), - std::string const& generator_kind = std::string(), - std::optional const& available_range = std::nullopt, - AnyDictionary const& parameters = AnyDictionary(), - AnyDictionary const& metadata = AnyDictionary(), - std::optional const& available_image_bounds = std::nullopt); + std::string const& name = std::string(), + std::string const& generator_kind = std::string(), + std::optional const& available_range = std::nullopt, + AnyDictionary const& parameters = AnyDictionary(), + AnyDictionary const& metadata = AnyDictionary(), + std::optional const& available_image_bounds = + std::nullopt); std::string generator_kind() const noexcept { return _generator_kind; } diff --git a/src/opentimelineio/imageSequenceReference.h b/src/opentimelineio/imageSequenceReference.h index 176ddb5609..5821c1aacc 100644 --- a/src/opentimelineio/imageSequenceReference.h +++ b/src/opentimelineio/imageSequenceReference.h @@ -27,17 +27,19 @@ class ImageSequenceReference final : public MediaReference using Parent = MediaReference; ImageSequenceReference( - std::string const& target_url_base = std::string(), - std::string const& name_prefix = std::string(), - std::string const& name_suffix = std::string(), - int start_frame = 1, - int frame_step = 1, - double rate = 1, - int frame_zero_padding = 0, - MissingFramePolicy const missing_frame_policy = MissingFramePolicy::error, - std::optional const& available_range = std::nullopt, - AnyDictionary const& metadata = AnyDictionary(), - std::optional const& available_image_bounds = std::nullopt); + std::string const& target_url_base = std::string(), + std::string const& name_prefix = std::string(), + std::string const& name_suffix = std::string(), + int start_frame = 1, + int frame_step = 1, + double rate = 1, + int frame_zero_padding = 0, + MissingFramePolicy const missing_frame_policy = + MissingFramePolicy::error, + std::optional const& available_range = std::nullopt, + AnyDictionary const& metadata = AnyDictionary(), + std::optional const& available_image_bounds = + std::nullopt); std::string target_url_base() const noexcept { return _target_url_base; } diff --git a/src/opentimelineio/item.h b/src/opentimelineio/item.h index 0cce7a7e96..9e64c8ed51 100644 --- a/src/opentimelineio/item.h +++ b/src/opentimelineio/item.h @@ -39,7 +39,10 @@ class Item : public Composable void set_enabled(bool enabled) { _enabled = enabled; } - std::optional source_range() const noexcept { return _source_range; } + std::optional source_range() const noexcept + { + return _source_range; + } void set_source_range(std::optional const& source_range) { diff --git a/src/opentimelineio/mediaReference.h b/src/opentimelineio/mediaReference.h index 514ef3ec46..f7fde5a32a 100644 --- a/src/opentimelineio/mediaReference.h +++ b/src/opentimelineio/mediaReference.h @@ -24,10 +24,11 @@ class MediaReference : public SerializableObjectWithMetadata using Parent = SerializableObjectWithMetadata; MediaReference( - std::string const& name = std::string(), - std::optional const& available_range = std::nullopt, - AnyDictionary const& metadata = AnyDictionary(), - std::optional const& available_image_bounds = std::nullopt); + std::string const& name = std::string(), + std::optional const& available_range = std::nullopt, + AnyDictionary const& metadata = AnyDictionary(), + std::optional const& available_image_bounds = + std::nullopt); std::optional available_range() const noexcept { diff --git a/src/opentimelineio/missingReference.h b/src/opentimelineio/missingReference.h index 63cfd3a6ac..f64c7449c3 100644 --- a/src/opentimelineio/missingReference.h +++ b/src/opentimelineio/missingReference.h @@ -20,10 +20,11 @@ class MissingReference final : public MediaReference using Parent = MediaReference; MissingReference( - std::string const& name = std::string(), - std::optional const& available_range = std::nullopt, - AnyDictionary const& metadata = AnyDictionary(), - std::optional const& available_image_bounds = std::nullopt); + std::string const& name = std::string(), + std::optional const& available_range = std::nullopt, + AnyDictionary const& metadata = AnyDictionary(), + std::optional const& available_image_bounds = + std::nullopt); bool is_missing_reference() const override; diff --git a/src/opentimelineio/serialization.cpp b/src/opentimelineio/serialization.cpp index 7ff58bf6bc..4aa64f7553 100644 --- a/src/opentimelineio/serialization.cpp +++ b/src/opentimelineio/serialization.cpp @@ -196,7 +196,10 @@ class CloningEncoder : public Encoder void write_value(int value) override { _store(std::any(value)); } void write_value(int64_t value) override { _store(std::any(value)); } void write_value(uint64_t value) override { _store(std::any(value)); } - void write_value(std::string const& value) override { _store(std::any(value)); } + void write_value(std::string const& value) override + { + _store(std::any(value)); + } void write_value(double value) override { _store(std::any(value)); } void write_value(RationalTime const& value) override @@ -697,15 +700,19 @@ SerializableObject::Writer::_build_dispatch_tables() _encoder.write_value(std::any_cast(value)); }; wt[&typeid(IMATH_NAMESPACE::Box2d)] = [this](std::any const& value) { - _encoder.write_value(std::any_cast(value)); + _encoder.write_value( + std::any_cast(value)); }; /* * These next recurse back through the Writer itself: */ - wt[&typeid(SerializableObject::Retainer<>)] = [this](std::any const& value) { - this->write(_no_key, std::any_cast>(value)); - }; + wt[&typeid(SerializableObject::Retainer<>)] = + [this](std::any const& value) { + this->write( + _no_key, + std::any_cast>(value)); + }; wt[&typeid(AnyDictionary)] = [this](std::any const& value) { this->write(_no_key, std::any_cast(value)); @@ -744,9 +751,10 @@ SerializableObject::Writer::_build_dispatch_tables() /* * These next recurse back through the Writer itself: */ - et[&typeid(AnyDictionary)] = [this](std::any const& lhs, std::any const& rhs) { - return _any_dict_equals(lhs, rhs); - }; + et[&typeid(AnyDictionary)] = + [this](std::any const& lhs, std::any const& rhs) { + return _any_dict_equals(lhs, rhs); + }; et[&typeid(AnyVector)] = [this](std::any const& lhs, std::any const& rhs) { return _any_array_equals(lhs, rhs); }; @@ -1155,9 +1163,10 @@ SerializableObject::Writer::write(std::string const& key, std::any const& value) { std::string s; std::string bad_type_name = - (type == typeid(UnknownType)) ? type_name_for_error_message( - std::any_cast(value).type_name) - : type_name_for_error_message(type); + (type == typeid(UnknownType)) + ? type_name_for_error_message( + std::any_cast(value).type_name) + : type_name_for_error_message(type); if (&key != &_no_key) { @@ -1225,7 +1234,8 @@ SerializableObject::clone(ErrorStatus* error_status) const e._resolver.finalize(error_function); return e._root.type() == typeid(SerializableObject::Retainer<>) - ? std::any_cast&>(e._root).take_value() + ? std::any_cast&>(e._root) + .take_value() : nullptr; } diff --git a/src/opentimelineio/stackAlgorithm.cpp b/src/opentimelineio/stackAlgorithm.cpp index 774d0f9dba..5bdf45b850 100644 --- a/src/opentimelineio/stackAlgorithm.cpp +++ b/src/opentimelineio/stackAlgorithm.cpp @@ -2,15 +2,15 @@ // Copyright Contributors to the OpenTimelineIO project #include "opentimelineio/stackAlgorithm.h" +#include "opentimelineio/gap.h" #include "opentimelineio/track.h" #include "opentimelineio/trackAlgorithm.h" #include "opentimelineio/transition.h" -#include "opentimelineio/gap.h" namespace opentimelineio { namespace OPENTIMELINEIO_VERSION { typedef std::map> RangeTrackMap; -typedef std::vector> TrackRetainerVector; +typedef std::vector> TrackRetainerVector; static void _flatten_next_item( @@ -129,9 +129,10 @@ _flatten_next_item( // shorter tracks are clones and get added to the tracks_retainer. // a new track will replace the original pointer in the track vector. static void -_normalize_tracks_lengths(std::vector& tracks, - TrackRetainerVector& tracks_retainer, - ErrorStatus* error_status) +_normalize_tracks_lengths( + std::vector& tracks, + TrackRetainerVector& tracks_retainer, + ErrorStatus* error_status) { RationalTime duration; for (auto track: tracks) @@ -143,20 +144,24 @@ _normalize_tracks_lengths(std::vector& tracks, } } - for(int i = 0; i < tracks.size(); i++) + for (int i = 0; i < tracks.size(); i++) { - Track *old_track = tracks[i]; + Track* old_track = tracks[i]; RationalTime track_duration = old_track->duration(error_status); if (track_duration < duration) { - Track *new_track = static_cast(old_track->clone(error_status)); + Track* new_track = + static_cast(old_track->clone(error_status)); if (is_error(error_status)) { return; } // add track to retainer so it can be freed later - tracks_retainer.push_back(SerializableObject::Retainer(new_track)); - new_track->append_child(new Gap(duration - track_duration), error_status); + tracks_retainer.push_back( + SerializableObject::Retainer(new_track)); + new_track->append_child( + new Gap(duration - track_duration), + error_status); if (is_error(error_status)) { return; @@ -227,7 +232,7 @@ flatten_stack(std::vector const& tracks, ErrorStatus* error_status) // freed when the algorithm is complete TrackRetainerVector tracks_retainer; flat_tracks.reserve(tracks.size()); - for (auto track : tracks) + for (auto track: tracks) { flat_tracks.push_back(track); }