diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 6d478d53..00000000 --- a/.codecov.yml +++ /dev/null @@ -1,10 +0,0 @@ -coverage: - status: - patch: false - range: 50..70 - round: nearest - precision: 2 - -ignore: - - tests/* - - src/vip_hci/vip_ds9.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d970a930..ccf4b1a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install . --group dev + pip install --editable . --group dev # Uncomment below when ready to deal with a lot of PEP8 formatting changes # - name: Verify files with pre-commit # run: | @@ -52,7 +52,8 @@ jobs: # pre-commit run --files src/**/*.py - name: Test with pytest run: | - pytest tests/pre_3_10 --cov=src --cov-report=xml --splits 3 --group ${{ matrix.group }} + coverage run --source src -m pytest tests/pre_3_10 --splits 3 --group ${{ matrix.group }} + coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 @@ -73,7 +74,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install . --group dev + pip install --editable . --group dev # - name: Verify files with pre-commit # run: | # # Setup pre-commit hooks @@ -87,6 +88,7 @@ jobs: # pre-commit run --files src/vip_hci/objects/*.py - name: Test with pytest run: | - pytest tests/post_3_10 --cov=src/vpi_hci/objects/ --cov-report=xml + coverage run --source=src/vip_hci/objects/ -m pytest tests/post_3_10 + coverage xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 diff --git a/Makefile b/Makefile index 8f412811..c93fba37 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,8 @@ test: pre-commit install-hooks pre-commit install pre-commit run --files src/**/*.py - pytest --cov=src --cov-report=xml + coverate run -m pytest + coverage xml rm confi_hist.pdf rm confi_hist_gaussfit.pdf rm confidence.txt diff --git a/pyproject.toml b/pyproject.toml index 4ffc5dd2..9bb55c76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,7 @@ dependencies = [ [dependency-groups] dev = [ + "coverage>=7.10.0", "build", "twine", "opencv-python", @@ -55,7 +56,6 @@ dev = [ "myst-parser", "pandoc", "pytest", - "pytest-cov ~=2.6.0", "pytest-split", "flake8", "flake8-bandit",