diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c41ed255d1..54a255517f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -65,10 +65,8 @@ jobs: if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT run: | cd ${{ env.OTIO_BUILD_DIR }} - lcov --capture -b . --directory . --output-file=coverage.info -q + lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory . --output-file=coverage.info -q cat coverage.info | sed "s/SF:.*src/SF:src/g" > coverage.filtered.info - lcov --remove coverage.filtered.info '*/usr/*' --output-file=coverage.filtered.info -q - lcov --remove coverage.filtered.info '*/deps/*' --output-file=coverage.filtered.info -q lcov --remove coverage.filtered.info '*/tests/*' --output-file=coverage.filtered.info -q lcov --list coverage.filtered.info # \todo Should the Codecov web pages show the results of the C++ or Python tests? @@ -98,6 +96,7 @@ jobs: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] include: - { os: ubuntu-latest, shell: bash } + - { os: ubuntu-22.04, shell: bash, python-version: 3.7 } - { os: macos-latest, shell: bash } - { os: macos-13, shell: bash } - { os: windows-latest, shell: pwsh } @@ -106,6 +105,7 @@ jobs: - { os: macos-latest, python-version: 3.7 } - { os: macos-latest, python-version: 3.8 } - { os: macos-latest, python-version: 3.9 } + - { os: ubuntu-latest, python-version: 3.7 } defaults: run: @@ -131,9 +131,6 @@ jobs: mingw-w64-x86_64-cmake make git - - name: Ensure MSYS2 pip is updated - if: matrix.python-version == 'mingw64' - run: curl -sS https://bootstrap.pypa.io/get-pip.py | python - name: Set up Python ${{ matrix.python-version }} if: matrix.python-version != 'mingw64' uses: actions/setup-python@v4.3.0 @@ -151,8 +148,7 @@ jobs: run: make ci-prebuild - name: Build and Install run: | - # compile and install into virtualenv/virtual machine (verbosely) - pip install .[dev] -v + pip install .[dev] -v --break-system-packages - name: Run tests w/ python coverage run: make ci-postbuild # (only on ubuntu/pyhton3.7) diff --git a/.readthedocs.yml b/.readthedocs.yml index f0873ba44f..39b7ec9713 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,6 +1,10 @@ # required by RTD version: 2 +sphinx: + # Path to your Sphinx configuration file. + configuration: docs/conf.py + build: os: "ubuntu-20.04" tools: diff --git a/CMakeLists.txt b/CMakeLists.txt index 36ef428b2b..7a1dc2b5f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,7 +150,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) if(OTIO_CXX_COVERAGE AND NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-update=atomic -fprofile-exclude-files='/usr/*;src/deps/*'") # this causes cmake to produce file.gcno instead of file.cpp.gcno set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1) message(STATUS "Building C++ with Coverage: ON") diff --git a/Makefile b/Makefile index 3953557ec9..f1fc21b071 100644 --- a/Makefile +++ b/Makefile @@ -92,14 +92,10 @@ ifndef OTIO_CXX_BUILD_TMP_DIR C++ coverage will not work, because intermediate build products will \ not be found.) endif - lcov --rc lcov_branch_coverage=1 --capture -b . --directory ${OTIO_CXX_BUILD_TMP_DIR} \ + lcov --rc lcov_branch_coverage=1 --rc no_exception_branch=1 --ignore-errors mismatch --capture -b . --directory ${OTIO_CXX_BUILD_TMP_DIR} \ --output-file=${OTIO_CXX_BUILD_TMP_DIR}/coverage.info -q - cat ${OTIO_CXX_BUILD_TMP_DIR}/coverage.info | sed "s/SF:.*src/SF:src/g"\ + cat ${OTIO_CXX_BUILD_TMP_DIR}/coverage.info | sed "s/SF:.*src/SF:src/g" \ > ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info - lcov --rc lcov_branch_coverage=1 --remove ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info '/usr/*' \ - --output-file=${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info -q - lcov --rc lcov_branch_coverage=1 --remove ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info '*/deps/*' \ - --output-file=${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info -q rm ${OTIO_CXX_BUILD_TMP_DIR}/coverage.info lcov --list ${OTIO_CXX_BUILD_TMP_DIR}/coverage.filtered.info diff --git a/tests/test_clip.py b/tests/test_clip.py index cb2dafd7cf..f1712020ba 100644 --- a/tests/test_clip.py +++ b/tests/test_clip.py @@ -63,7 +63,8 @@ def test_str(self): self.assertMultiLineEqual( str(cl), - 'Clip("test_clip", MissingReference(\'\', None, None, {}), None, {})' + 'Clip("test_clip", ' + 'MissingReference(\'\', None, None, {}), None, {}, [], [])' ) self.assertMultiLineEqual( repr(cl), @@ -71,7 +72,9 @@ def test_str(self): "name='test_clip', " 'media_reference={}, ' 'source_range=None, ' - 'metadata={{}}' + 'metadata={{}}, ' + 'effects=[], ' + 'markers=[]' ')'.format( repr(cl.media_reference) ) @@ -87,7 +90,8 @@ def test_str_with_filepath(self): self.assertMultiLineEqual( str(cl), 'Clip(' - '"test_clip", ExternalReference("/var/tmp/foo.mov"), None, {}' + '"test_clip", ' + 'ExternalReference("/var/tmp/foo.mov"), None, {}, [], []' ')' ) self.assertMultiLineEqual( @@ -98,7 +102,9 @@ def test_str_with_filepath(self): "target_url='/var/tmp/foo.mov'" "), " 'source_range=None, ' - 'metadata={}' + 'metadata={}, ' + 'effects=[], ' + 'markers=[]' ')' )