koodaamo / tnefparse

a TNEF decoding library written in python, without external dependencies
GNU Lesser General Public License v3.0
49 stars 37 forks source link

Modernize package and test setup #65

Closed jugmac00 closed 4 years ago

jugmac00 commented 4 years ago

As python setup.py test is deprecated, tests are now run by tox and pytest. https://setuptools.readthedocs.io/en/latest/setuptools.html#test-build-package-and-run-a-unittest-suite

While using the deprecated test command, the optional dependency compressed_rtf was provided via tests_require, which accompanied the mentioned test command.

As we now use pytest/tox, the additional requirements are provided via the extras_require keyword, which also offers the additional benefit that the users of the package can install the extras via pip install tnefparse[optional]. if this PR gets accepted, it would be nice to document that optional installation method in the README).

The how to run tests section in the README.rst was updated to reflect the changes.

Also, now you can generate a coverage report already in the local development environment by invoking tox -e coverage. This will both generate coverage output in the terminal and in the htmlcov directory. This way one can check impacts on coverage even before pushing and thus waiting for the result by codecov.

With e.g. tox -e py38 -- -k test_cmdline you can now run a subset of tests in a specific environment.

codecov[bot] commented 4 years ago

Codecov Report

Merging #65 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #65   +/-   ##
=======================================
  Coverage   92.98%   92.98%           
=======================================
  Files           7        7           
  Lines        1297     1297           
  Branches      121      121           
=======================================
  Hits         1206     1206           
  Misses         69       69           
  Partials       22       22           

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 91f581e...511ac69. Read the comment docs.