Skip to content

Commit

Permalink
fix coverage (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
jla-gardner authored Jul 17, 2024
1 parent 359bdf2 commit 61fbaad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Useful info
run: pip freeze
- name: Run tests
run: pytest --cov src --cov-report xml
run: pytest --cov --cov-report xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
# only upload coverage reports for the first python version
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ exclude_also = [
"if __name__ == '__main__':",
]

# allow for coverage to find relevant files in both src/ and */site-packages
# so that we can install the package both normally and in editable mode, and
# still get coverage for both cases using `pytest --cov`
[tool.coverage.paths]
source = ["src", "*/site-packages"]

[tool.coverage.run]
branch = true
source = ["graph_pes"]

[tool.pytest.ini_options]
# ignore all warnings coming from the pytorch_lightning package
filterwarnings = [
Expand Down

0 comments on commit 61fbaad

Please sign in to comment.