diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 9a0c535dcf5..00000000000 --- a/.coveragerc +++ /dev/null @@ -1,5 +0,0 @@ -[run] -omit = - */tests/* - */_version.py - *pygmt/__init__.py diff --git a/Makefile b/Makefile index 9f5fdd40e6b..54fa7d9dccd 100644 --- a/Makefile +++ b/Makefile @@ -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} diff --git a/environment.yml b/environment.yml index 4a8e69abf92..fec3dbaaebf 100644 --- a/environment.yml +++ b/environment.yml @@ -17,7 +17,7 @@ dependencies: - pytest - pytest-cov - pytest-mpl - - coverage + - coverage[toml] - black - blackdoc - pylint diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000000..334fb0a9922 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.coverage.run] +omit = ["*/tests/*", "*/_version.py", "*pygmt/__init__.py"] diff --git a/requirements-dev.txt b/requirements-dev.txt index f6a53ef0310..fc05772b072 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,7 +5,7 @@ jupyter pytest pytest-cov pytest-mpl -coverage +coverage[toml] black blackdoc pylint