Skip to content

Conversation

@ssteinbach
Copy link
Collaborator

@ssteinbach ssteinbach commented Feb 9, 2021

We've used tox for some time, and its served us well. With the recent move to GitHub actions, however, we've found that it is no longer needed. The reasons for removing it:

  • one less build dependency
  • the cmake/setup.py combination is already complicated, and tox is a further complication of that system
  • Our makefile wasn't running tox, so this ensures that developers who use our developer makefile are matching exactly what the ci does
  • We'd like to do further things like run ci on more platforms and push wheels directly from ci into pypi/conda/etc -- this makes that more straightforward

What this PR does:

  • moves the commands that tox was running into a makefile target, ci-build-test
  • removes the setup.py and ci dependencies on tox
  • switches the ci to use the new makefile target
  • Removes references to and configuration for tox from various places (mostly the setup.cfg).

Todo:

  • move lcov execution to Makefile
  • remove tox section of setup.cfg
  • check block in setup.py to see if we can remove extra logic whose comment references tox

@meshula
Copy link
Collaborator

meshula commented Feb 9, 2021

A big positive is that we can now see the build logs, so we can find where the build is failing :)

- just seeing what pip does... if build messages still show up or not
@codecov-io
Copy link

codecov-io commented Feb 10, 2021

Codecov Report

Merging #882 (83bf734) into master (2a33b58) will increase coverage by 8.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #882      +/-   ##
==========================================
+ Coverage   84.36%   92.49%   +8.12%     
==========================================
  Files          74        9      -65     
  Lines        3090     2532     -558     
==========================================
- Hits         2607     2342     -265     
+ Misses        483      190     -293     
Flag Coverage Δ
unittests 92.49% <ø> (+8.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/opentimelineio/freezeFrame.cpp
src/opentimelineio/serializableObject.h
src/opentimelineio/externalReference.h
src/opentimelineio/typeRegistry.h
src/opentimelineio/composable.h
src/opentimelineio/stackAlgorithm.cpp
src/opentimelineio/vectorIndexing.h
src/opentimelineio/composition.cpp
...ntimelineio/opentimelineio-bindings/otio_utils.cpp
...melineio/opentimelineio-bindings/otio_bindings.cpp
... and 73 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a33b58...83bf734. Read the comment docs.

- looks like pip doesn't have a way to only install dependencies, or to
  specify verbosity separate for the dependency search. Thats fine, CI
  will do a verbose install... better to get the build log than not.
- push even more configuration into the setup.cfg for the coverage runs
- use the "path" argument to map the source paths to installed paths for
  opentimelineio and contrib modules
- fix `make clean` target to clean up coverage files and not deal with
  .pyc files any more (since these are unlikely to be generated in the
  source tree)
- break out ci-prebuild and ci-postbuild commands, which ensures that
  the linter and check-manifest run _before_ builds and that coverage
  runs _after_ builds.
- sets environment variables necessary for C++ coverage to be generated
  by ci builds
- the CMake was already testing this for C++ builds, so no need to
  duplicate the check.  Instead, setup.py prints a hopefully helpful
  message about what is needed to enable C++ coverage builds.  None of
  this impacts python coverage.
- check if lcov is installed for lcov target
- add ci targets for before and after the install (ensuring that
  check-manifest and linting run before compiling and that
  testing/coverage runs after)
- switch to using parallel mode for python coverage
- add lcov target for C++ coverage report generation
- use the GITHUB_WORKSPACE variable from github actions to specify where
  the build directory lives
 Please enter the commit message for your changes. Lines starting
@ssteinbach ssteinbach marked this pull request as ready for review February 11, 2021 00:31
@ssteinbach ssteinbach added this to the Public Beta 14 milestone Feb 11, 2021
@ssteinbach
Copy link
Collaborator Author

Making sure that the RTD build isn't busted. Lets wait for that to finish before landing this.

@ssteinbach
Copy link
Collaborator Author

Those look good too, if this looks good to folks, I think this is ready to land:
https://opentimelineio-ssteinbach.readthedocs.io/en/remove_tox/

@ssteinbach
Copy link
Collaborator Author

Closes #772

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.

There's one chunk to remove, as you asked. The CMake side of things already has logic to disable coverage if lcov is not available on the platform (e.g. msvc)

- add a brief description of how to generate C++ coverage enabled builds
- updated the supported python version in the README (and hopefully used
  a string that will be easier to find when updating the README in the
  future).
@ssteinbach ssteinbach merged commit 546b333 into AcademySoftwareFoundation:master Feb 11, 2021
@ssteinbach ssteinbach deleted the remove_tox branch February 11, 2021 19:01
@ssteinbach ssteinbach mentioned this pull request Feb 26, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants