Skip to content

Conversation

@neutrinoceros
Copy link
Member

@neutrinoceros neutrinoceros commented Oct 20, 2025

PR Summary

This is the first step towards #5310. I'm not adding a lock file yet, but I'm migrating existing CI to use uv instead of pip. From there, adding the lockfile will be a formality.
update 2025-11-23: I expanded the scope of the PR, now I don't expect follow ups to be needed.
Close #5310

The one piece that's missing from the PR is automated updates for the lock file. Since Dependabot doesn't support uv.lock at the moment, I can't do this bit in PR, but I am experimenting with Mend.io's Renovate and plan to use it in the future here.
update 2025/12/01: I was wrong. Dependabot already has support for uv.lock. I included the relevant piece of configuration.

PR Checklist

  • New features are documented, with docstrings and narrative docs
  • Adds a test for any bugs fixed. Adds tests for new features.

@neutrinoceros neutrinoceros added tests: running tests Issues with the test setup refactor improve readability, maintainability, modularity labels Oct 20, 2025
@neutrinoceros
Copy link
Member Author

bleeding-edge failures are unrelated, see yt-project/unyt#599

@neutrinoceros neutrinoceros force-pushed the tst/locked-ci branch 5 times, most recently from b073b25 to eff6b4a Compare October 21, 2025 08:47
@neutrinoceros
Copy link
Member Author

I'm struggling to adapt the sdist test.
@yut23 do you have any clue what I'm doing wrong ?

@neutrinoceros neutrinoceros force-pushed the tst/locked-ci branch 6 times, most recently from 60567d4 to 7fe4846 Compare October 30, 2025 19:05
@neutrinoceros neutrinoceros marked this pull request as ready for review October 30, 2025 20:02
shell: bash
run: |
python -m pip install --no-build-isolation .
enable-cache: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a particular reason to not enable the cache?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually want to enable it in a dedicated PR, but that requires a bit of fiddling to do it right, so it's simpler to just preserve the existing no-cache strategy for now.
It also works best in the presence of a lock file, which is why I'm not bothering with it right now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update: I added a lock file + caching everywhere except in a couple strategic places

  • bleeding-edge CI: cache would rot too quickly to be worth anything
  • wheels: using a cache for publishing creates a risk of a supply-chain attack via cache poisoning

@neutrinoceros neutrinoceros force-pushed the tst/locked-ci branch 2 times, most recently from 18b3a02 to d1164ab Compare November 22, 2025 16:46
@neutrinoceros neutrinoceros marked this pull request as draft November 22, 2025 16:50
@neutrinoceros neutrinoceros force-pushed the tst/locked-ci branch 4 times, most recently from 362edd3 to 0b31d2b Compare November 22, 2025 18:24

- name: Install and patch nosetest
if: matrix.test-runner == 'nose'
# note: this could be handled with [tool.uv.sources]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to add to this comment: the idea is we could host a fork of nose within our org, apply this patch, and use the fork as the source instead of PyPI. This would only work with uv but would arguably less of a hack. Or we could also try to use nose2 ...

@neutrinoceros neutrinoceros added the infrastructure Related to CI, versioning, websites, organizational issues, etc label Nov 23, 2025
@neutrinoceros
Copy link
Member Author

pre-commit.ci run

1 similar comment
@neutrinoceros
Copy link
Member Author

pre-commit.ci run

@neutrinoceros neutrinoceros force-pushed the tst/locked-ci branch 3 times, most recently from 1e29d20 to 640283c Compare November 23, 2025 11:20
@neutrinoceros neutrinoceros added this to the 4.5.0 milestone Nov 23, 2025
@neutrinoceros neutrinoceros marked this pull request as ready for review November 23, 2025 12:49
@neutrinoceros neutrinoceros force-pushed the tst/locked-ci branch 6 times, most recently from cf24d3c to e625503 Compare November 23, 2025 15:45
Copy link
Contributor

@chrishavlin chrishavlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just did a quick read through to keep up with changes on this PR -- hoping to have some time to do a more thorough read next week. but left one minor comment :)

pyproject.toml Outdated
"sphinx-bootstrap-theme>=0.8.1",
"sphinx-rtd-theme>=1.3.0",
]
geophysics = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd replace geophysics with something more general and mapping-related since cartopy is used purely for 2d plotting and the term "geophysics" has broader meaning. Maybe just mapping ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. Done.

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

Labels

dependencies Pull requests that update a dependency file infrastructure Related to CI, versioning, websites, organizational issues, etc refactor improve readability, maintainability, modularity tests: running tests Issues with the test setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: Locked CI ?

2 participants