Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file-specific test coverage #2540

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: pip list
- name: Run pytest checks
run: |
pytest --cov --cov-report=xml
pytest --cov=torchgeo --cov-report=xml
python3 -m torchgeo --help
- name: Report coverage
uses: codecov/[email protected]
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: pip list
- name: Run pytest checks
run: |
pytest --cov --cov-report=xml
pytest --cov=torchgeo --cov-report=xml
python3 -m torchgeo --help
- name: Report coverage
uses: codecov/[email protected]
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
run: pip list
- name: Run pytest checks
run: |
pytest --cov --cov-report=xml
pytest --cov=torchgeo --cov-report=xml
python3 -m torchgeo --help
- name: Report coverage
uses: codecov/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion docs/user/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ For example, if you add a new dataset in ``torchgeo/datasets/foo.py``, you'll ne

.. code-block:: console

$ pytest --cov=torchgeo.datasets.foo tests/datasets/test_foo.py
$ pytest --cov=torchgeo.datasets tests/datasets/test_foo.py
========================= test session starts =========================
platform darwin -- Python 3.10.11, pytest-6.2.4, py-1.9.0, pluggy-0.13.0
rootdir: ~/torchgeo, configfile: pyproject.toml
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ exclude_also = [
]
show_missing = true

[tool.coverage.run]
source_pkgs = ["torchgeo"]

# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
# Import discovery
Expand Down