Skip to content

Commit bc92149

Browse files
authored
Merge pull request #679 from neutrinoceros/dep/ditch-pytest-cov
TST: use `coverage` directly, ditch `pytest-cov`
2 parents d0a59c9 + e6d4e09 commit bc92149

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

.codecov.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install dependencies
3838
run: |
3939
python -m pip install --upgrade pip
40-
pip install . --group dev
40+
pip install --editable . --group dev
4141
# Uncomment below when ready to deal with a lot of PEP8 formatting changes
4242
# - name: Verify files with pre-commit
4343
# run: |
@@ -52,7 +52,8 @@ jobs:
5252
# pre-commit run --files src/**/*.py
5353
- name: Test with pytest
5454
run: |
55-
pytest tests/pre_3_10 --cov=src --cov-report=xml --splits 3 --group ${{ matrix.group }}
55+
coverage run --source src -m pytest tests/pre_3_10 --splits 3 --group ${{ matrix.group }}
56+
coverage xml
5657
- name: Upload coverage to Codecov
5758
uses: codecov/codecov-action@v3
5859

@@ -73,7 +74,7 @@ jobs:
7374
- name: Install dependencies
7475
run: |
7576
python -m pip install --upgrade pip
76-
pip install . --group dev
77+
pip install --editable . --group dev
7778
# - name: Verify files with pre-commit
7879
# run: |
7980
# # Setup pre-commit hooks
@@ -87,6 +88,7 @@ jobs:
8788
# pre-commit run --files src/vip_hci/objects/*.py
8889
- name: Test with pytest
8990
run: |
90-
pytest tests/post_3_10 --cov=src/vpi_hci/objects/ --cov-report=xml
91+
coverage run --source=src/vip_hci/objects/ -m pytest tests/post_3_10
92+
coverage xml
9193
- name: Upload coverage to Codecov
9294
uses: codecov/codecov-action@v3

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ test:
4949
pre-commit install-hooks
5050
pre-commit install
5151
pre-commit run --files src/**/*.py
52-
pytest --cov=src --cov-report=xml
52+
coverate run -m pytest
53+
coverage xml
5354
rm confi_hist.pdf
5455
rm confi_hist_gaussfit.pdf
5556
rm confidence.txt

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ dependencies = [
4747

4848
[dependency-groups]
4949
dev = [
50+
"coverage>=7.10.0",
5051
"build",
5152
"twine",
5253
"opencv-python",
@@ -55,7 +56,6 @@ dev = [
5556
"myst-parser",
5657
"pandoc",
5758
"pytest",
58-
"pytest-cov ~=2.6.0",
5959
"pytest-split",
6060
"flake8",
6161
"flake8-bandit",

0 commit comments

Comments
 (0)