BreakingBytes / simkit

Model Simulation Framework
http://breakingbytes.github.io/simkit/
BSD 3-Clause "New" or "Revised" License
27 stars 16 forks source link

add coverage tox conf #86

Open mikofski opened 8 years ago

mikofski commented 8 years ago

add tox conf to calculate coverage, ditto for documentation

mikofski commented 8 years ago

installing coverage.py lets coverage run with either nose

$ nosetests --with-coverage --cover-package=carousel --cover-erase --cover-tests

or pytest with pytest-cov plugin

$ pytest --cov=carousel
---------- coverage: platform win32, python 2.7.12-final-0 -----------
Name                                          Stmts   Miss  Cover
-----------------------------------------------------------------
carousel\__init__.py                              6      0   100%
carousel\contrib\__init__.py                      0      0   100%
carousel\contrib\readers.py                      58      1    98%
carousel\contrib\tests\__init__.py                0      0   100%
carousel\contrib\tests\test_data_readers.py     201      5    98%
carousel\core\__init__.py                       151     35    77%
carousel\core\calculations.py                    43      1    98%
carousel\core\calculators.py                    118     11    91%
carousel\core\data_readers.py                   246    176    28%
carousel\core\data_sources.py                   120     16    87%
carousel\core\exceptions.py                      46     21    54%
carousel\core\formulas.py                       143     36    75%
carousel\core\layers.py                         168     33    80%
carousel\core\models.py                         158     34    78%
carousel\core\outputs.py                         45      0   100%
carousel\core\simulations.py                    268     93    65%
carousel\release_robot.py                        40     10    75%
carousel\tests\__init__.py                       12      0   100%
carousel\tests\test_calcs.py                     59      2    97%
carousel\tests\test_core.py                       8      0   100%
carousel\tests\test_data.py                      68      2    97%
carousel\tests\test_exceptions.py                26      0   100%
carousel\tests\test_fields.py                    23      1    96%
carousel\tests\test_formulas.py                  50      1    98%
carousel\tests\test_model.py                     54      1    98%
carousel\tests\test_outputs.py                   22      1    95%
carousel\tests\test_sim.py                       82      1    99%
-----------------------------------------------------------------
TOTAL                                          2215    481    78%

adding a tox file would automate this with tox and more?