Skip to content

Commit

Permalink
update coverage config
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Jun 12, 2024
1 parent 279ccea commit ce03bfa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sonar-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
python3 -m pip install .[dev]
install-nplinker-deps --run-on-github
- name: Run unit tests with coverage
run: pytest --cov --cov-report term --cov-report xml tests/unit
run: pytest --cov=nplinker --cov-report=xml tests/unit
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ clean-pyc:
find . -name '*_cache' -exec rm -fr {} +

clean-test:
rm -f .coverage
rm -f .coverage*
rm -f coverage.xml

build: clean
python -m build
Expand Down
15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,20 @@ testpaths = ["tests/unit"]
[tool.coverage.run]
branch = true
source = ["src"]
command_line = "-m pytest"

[tool.coverage.report]
omit = [
"src/nplinker/class_info/*",
"src/nplinker/data/*",
"src/nplinker/genomics/aa_pred.py",
"src/nplinker/parsers/*",
"src/nplinker/scoring/iokr/*",
"src/nplinker/scoring/rosetta/*",
"src/nplinker/scoring/np_class_scoring.py",
"src/nplinker/scoring/rosetta_scoring.py",
"src/nplinker/spec_clustering.py",
"src/nplinker/pickler.py"
]

# Mypy: to check static type
# see https://mypy.readthedocs.io/en/stable/config_file.html#example-pyproject-toml
Expand Down

0 comments on commit ce03bfa

Please sign in to comment.