From 961b3c36f4a274dc45fa406409c6de6fae24f8ec Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Mon, 23 Feb 2026 10:36:00 +0000 Subject: [PATCH 1/2] Rename codecov.yml --- .codecov.yml => codecov.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .codecov.yml => codecov.yml (100%) diff --git a/.codecov.yml b/codecov.yml similarity index 100% rename from .codecov.yml rename to codecov.yml From 6c4d60f2adab2ef62975783630b49dcf1807041c Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Mon, 23 Feb 2026 10:48:48 +0000 Subject: [PATCH 2/2] Update codecov config --- .github/workflows/tests.yml | 32 ++++++++++++++------------------ codecov.yml | 10 ++++++++-- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ef93699be2..1c0f91ae30 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,7 @@ jobs: name: Python-C tests uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@main with: + tests: python/tests/test_python_c.py python/tests/test_dict_encoding.py pyproject-directory: python secrets: inherit @@ -75,15 +76,7 @@ jobs: - name: Install dependencies working-directory: python - run: | - uv sync --locked --group test - # Remove tskit installed as a dep of msprime - uv pip uninstall tskit - - - name: Build module - working-directory: python - run: | - uv run python setup.py build_ext --inplace + run: uv sync --locked --group test - name: Minidom test working-directory: python @@ -93,9 +86,10 @@ jobs: uv run python -c "import tskit;tskit.Tree.generate_star(5).tree_sequence.draw_svg(path='test.svg')" - name: Run JIT code coverage - working-directory: python run: | - NUMBA_DISABLE_JIT=1 uv run pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 tests/test_jit.py + NUMBA_DISABLE_JIT=1 uv run --project=python \ + pytest --cov=tskit --cov-report=xml --cov-branch -n2 \ + python/tests/test_jit.py - name: Upload coverage to Codecov uses: codecov/codecov-action@v5.5.2 @@ -103,27 +97,29 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} working-directory: python fail_ci_if_error: false - flags: python-tests-no-jit - name: codecov-umbrella + files: coverage.xml + disable_search: true verbose: true + flags: python-tests-no-jit - name: Run tests - working-directory: python run: | if [[ "${{ matrix.os }}" == "windows-latest" ]]; then - uv run pytest -x --skip-slow --cov=tskit --cov-report=xml --cov-branch -n2 --durations=20 tests + uv run --project=python \ + pytest --cov=tskit --skip-slow --cov-report=xml --cov-branch -n2 python/tests else - uv run pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 --durations=20 tests + uv run --project=python \ + pytest --cov=tskit --cov-report=xml --cov-branch -n2 python/tests fi - name: Upload coverage to Codecov uses: codecov/codecov-action@v5.5.2 with: token: ${{ secrets.CODECOV_TOKEN }} - working-directory: python fail_ci_if_error: false flags: python-tests - gcov_args: --preserve-paths + files: coverage.xml + disable_search: true verbose: true msys2: diff --git a/codecov.yml b/codecov.yml index 9b33b3d056..662bcb2b7f 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,12 +1,17 @@ # ignore: # - "lib/tests/" -# - "lib/dev-tools/" -# - "lib/avl.c" # - "lib/subprojects/**/*" +codecov: + require_ci_to_pass: false + comment: layout: "header, diff, flags, components" # show component info in the PR comment +# fixes: +# - "tskit/::python/tskit/" +# - "^_tskitmodule.*::python/_tskitmodule.*" + component_management: individual_components: - component_id: python_code @@ -18,6 +23,7 @@ component_management: name: Python C interface paths: - python/_tskitmodule.c + - python/lwt_interface/tskit_lwt_interface.h - component_id: c_code name: C library