Skip to content

Commit

Permalink
Migrate coverage configurations to pyproject.toml (#667)
Browse files Browse the repository at this point in the history
This PR migrates the `coverage` configurations from `.coveragerc` to `pyproject.toml`. 

Coverage configurations: https://coverage.readthedocs.io/en/latest/config.html
  • Loading branch information
seisman authored Nov 16, 2020
1 parent ec4ce2f commit 2ee9b34
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
5 changes: 0 additions & 5 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build, package, test, and clean
PROJECT=pygmt
TESTDIR=tmp-test-dir-with-unique-name
PYTEST_ARGS=--cov=$(PROJECT) --cov-config=../.coveragerc \
PYTEST_ARGS=--cov=$(PROJECT) --cov-config=../pyproject.toml \
--cov-report=term-missing --cov-report=xml --cov-report=html \
--doctest-modules -v --mpl --mpl-results-path=results \
--pyargs ${PYTEST_EXTRA}
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- pytest
- pytest-cov
- pytest-mpl
- coverage
- coverage[toml]
- black
- blackdoc
- pylint
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tool.coverage.run]
omit = ["*/tests/*", "*/_version.py", "*pygmt/__init__.py"]
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jupyter
pytest
pytest-cov
pytest-mpl
coverage
coverage[toml]
black
blackdoc
pylint
Expand Down

0 comments on commit 2ee9b34

Please sign in to comment.