moving ci to uv + docs - #1872
andrewkern wants to merge 4 commits into
Conversation
|
tests are failing... working on it |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1872 +/- ##
==========================================
+ Coverage 99.82% 99.84% +0.01%
==========================================
Files 143 143
Lines 5039 5039
Branches 518 518
==========================================
+ Hits 5030 5031 +1
+ Misses 6 5 -1
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| # Install the local package so that stdpopsim is in the path, | ||
| # which is needed for generating docs `command-output`. | ||
| python -m pip install . | ||
| - name: Install docs deps |
There was a problem hiding this comment.
my understanding of how uv works would be that this isn't necessary? but that's a poor understanding, so maybe it is?
There was a problem hiding this comment.
oh I see: is this letting us see failures in installation separate from running things?
There was a problem hiding this comment.
Right, uv run would do it on demand. The separate step keeps install failures out of the docs build log and checks the lockfile. Added a comment.
| - name: Install lint deps | ||
| run: uv sync --locked --only-group lint | ||
|
|
||
| - name: Cache pre-commit hook environments |
There was a problem hiding this comment.
yep but different caches. setup-uv caches Python packages. pre-commit builds its own environment per hook (blech), and that is what this caches. Added a comment.
| # SLiM is not a Python package, so it is built from source below. | ||
| # Only the binary is cached, keyed on the runner and SLIM_CACHE_NUM. |
There was a problem hiding this comment.
It is a python package, on conda; but we need to build it from github head for now. (So we plan to comment this out at the next SLiM release.)
I don't see how only the binary is cached? but I don't know at all how the cacheing works.
There was a problem hiding this comment.
Good catch. I meant that SLiM is not on PyPI, so it cannot come from uv.lock.
for the cache: the path for the cache step is SLiM/Release/slim*, so only the built binary is saved and restored, not the whole build tree.
Rather than commenting the build step out at the next SLiM release, this is built as a switch. There is a SLIM_VERSION variable at the top of the workflow. Empty means build from github. Set it to a released version, e.g. "5.2", and the workflow installs that release from conda-forge with micromamba instead of building. I tested both paths across the the different OSs and it passes with either.
| Setuptools_scm will detect the version appopriately. | ||
| 4. Upload to PyPI: `twine upload dist/{version just tagged}.tar.gz` | ||
| Then check out `upstream/main` and build the release sdist and wheel | ||
| with `uv build`. |
There was a problem hiding this comment.
We should add the instructions for testing things out on TestPyPI here - see the tskit dev docs on this.
There was a problem hiding this comment.
Added. I followed the tskit-dev release language/process. take a look
closes #1865
this PR aims to move the CI infra over to
uvfollowing the example oftskit:pyproject.tomlnow holds all metadatarequirements/directory is gone. Dev tools live in dependency groups: test, docs, lint, maintenance, and dev (all of them). Plain uv sync installs dev.docs/development.rstnow describes the uv workflowNote: I haven't tried the windows SLiM build or the macOS runner. This PR should test them.