Skip to content

Commit d45b56d

Browse files
authored
Merge branch 'main' into 1635_fix_flatten_issue
2 parents e875424 + 3b7ef23 commit d45b56d

File tree

75 files changed

+972
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+972
-431
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
submodules: 'recursive'
1616

17-
- uses: actions/setup-python@v4.3.0
17+
- uses: actions/setup-python@v5.4.0
1818
with:
1919
python-version: '3.10'
2020

@@ -58,11 +58,11 @@ jobs:
5858
check-warnings:
5959
runs-on: ubuntu-latest
6060
steps:
61-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
6262
with:
6363
submodules: 'recursive'
6464

65-
- uses: actions/setup-python@v4.3.0
65+
- uses: actions/setup-python@v5.4.0
6666
with:
6767
python-version: '3.10'
6868

.github/workflows/pypi-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ jobs:
1717
# happen for this actual commit (the commit that the tag points to).
1818
# It also restores the files timestamps.
1919
- name: Download wheels from commit ${{ github.sha }}
20-
uses: dawidd6/action-download-artifact@v2
20+
uses: dawidd6/action-download-artifact@v8
2121
with:
2222
workflow: python-package.yml
2323
workflow_conclusion: success
2424
commit: ${{ github.sha }}
25-
name: wheels
25+
name_is_regexp: true
26+
name: 'wheel-.*'
2627
path: dist
2728

2829
- name: Download sdist from commit ${{ github.sha }}
29-
uses: dawidd6/action-download-artifact@v2
30+
uses: dawidd6/action-download-artifact@v8
3031
with:
3132
workflow: python-package.yml
3233
workflow_conclusion: success

.github/workflows/python-package.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ jobs:
6565
if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
6666
run: |
6767
cd ${{ env.OTIO_BUILD_DIR }}
68-
lcov --capture -b . --directory . --output-file=coverage.info -q
68+
lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q
6969
cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info
70-
lcov --remove coverage.filtered.info '*/usr/*' --output-file=coverage.filtered.info -q
71-
lcov --remove coverage.filtered.info '*/deps/*' --output-file=coverage.filtered.info -q
7270
lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q
7371
lcov --list coverage.filtered.info
7472
# \todo Should the Codecov web pages show the results of the C++ or Python tests?
@@ -98,6 +96,7 @@ jobs:
9896
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
9997
include:
10098
- { os: ubuntu-latest, shell: bash }
99+
- { os: ubuntu-22.04, shell: bash, python-version: 3.7 }
101100
- { os: macos-latest, shell: bash }
102101
- { os: macos-13, shell: bash }
103102
- { os: windows-latest, shell: pwsh }
@@ -106,6 +105,7 @@ jobs:
106105
- { os: macos-latest, python-version: 3.7 }
107106
- { os: macos-latest, python-version: 3.8 }
108107
- { os: macos-latest, python-version: 3.9 }
108+
- { os: ubuntu-latest, python-version: 3.7 }
109109

110110
defaults:
111111
run:
@@ -131,12 +131,9 @@ jobs:
131131
mingw-w64-x86_64-cmake
132132
make
133133
git
134-
- name: Ensure MSYS2 pip is updated
135-
if: matrix.python-version == 'mingw64'
136-
run: curl -sS https://bootstrap.pypa.io/get-pip.py | python
137134
- name: Set up Python ${{ matrix.python-version }}
138135
if: matrix.python-version != 'mingw64'
139-
uses: actions/setup-python@v4.3.0
136+
uses: actions/setup-python@v5.4.0
140137
with:
141138
python-version: ${{ matrix.python-version }}
142139
- name: Install coverage dependency
@@ -151,8 +148,7 @@ jobs:
151148
run: make ci-prebuild
152149
- name: Build and Install
153150
run: |
154-
# compile and install into virtualenv/virtual machine (verbosely)
155-
pip install .[dev] -v
151+
pip install .[dev] -v --break-system-packages
156152
- name: Run tests w/ python coverage
157153
run: make ci-postbuild
158154
# (only on ubuntu/pyhton3.7)
@@ -175,31 +171,28 @@ jobs:
175171
runs-on: ${{ matrix.os }}
176172
strategy:
177173
matrix:
178-
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
179-
python-build: ['cp37*', 'cp38*', 'cp39*', 'cp310*', 'cp311*', 'cp312*']
174+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest]
175+
python-build: ['cp37', 'cp38', 'cp39', 'cp310', 'cp311', 'cp312']
180176
exclude:
181-
- { os: macos-latest, python-build: 'cp37*' }
177+
- { os: macos-latest, python-build: 'cp37' }
182178
steps:
183179
- uses: actions/checkout@v4
184180

