diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index e1dfd048..00000000 --- a/.coveragerc +++ /dev/null @@ -1,3 +0,0 @@ -[run] -omit = - virtualizarr/tests/* diff --git a/ci/environment.yml b/ci/environment.yml index b26bb440..08dbf246 100644 --- a/ci/environment.yml +++ b/ci/environment.yml @@ -16,7 +16,7 @@ dependencies: - hdf5plugin - numcodecs # Testing - - codecov + - codecov[toml] - pre-commit - mypy - ruff diff --git a/ci/min-deps.yml b/ci/min-deps.yml index 344a4595..a0a0cf20 100644 --- a/ci/min-deps.yml +++ b/ci/min-deps.yml @@ -13,7 +13,7 @@ dependencies: - ujson - universal_pathlib # Testing - - codecov + - codecov[toml] - pre-commit - mypy - ruff diff --git a/ci/upstream.yml b/ci/upstream.yml index 1e97b165..ed9bf6fa 100644 --- a/ci/upstream.yml +++ b/ci/upstream.yml @@ -16,7 +16,7 @@ dependencies: - numcodecs - imagecodecs>=2024.6.1 # Testing - - codecov + - codecov[toml] - pre-commit - mypy - ruff diff --git a/docs/contributing.md b/docs/contributing.md index c2c5fdbd..4d514780 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -12,10 +12,23 @@ mamba activate virtualizarr-tests pre-commit install # git checkout -b new-feature python -m pip install -e . --no-deps -python -m pytest --run-network-tests +python -m pytest ``` -The `--run-network-tests` argument is optional -- it will run additional tests that require downloading files over the network. Skip this if you want the tests to run faster or you have no internet access. +You may also add the `--run-network-tests` option, which will run additional tests +that require downloading files over the network. Skip this if you want the tests to run +faster or you have no internet access: + +```bash +pytest -m pytest --run-network-tests +``` + +Further, we use the `pytest-cov` plugin to generate a test coverage report. By default, +a report showing lines missing coverage will be printed to the terminal. You may supply +additional options to `pytest` to generate other outputs, such as an HTML report (via +`--cov-report=html`). For all available options added by the `pytest-cov` plugin, run +`python -m pytest -h`, or see the +[pytest-cov documentation](https://pytest-cov.readthedocs.io/en/latest/readme.html). ## Contributing documentation diff --git a/pyproject.toml b/pyproject.toml index 8d638da6..3039a511 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,9 @@ line-ending = "auto" [tool.ruff.lint.isort] known-first-party = ["virtualizarr"] +[tool.coverage.run] +omit = ["virtualizarr/tests/*"] + [tool.pytest.ini_options] addopts = [ "--cov=virtualizarr",