-
Notifications
You must be signed in to change notification settings - Fork 100
chore: Use tox-uv and uv.lock to test minimum, locked, and pre-release dependencies #1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1229 +/- ##
==========================================
- Coverage 89.90% 89.86% -0.04%
==========================================
Files 29 29
Lines 4379 4383 +4
Branches 725 725
==========================================
+ Hits 3937 3939 +2
- Misses 293 295 +2
Partials 149 149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is great stuff Chris, thank you! My only question is, moving forward, is there anything that we (devs) have to change in our setups? We also tried to use Python version matrices in our CircleCI but had issues with conda. Do you think this approach would make it easier to implement this idea we had to abandon? |
I think you shouldn't need to change anything. Do you want to show me what you tried with the version matrices, and I can see if it'll be any easier now? |
You can see the changes we reverted in #1202. We thought the matrices were going to work fine but ended up having to go back to the current configuration. |
I see. Not sure I've got it in me to play with a new workflow syntax. But I'll see if I can use uv instead of conda, at least. Test failures seem to be related to an OSF error causing 403 responses. |
We've had these before. We usually just rerun the ones that failed. |
9f6cf85
to
d1f63e8
Compare
Okay, I've updated CircleCI. I think this is more-or-less usable right now, but I realize that introducing new maintenance tools is a bit like giving someone a hot potato, so I'm happy to jump on a call to talk this over with people. At the very least, hopefully this is a demo of an overall approach, and you can adapt it to suit your needs. I won't be offended if you close this PR. |
I think the easiest would be that you join our next devs meeting on June 19th. Unless it conflicts with OHBM. |
I should be around then. I'm not going to make it to OHBM this year. |
Since this has been sitting for a while and it should improve things for dependent tools like AFNI and fMRIPrep, I think we should just move forward with this- i.e., address the conflicts and merge. It doesn't sound like it should impact our maintenance activities, and if something comes up we can always ask @effigies. @handwerkerd, @eurunuela WDYT? |
cef5640
to
4713b8b
Compare
Looks like nilearn/nilearn#5585 broke things here and in mapca, so had to put in a pin. |
Sounds good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
I'm running this locally and some tests are failing in my python=3.13 and As for the PR in general, one thing that confuses me about the change, is if there's anything developers would need to do differently to interact with the code. If so, that information should be added to here: https://github.com/ME-ICA/tedana/blob/main/CONTRIBUTING.md |
My goal here was strictly to allow CI to better stick to capped dependencies without having to put them in I don't think |
Plan from today's devs call:
|
=== Do not change lines below === { "chain": [], "cmd": "uv lock --upgrade", "exit": 0, "extra_inputs": [], "inputs": [ "pyproject.toml" ], "outputs": [ "uv.lock" ], "pwd": "." } ^^^ Do not change lines above ^^^
Quick question: Do you actually want the pre-release checks? The idea there is that you can see failures coming down the pipeline, but it may be annoying to get red checks because numpy releases something breaking and you don't have time to deal with it yet. I can see a few options:
|
This is just for pre-release versions of dependencies, right? I'm fine with just testing new regular releases, like we currently have with dependabot. Am I understanding your question correctly? |
Yes. I can just drop them. |
@effigies thanks for dealing with the merge conflicts. Is this ready to merge? |
Yes |
My goal is to remove dependency caps, which lead to very fragile environment resolutions. I understand that the purpose of these caps is to ensure that regressions can be localized to changes in specific dependencies, so this PR uses uv lockfiles to address that.
uv lock [--upgrade]
inspects PyPI and finds the latest versions of tools that successfully satisfy the environment described bypyproject.toml
, including optional dependencies. You can checkout the repository and get the same environment as anybody else withuv sync
.This PR also uses
tox-uv
to create environmentspy<ver>-{min,latest,pre}
.py*-min
attempts to install the minimum versions that are declared inpyproject.toml
into an environment that created with the declared Python version.py*-latest
will useuv sync
to setup the environment, whilepy*-pre
will look for pre-release versions of dependencies, so that you can catch breakages coming down the line.It also sets the dependabot environment to
uv
, to auto-update youruv.lock
file, and sets up a GitHub action to run tox, as a demonstration. If this looks like a good approach, I'll figure out how to replace your conda environments in CircleCI withuv sync
-based ones.Addresses #1185.