Move most CI from mamba to uv - #860
Conversation
The conda layer had become vestigial: the environment files only listed
packages that also ship PyPI wheels, and every job then ran
`pip install -e ".[dev]"` on top anyway. pytables was the last dependency
that genuinely needed conda, and it is no longer used.
Replaces .github/actions/mamba-install-dascore with an install-dascore
action built on setup-python + setup-uv. A single conda job (conda_env in
runtests.yml) is kept because DASCore ships on conda-forge and that install
path deserves a smoke test.
Dependency caching is deliberately off. The mamba environment caches filled
7 GB of the repo's 10 GB budget and kept evicting the test-data cache, while
a cold uv install of [dev] is ~15s. runtests.yml records what to do if we
want caching back later.
Quarto executes the {python} cells in docs/*.qmd through jupyter, which was
only ever supplied by doc_environment.yml, so the docs extra now declares
ipykernel, jupyter-client, nbclient and nbformat.
Also deletes .github/test_condarc.yml, which nothing referenced.
- Add pyyaml to the docs extra. Quarto's own notebook driver does `from yaml import safe_load`, and `[docs]` alone resolved without it; the doc builds only worked because [dev] pulls pyyaml in transitively through pre-commit. - Add environment.yml to runtests.yml's paths filter. The conda_env job exists to guard that file, but a PR touching only it triggered no run. - Install [test] rather than [dev] in conda_env, so pip does not layer ~30 PyPI distributions over the environment being checked. - Compare python versions component-wise and strip the free-threaded suffix, so a caller may pin '3.14.2' or '3.14t' without a false failure. - Tell contributors using uv to run `uv pip install`; a uv virtual environment has no pip of its own, so a bare `pip install` silently installs into whatever is next on PATH.
|
Warning Review limit reached
Next review available in: 14 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds a shared uv-based DASCore installer, migrates most workflows from Conda, keeps one Conda smoke-test job, standardizes Bash usage, updates publishing, documents uv development setup, expands documentation dependencies, and changes HTTP test fixtures to avoid reverse DNS lookups. ChangesCI installation migration
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #860 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 176 176
Lines 19372 19275 -97
=========================================
- Hits 19372 19275 -97
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
HTTPServer.server_bind calls socket.getfqdn(host) only to populate server_name. On the macOS runner that lookup for 127.0.0.1 blocks past the 30s pytest-timeout, so every test drawing on a served fixture failed during setup. It surfaced when CI moved to setup-python's macOS framework build, but the lookup was never wanted: nothing reads server_name. Bind through TCPServer and fill server_name/server_port in directly.
The re-enable recipe lives in the PR description; the workflow only needs to say why caching is off and where to look.
|
✅ Documentation built: |
Description
Moves most of CI from micromamba to uv, keeping a single conda job.
The conda layer had become vestigial. The environment files only listed packages that also ship PyPI wheels, and every job then ran
pip install -e ".[dev]"on top anyway, so the conda solve was buying nothing.pytableswas the last dependency that genuinely needed conda, and it is no longer used anywhere indascore/ortests/.tkis not needed either, since the test workflows forceMPLBACKEND=Agg.Why now
The Actions cache budget was the real motivator. Before this change the repo sat at 10.42 GB against the 10 GB limit, of which the mamba environment caches were 7.03 GB across 23 entries (one per os × python × env-file × week, 250–590 MB each). That is what kept evicting the test-data cache.
Install time improves too, most visibly on Windows:
The uv column is the
install-dascorestep across the threetest_codePython versions in run 31483746055, with caching off, so these are cold installs against warm-cache mamba numbers. One outlier:test_code (windows-latest, 3.12)took 153 s in that run while 3.13 and 3.14 took 55 s and 59 s.The other jobs land in the same range — min-deps installs at 12–14 s (ubuntu), 10–15 s (macOS) and 32–35 s (windows), and network_tests at 13 s (ubuntu) and 28 s (macOS). The one retained conda job (
conda_env) spends 29 s in mamba-install-dascore.What changed
.github/actions/install-dascore(setup-python + setup-uv +uv pip install --system) replaces.github/actions/mamba-install-dascorein every workflow except one.conda_envinruntests.yml, ubuntu + default python). DASCore ships on conda-forge, so that install path still deserves a smoke test. At one (os, python) it costs a single ~530 MB cache per week instead of ~15.upload_pypi.ymlno longer solves a whole conda environment just to reachpython -m build..github/doc_environment.yml,.github/min_deps_environment.yml, and.github/test_condarc.yml(the last of which nothing referenced).docsextra now declaresipykernel,jupyter-client,nbclient, andnbformat. Quarto executes the{python}cells indocs/*.qmdthrough jupyter, and that was only ever supplied bydoc_environment.yml— without this the doc build breaks.profile.ymlinstalls[profile,extras]rather than[profile]. The IO benchmarks suppressDependencyError, so a format whose optional dependency is missing is silently not benchmarked;environment.ymlused to supply xarray/findiff on top of[profile]. Note this widens benchmark coverage, so CodSpeed will want a fresh baseline on dev.Caching is deliberately off
Not an oversight —
setup-uv's default cache prunes withuv cache prune --ci, which drops the downloaded wheels. Measured: it shrinks the cache from 874 MB to 73 MB, saves only ~1.7 s of a ~13 s install, and an offline install from a pruned cache fails outright, so it does not even buy resilience to a PyPI blip.UV_HTTP_RETRIES=5addresses that directly instead, at no cache cost.If we want caching later,
runtests.ymlcarries a comment with the recipe:enable-cache: trueplusprune-cache: false(~240 MB compressed per os/python), and a stable key — notsetup-uv's defaultcache-dependency-glob, which hashespyproject.toml. That file changes on nearly every reader PR since each new format adds an entry point, and caches are ref-scoped, so the default would mint a fresh copy of every matrix entry per PR. Probably worth revisiting once dev lands on master and there are fewer matrices in flight.Verification
uv pip compile --extra dev --no-buildresolves to pure wheels for all 12 combinations of python 3.11–3.14 × {manylinux_2_28, windows-msvc, macos-arm64}. Nothing in the dependency set needs a source build on the runners.python scripts/build_api_docs.pyruns clean in a uv-only venv (1116 files, 3526 links, 0 bad), and quarto executes{python}cells against it. A full localquarto render docswas still in progress at the time of opening; thedocumentationlabel is set so CI builds the docs here, which is the authoritative check.pre-commit run --allpasses, including actionlint and zizmor.test_free_threaded.ymlandtest_wasm.ymlare untouched — they were already pip-based, not mamba-based.Review fixes (second commit)
Worth calling out because two were latent bugs rather than polish:
docsextra. Quarto's own notebook driver doesfrom yaml import safe_load, and[docs]resolved without it. The doc builds only worked because[dev]pulls pyyaml in transitively viapre-commit— sopip install dascore[docs] && quarto render docswould have failed, and dropping pre-commit from[test]would have broken all three doc workflows.environment.ymlwas not inruntests.yml's paths filter, so a PR editing only that file would not have run the very job added to guard it.conda_envinstalls[test]rather than the[dev]default, so pip does not layer ~30 PyPI distributions over the environment being checked.3.14.2or3.14twithout a spurious failure.uv pip install; a uv venv has nopipof its own, so a barepip installwould silently install into whatever is next onPATH.Follow-ups, not done here
environment.ymlis missing three of dascore's required deps (packaging,rich,universal-pathlib), which pip supplies from PyPI. Adding them would make the conda job a truer test of the conda stack, but it risks the one remaining conda solve and is better done on its own.Changelog
none
Checklist
I have (if applicable):
Summary by CodeRabbit
New Features
uv.Documentation
uvenvironments.Bug Fixes