Skip to content

ci(optional): stop uv run from reinstalling the removed dependencies - #2823

Draft
jdhughes-dev wants to merge 1 commit into
modflowpy:developfrom
jdhughes-dev:fix-optional-workflow
Draft

ci(optional): stop uv run from reinstalling the removed dependencies#2823
jdhughes-dev wants to merge 1 commit into
modflowpy:developfrom
jdhughes-dev:fix-optional-workflow

Conversation

@jdhughes-dev

Copy link
Copy Markdown
Contributor

uv run re-syncs the project before running the command, which undoes both the
uv sync --only-group test install and the random uv pip uninstall that precede it. Both
matrix variants therefore run the full suite with every optional dependency present, so the
workflow has not been testing the absence of any of them.

Evidence from the 22 Aug run (32562777097):
the no optional dependencies job logs optional packages: affine-3.0.0, ..., h5py-3.16.0, ..., pymetis-2025.2.2, ... and passes test_model_splitter.py::test_multi_model, which requires pymetis.

  • run pytest with --no-sync so the environment the preceding steps built is the one used
  • add a workflow_dispatch trigger so the workflow can be run on demand

Opened as a draft: once the constraint is actually enforced this may surface tests that do not
degrade gracefully, which is the point of the workflow, but I cannot exercise it from a branch —
workflow_dispatch only appears once the trigger is on the default branch.

uv run re-syncs the project before it runs the command, which undoes both the
--only-group test install and the random uninstall that precede it. Both matrix
variants therefore run the full test suite with every optional dependency present,
and the workflow has not been testing the absence of any of them. In the 22 Aug run
the no optional dependencies job reported all 21 optional packages installed and
passed tests that require pymetis.

Run pytest with --no-sync so the environment the steps built is the one used, and
add a workflow_dispatch trigger so the workflow can be run on demand.
@jdhughes-dev
jdhughes-dev requested review from jlarsen-usgs and wpbonelli and removed request for jlarsen-usgs August 23, 2026 05:46
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.3%. Comparing base (556c088) to head (e2ccae5).
⚠️ Report is 209 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2823      +/-   ##
===========================================
+ Coverage     55.5%    73.3%   +17.8%     
===========================================
  Files          644      659      +15     
  Lines       124135   132188    +8053     
===========================================
+ Hits         68947    97013   +28066     
+ Misses       55188    35175   -20013     

see 585 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant