Skip to content
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ coverage:
project:
default:
target: auto
threshold: 10%
patch:
default:
target: 80%
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
python-version: "3.12"

- name: Run unit tests with coverage
run: poetry run pytest -v tests --ignore tests/integration --cov malariagen_data/anoph --cov-report=xml
run: poetry run pytest -v tests --ignore tests/integration --cov malariagen_data --cov-report=xml

- name: Upload coverage report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
verbose: true
5 changes: 3 additions & 2 deletions tests/anoph/test_snp_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def test_snp_sites_with_virtual_contigs(ag3_sim_api, chrom):
check_snp_sites(api, region=region)

# Extra checks.
region_size = stop - start
region_size = stop - start + 1
pos = api.snp_sites(region=region, field="POS").compute()
assert pos.shape[0] <= region_size
assert np.all(pos >= start)
Expand Down Expand Up @@ -1157,7 +1157,8 @@ def check_snp_allele_counts(
assert ac.shape == (pos.shape[0], 4)
assert np.all(ac >= 0)
an = ac.sum(axis=1)
assert an.max() <= 2 * n_samples
if an.size > 0:
assert an.max() <= 2 * n_samples

# Run again to ensure loading from results cache produces the same result.
ac2 = api.snp_allele_counts(
Expand Down
Loading