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

Coverage make target #41

Merged
merged 7 commits into from Dec 6, 2016

Conversation

Projects
None yet
3 participants
@ssteinbach
Copy link
Member

commented Dec 6, 2016

Adds:

  • coverage make target that uses coverage.py to generate a coverage test report based on the make test unit test suite.
  • Add detection for make autopep8, make pep8, and make pyflakes to print out instructions for getting autopep8, pep8, and pyflakes in the case the user doesn't have them already installed.

Example:

> make autopep8
Makefile:32: *** "autopep8 is not available please see: " "https://pypi.python.org/pypi/autopep8#installation".  Stop.

Example of coverage report:

> make coverage
...........................................................................................................................
----------------------------------------------------------------------
Ran 123 tests in 2.608s

OK
Name                                             Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------
opentimelineio/__init__.py                           6      0   100%
opentimelineio/adapters/__init__.py                 39      8    79%   23-25, 29, 37-38, 49-50
opentimelineio/adapters/adapter.py                  48      1    98%   51
opentimelineio/adapters/cmx_3600.py                168     34    80%   49, 51, 67-68, 106-130, 150, 174, 191-196, 217, 240, 276, 291, 298, 327, 331
opentimelineio/adapters/manifest.py                 34      0   100%
opentimelineio/adapters/otio_json.py                62      2    97%   42, 175
opentimelineio/adapters/pretty_print_string.py      37     32    14%   12-18, 22, 26-85
opentimelineio/core/__init__.py                      8      0   100%
opentimelineio/core/composition.py                 125     12    90%   95, 98, 132, 198, 254, 257, 275-280, 283, 292, 301
opentimelineio/core/item.py                         87      4    95%   76-77, 114, 145
opentimelineio/core/serializeable_object.py         48      5    90%   61-62, 157, 174, 177
opentimelineio/core/type_registry.py                30      1    97%   63
opentimelineio/exceptions.py                        23      0   100%
opentimelineio/media_reference.py                   39      2    95%   55, 99
opentimelineio/opentime.py                         223     38    83%   60, 69-79, 105-106, 120, 205, 234-235, 290-304, 339, 391-397, 408-409, 443, 456, 478, 505, 509
opentimelineio/schema/__init__.py                    7      0   100%
opentimelineio/schema/clip.py                       33      4    88%   43, 48, 60-61
opentimelineio/schema/effect.py                     19      0   100%
opentimelineio/schema/filler.py                      8      0   100%
opentimelineio/schema/marker.py                     26      4    85%   43-44, 56, 69
opentimelineio/schema/sequence.py                   30      2    93%   54, 61
opentimelineio/schema/stack.py                      26      3    88%   36-37, 55
opentimelineio/schema/timeline.py                   33      0   100%
------------------------------------------------------------------------------
TOTAL                                             1159    152    87%

ssteinbach added some commits Dec 6, 2016

Add a coverage make target.
Also detect when the coverage program is not installed and prompt the
user with an error.

@ssteinbach ssteinbach added this to the Alpha 3 milestone Dec 6, 2016

@repsac
Copy link
Collaborator

left a comment

Include support for flake8 as well (for those that prefer to use both as a combination, like I do).

ssteinbach added some commits Dec 6, 2016

Switch to using flake8 for linting.
Flake8 wraps both pylint and pep8 in one call, simplifying the makefile
user experience down to just `make lint`.  It also automatically does
the scanning, removing the need for the find call and pipe to xargs.  It
also allows using #noqa to mark things that don't need to be checked, so
linting the files but ignoring unused imports in __init__ is supported.

- Adds lint target using flake8
- Adds check for presence of flake8 program
- Adds noqa lines in init files
Conform to latest pep8.
Mostly just adds a space before the if __main__ blocks.
@repsac

repsac approved these changes Dec 6, 2016

@jminor jminor merged commit 95adcdc into PixarAnimationStudios:master Dec 6, 2016

@ssteinbach ssteinbach deleted the ssteinbach:coverage_make_target branch Apr 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.