Skip to content

Commit

Permalink
Include branching and HTML coverage report with tox -e coverage; remo…
Browse files Browse the repository at this point in the history
…ve cookiecutter Makefile since it's now redundant with tox
  • Loading branch information
JWCook committed Jun 11, 2020
1 parent b57d475 commit 3a7d449
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 61 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pip-log.txt
.coverage
.tox
nosetests.xml
test-reports/

# Translations
*.mo
Expand Down
56 changes: 0 additions & 56 deletions Makefile

This file was deleted.

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[tool.black]
line-length = 100

[tool.coverage.html]
directory = 'test-reports'

[tool.coverage.run]
branch = true
source = ['pyinaturalist']
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
description = Python client for the iNaturalist APIs
long_description = file: README.md, HISTORY.rst
long_description = file: README.rst, HISTORY.rst
keywords = pyinaturalist, iNaturalist
license = MIT license
license_files = LICENSE
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ whitelist_externals = printf
# Run all "code quality" checks: coverage, annotations, and style
[testenv:coverage]
commands =
pytest --basetemp={envtmpdir} --cov={toxinidir}/pyinaturalist
printf '====================\n\n'
pytest --basetemp={envtmpdir} --cov --cov-report=term --cov-report=html
printf '\n\n'

[testenv:mypy]
commands =
mypy --config-file={toxinidir}/setup.cfg .
printf '====================\n\n'
printf '\n\n'

[testenv:style]
commands =
black --check .
printf '====================\n\n'
printf '\n\n'

# Install only minimal dependencies for older interpreters
# pytest==4.6.9 is the latest release that supports python 3.4
Expand Down

0 comments on commit 3a7d449

Please sign in to comment.