185-
- name: Set up QEMU
186-
if: runner.os == 'Linux'
187-
uses: docker/setup-qemu-action@v3
188-
189181
- name: Build wheels (Python 3)
190-
uses: pypa/cibuildwheel@v2.16.5
182+
uses: pypa/cibuildwheel@v2.22.0
191183
with:
192184
output-dir: wheelhouse
193185
env:
194-
CIBW_BUILD: ${{ matrix.python-build }}
186+
CIBW_BUILD: ${{ matrix.python-build }}*
195187
CIBW_SKIP: '*musllinux*'
196-
CIBW_ARCHS_LINUX: x86_64 aarch64
188+
CIBW_ARCHS_LINUX: native
197189
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
198190
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
191+
MACOSX_DEPLOYMENT_TARGET: 10.14
199192

200-
- uses: actions/upload-artifact@v3
193+
- uses: actions/upload-artifact@v4
201194
with:
202-
name: wheels
195+
name: wheel-${{ matrix.os }}-${{ matrix.python-build }}
203196
path: ./wheelhouse/*.whl
204197

205198
package_sdist:
@@ -210,15 +203,15 @@ jobs:
210203
with:
211204
submodules: 'recursive'
212205

213-
- uses: actions/setup-python@v4.3.0
206+
- uses: actions/setup-python@v5.4.0
214207

215208
- name: Install pypa/build
216209
run: python -m pip install build --user
217210

218211
- name: Generate sdist
219212
run: python -m build -s .
220213

221-
- uses: actions/upload-artifact@v3
214+
- uses: actions/upload-artifact@v4
222215
with:
223216
name: sdist
224217
path: dist

.readthedocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# required by RTD
22
version: 2
33

4+
sphinx:
5+
# Path to your Sphinx configuration file.
6+
configuration: docs/conf.py
7+
48
build:
59
os: "ubuntu-20.04"
610
tools:

ADOPTERS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# OpenTimelineIO Adopters
2+
3+
Below is a partial list of organizations and projects that are using OpenTimelineIO. If you would like to be added to this list, please submit a pull request to this file.
4+
5+
| Name | Description |
6+
|------|------------------------------------------------------------------------------------------------------------------------------------------------|
7+
| [Adobe Premiere Pro](https://www.adobe.com/products/premiere.html) | [Timeline import/export](https://community.adobe.com/t5/premiere-pro-beta-discussions/new-in-beta-otio-import-and-export/td-p/14937493) (beta) |
8+
| [AVID Media Composer](https://www.avid.com/media-composer) | Timeline export (preview) |
9+
| [Black Magic Design DaVinci Resolve](https://www.blackmagicdesign.com/products/davinciresolve/) | Timeline import/export |
10+
| [CineSync](https://www.backlight.co/product/cinesync) | Timeline viewing | |
11+
| [ColorFront Transkoder](https://colorfront.com/index.php?page=SOFTWARE&spage=Transkoder) | Timeline import |
12+
| [Nuke Studio](https://www.foundry.com/products/nuke) | Timeline import/export with full timeline round-tripping |
13+
| [Hiero](https://www.foundry.com/products/nuke-family/hiero) | Timeline import/export |
14+
| [OpenRV](https://github.com/AcademySoftwareFoundation/OpenRV) | Timeline import and viewing |

CMakeLists.txt

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ project(OpenTimelineIO VERSION ${OTIO_VERSION} LANGUAGES C CXX)
2828
# Installation options
2929
option(OTIO_CXX_INSTALL "Install the C++ bindings" ON)
3030
option(OTIO_PYTHON_INSTALL "Install the Python bindings" OFF)
31-
option(OTIO_DEPENDENCIES_INSTALL "Install OTIO's C++ header dependencies (any and nonstd)" ON)
31+
option(OTIO_DEPENDENCIES_INSTALL "Install OTIO's C++ header dependencies (Imath)" ON)
3232
option(OTIO_INSTALL_PYTHON_MODULES "Install OTIO pure Python modules/files" ON)
3333
option(OTIO_INSTALL_COMMANDLINE_TOOLS "Install the OTIO command line tools" ON)
3434
option(OTIO_INSTALL_CONTRIB "Install the opentimelineio_contrib Python package" ON)
35-
set(OTIO_IMATH_LIBS "" CACHE STRING "Imath library overrides to use instead of src/deps or find_package")
36-
option(OTIO_FIND_IMATH "Find Imath using find_package, ignored if OTIO_IMATH_LIBS is set" OFF)
35+
option(OTIO_FIND_IMATH "Find Imath using find_package" OFF)
36+
option(OTIO_FIND_RAPIDJSON "Find RapidJSON using find_package" OFF)
3737
set(OTIO_PYTHON_INSTALL_DIR "" CACHE STRING "Python installation dir (such as the site-packages dir)")
3838

3939
# Build options
@@ -118,16 +118,41 @@ else()
118118
endif()
119119
endif()
120120

121+
# Set the SO version. The SO version must be incremented every time a change
122+
# occurs to the ABI that causes a backward incompatibility. Such changes
123+
# include, exhaustively:
124+
#
125+
# * a change to struct or class layout
126+
# * enum changes that would cause a renumbering of previously published enums
127+
# * a removal of a struct, class, enumeration, or function
128+
# * a change in parameters to a free standing function
129+
# * a removal of a global variable
130+
#
131+
# OTIO currently designates the minor version number for breaking changes,
132+
# e.g. v0.15, v0.16.0, v0.17.0, accordingly the SO version will be incremented
133+
# to match. SO version must be monotically increasing, so the ABI version
134+
# should be computed as: major * 100 + revision. The third digit will never
135+
# implicate an ABI version change. So for example, the following OTIO versions
136+
# would map to these ABI versions:
137+
#
138+
# * v0.18.0 - 18
139+
# * v0.19.0 - 19
140+
# * v0.19.1 - 19 # No ABI changes with minor version changes
141+
# * v1.0.0 - 100
142+
# * v1.1.0 - 101
143+
#
144+
math(EXPR OTIO_SOVERSION "${OTIO_VERSION_MAJOR} * 100 + ${OTIO_VERSION_MINOR}")
145+
121146
set(OTIO_RESOLVED_CXX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
122147

123148
if(OTIO_CXX_INSTALL)
124149
message(STATUS "Installing C++ bindings to: ${OTIO_RESOLVED_CXX_INSTALL_DIR}")
125150
message(STATUS "Installing C++ dynamic libraries to: ${OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR}")
126151

127152
if(OTIO_DEPENDENCIES_INSTALL)
128-
message(STATUS " Installing 'any' and 'nonstd' for C++ (OTIO_DEPENDENCIES_INSTALL=ON)")
153+
message(STATUS " Installing header dependencies for C++ (OTIO_DEPENDENCIES_INSTALL=ON)")
129154
else()
130-
message(STATUS " Not installing any and nonstd for C++ (OTIO_DEPENDENCIES_INSTALL=OFF)")
155+
message(STATUS " Not installing header dependencies for C++ (OTIO_DEPENDENCIES_INSTALL=OFF)")
131156
endif()
132157
else()
133158
message(STATUS "Install C++ bindings: OFF")
@@ -150,7 +175,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
150175
set(CMAKE_CXX_EXTENSIONS OFF)
151176

152177
if(OTIO_CXX_COVERAGE AND NOT MSVC)
153-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
178+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-update=atomic -fprofile-exclude-files='/usr/*;src/deps/*'")
154179
# this causes cmake to produce file.gcno instead of file.cpp.gcno
155180
set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
156181
message(STATUS "Building C++ with Coverage: ON")
@@ -217,47 +242,30 @@ set(CTEST_OUTPUT_ON_FAILURE ON)
217242
# Build the dependencies and components
218243

219244
#----- Imath
220-
set(OTIO_RESOLVED_IMATH_LIBRARIES "")
221-
if (NOT "${OTIO_IMATH_LIBS}" STREQUAL "")
222-
message(STATUS "Using Imath from OTIO_MATH_LIBS: ${OTIO_IMATH_LIBS}")
223-
set(OTIO_RESOLVED_IMATH_LIBRARIES "${OTIO_IMATH_LIBS}")
224-
set(USE_DEPS_IMATH OFF)
225-
elseif(OTIO_FIND_IMATH)
226-
find_package(Imath QUIET)
245+
if(OTIO_FIND_IMATH)
246+
find_package(Imath REQUIRED)
227247
if (Imath_FOUND)
228248
message(STATUS "Found Imath 3 at ${Imath_CONFIG}")
229-
set(USE_DEPS_IMATH OFF)
230-
else()
231-
find_package(IlmBase QUIET)
232-
if (IlmBase_FOUND)
233-
message(STATUS "Imath 3 not found, found Imath 2 at ${IlmBase_CONFIG}")
234-
message(STATUS "You may need to point to the Imath headers by setting IMATH_INCLUDES")
235-
set(USE_DEPS_IMATH_OFF)
236-
set(OTIO_RESOLVED_IMATH_LIBRARIES "${IlmBase_LIBRARIES")
237-
else()
238-
message(STATUS "Imath 3 and 2 were not found, using src/deps/Imath")
239-
set(USE_DEPS_IMATH ON)
240-
endif()
241249
endif()
242250
else()
243251
message(STATUS "Using src/deps/Imath by default")
244-
set(USE_DEPS_IMATH ON)
252+
include_directories("${PROJECT_SOURCE_DIR}/src/deps/Imath/src")
253+
endif()
254+
255+
#----- RapidJSON
256+
257+
if(OTIO_FIND_RAPIDJSON)
258+
find_package(RapidJSON CONFIG REQUIRED)
259+
if (RapidJSON_FOUND)
260+
message(STATUS "Found RapidJSON at ${RapidJSON_CONFIG}")
261+
endif()
262+
else()
263+
message(STATUS "Using src/deps/rapidjson by default")
245264
endif()
246265

247266
# set up the internally hosted dependencies
248267
add_subdirectory(src/deps)
249268

250-
set (OTIO_IMATH_TARGETS
251-
# For OpenEXR/Imath 3.x:
252-
$<TARGET_NAME_IF_EXISTS:Imath::Imath>
253-
$<TARGET_NAME_IF_EXISTS:Imath::Half>
254-
# For OpenEXR >= 2.4/2.5 with reliable exported targets
255-
$<TARGET_NAME_IF_EXISTS:IlmBase::Imath>
256-
$<TARGET_NAME_IF_EXISTS:IlmBase::Half>
257-
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex>
258-
# For OpenEXR <= 2.3:
259-
${ILMBASE_LIBRARIES})
260-
261269
add_subdirectory(src/opentime)
262270
add_subdirectory(src/opentimelineio)
263271

@@ -272,4 +280,3 @@ endif()
272280
if(OTIO_CXX_EXAMPLES)
273281
add_subdirectory(examples)
274282
endif()
275-

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ exclude readthedocs-conda.yml
1212
exclude .codecov.yml
1313
exclude .gitlab-ci.yml
1414
exclude *.pdf
15+
exclude ADOPTERS.md
1516
exclude CODE_OF_CONDUCT.md
1617
exclude CONTRIBUTING.md
1718
exclude CONTRIBUTORS.md

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,10 @@ ifndef OTIO_CXX_BUILD_TMP_DIR
9292
C++ coverage will not work, because intermediate build products will \
9393
not be found.)
9494
endif
95-
lcov --rc lcov_branch_coverage=1 --capture -b . --directory ${OTIO_CXX_BUILD_TMP_DIR} \
95+
lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory ${OTIO_CXX_BUILD_TMP_DIR} \
9696
--output-file=${OTIO_CXX_BUILD_TMP_DIR}/coverage.info -q
97-
cat ${OTIO_CXX_BUILD_TMP_DIR}/coverage.info | sed "s/SF:.*src/SF:src/g"\
97+
cat ${OTIO_CXX_BUILD_TMP_DIR}/coverage.info | sed "s/SF:.*src/SF:src/g" \
9898
> ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info
99-
lcov --rc lcov_branch_coverage=1 --remove ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info '/usr/*' \
100-
--output-file=${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info -q
101-
lcov --rc lcov_branch_coverage=1 --remove ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info '*/deps/*' \
102-
--output-file=${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info -q
10399
rm ${OTIO_CXX_BUILD_TMP_DIR}/coverage.info
104100
lcov --list ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info
105101

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Links
1515

1616
* Main web site: http://opentimeline.io/
1717
* Documentation: https://opentimelineio.readthedocs.io/
18+
* Wiki (more documentation): https://github.com/AcademySoftwareFoundation/OpenTimelineIO/wiki
1819
* GitHub: https://github.com/AcademySoftwareFoundation/OpenTimelineIO
1920
* [Discussion group](https://lists.aswf.io/g/otio-discussion)
2021
* [Slack channel](https://academysoftwarefdn.slack.com/messages/CMQ9J4BQC)
@@ -105,16 +106,12 @@ namespace otio = opentimelineio::OPENTIMELINEIO_VERSION;
105106
void
106107
main()
107108
{
108-
otio::ErrorStatus err;
109109
otio::SerializableObject::Retainer<otio::Timeline> tl(
110110
dynamic_cast<otio::Timeline*>(
111-
otio::Timeline::from_json_file("taco.otio", &err)
111+
otio::Timeline::from_json_file("taco.otio")
112112
)
113113
);
114-
const std::vector<otio::SerializableObject::Retainer<otio::Clip>> clips = (
115-
tl->find_clips()
116-
);
117-
for (const auto& cl : clips)
114+
for (const auto& cl : tl->find_clips())
118115
{
119116
otio::RationalTime dur = cl->duration();
120117
std::cout << "Name: " << cl->name() << " [";
@@ -174,7 +171,7 @@ commandline by using the `CMAKE_ARGS` environment variable.
174171

175172
`env CMAKE_ARGS="-DCMAKE_VAR=VALUE1 -DCMAKE_VAR_2=VALUE2" pip install .`
176173

177-
Additionaly, to reproduce CI failures regarding the file manifest, run:
174+
Additionally, to reproduce CI failures regarding the file manifest, run:
178175
`make manifest` locally to run the python `check-manifest` program.
179176

180177
## C++ Coverage Builds

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
r'cxx/cxx'
101101
]
102102

103+
# For some reason this URL gives 403 Forbidden when running in github actions
104+
linkcheck_ignore = [r'https://opensource.org/licenses/MIT']
105+
103106
# -- Options for MySt-Parser -----------------------------------------------------------
104107
# https://myst-parser.readthedocs.io/en/latest/sphinx/reference.html
105108

0 commit comments

Comments
 (0)