TST: have oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct#16963
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
oldestdeps trully pin every direct dependency using uv's --resolution=lowest-directoldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960)
587067a to
9a8a900
Compare
oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960)oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960 and #16973)
oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960 and #16973)oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960, #16973, #16975)
oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960, #16973, #16975)oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960, #16973)
00ea425 to
f50d557
Compare
oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16960, #16973)oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16973)
09b207b to
d076b9c
Compare
9adc1cb to
2aa7707
Compare
oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct (⏰ wait for #16973)oldestdeps trully pin every direct dependency using uv's --resolution=lowest-direct
mhvk
left a comment
There was a problem hiding this comment.
Not sure that I know enough to review, but it seems sensibe.
One suggestion: if we think regular tox should continue to work (which seems a good idea to me), we should have at least some runs in CI that use it, i.e., omit the toxdeps: tox-uv in some/most cases.
Also, if things will not work for oldestdeps, the help line for that should mention it.
Aside, I assume that something like oldestdeps: tox-uv in tox.ini is not going to be good enough, right? It would come too late, presumably.
p.s. Things like pip freeze, which is done inside tox.ini, are OK with uv?
pyproject.toml
Outdated
| ] | ||
| dev_all = [ | ||
| "tox", | ||
| "tox-uv>=1.11.3", |
There was a problem hiding this comment.
Doesn't tox-uv depend on tox, i.e., can we remove the line above?
There was a problem hiding this comment.
yes, tox-uv depends on tox, but I'd rather keep all direct dependencies explicit: doing otherwise defeats the purpose of --resolution=lowest-direct (even though in this specific case it doesn't really matter). Instead, I'd like to actually give some lower bound to what version of tox we need.
Yes, that was the initial plan, and I amended it because there were some hard-coded
good call.
yeah unfortunately it doesn't work (already tried). I also made an attempt at implementing a way to crash
That was the point of #16973 and #16975: tox has native substitution mechanisms and |
a33f3b7 to
55ef392
Compare
tox.ini
Outdated
| devdeps: UV_EXTRA_INDEX_URL = https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple | ||
| mpldev: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple | ||
| mpldev: UV_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple |
There was a problem hiding this comment.
Why do we need UV_EXTRA_INDEX_URL that would only affect dev jobs, not oldestdeps?
There was a problem hiding this comment.
Because of how tox-uv is enabled by mere installation, so, even if it doesn't happen in CI, this is needed to allow running dev deps jobs locally if tox-uv is installed.
|
rebased following #17675 |
|
Indeed the bump is causing a regression. Reported as #17681 |
700764a to
2fde9d1
Compare
|
rebased to fix a conflict with #17711 |
2fde9d1 to
c22fe66
Compare
|
This is back to a stable state. Anyone up to bite the bullet ? |
|
I think it is time we make a decision.
I see there are already 2 approvals. Should we merge soon or are there some remaining concerns that would be blockers? |
Cadair
left a comment
There was a problem hiding this comment.
I am still +0 on this, mainly because there's no way to not use uv for some tox factors and I am not a massive fan of having substantially more limited testing using pip which is what the majority of our users will be using.
I will also point out that "use uv or not have one source of truth" isn't strictly a fair comparison as minimum_dependancies exists and works well without using uv.
tox.ini
Outdated
| devdeps: UV_INDEX_STRATEGY = unsafe-best-match # match pip's behavior | ||
| mpldev: UV_INDEX = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple | ||
| mpldev: UV_INDEX_STRATEGY = unsafe-best-match # match pip's behavior |
There was a problem hiding this comment.
| devdeps: UV_INDEX_STRATEGY = unsafe-best-match # match pip's behavior | |
| mpldev: UV_INDEX = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple | |
| mpldev: UV_INDEX_STRATEGY = unsafe-best-match # match pip's behavior | |
| devdeps, mpldev: UV_INDEX_STRATEGY = unsafe-best-match # match pip's behavior | |
| mpldev: UV_INDEX = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple |
There was a problem hiding this comment.
thanks ! done in a slightly different order so that both UV_INDEX lines sit next to each other.
c22fe66 to
7da18bb
Compare
Fair point. Although this tool doesn't work out of the box for this case1, we can always fix it and switch if we encounter issues with uv/tox-uv. Footnotes
|
Yes this is a pain (OpenAstronomy/minimum_dependencies#30) but it's not the end of the world to list all the extras. |
sure, but then you're back to not having a single source of truth 🙃 |
Well you have a source of truth for the deps, if not all the extras. 🤷 It's a bug which should be fixed, but it's in the deps parsing code in some other library and is generally hard to unravel. |
|
I am officially bored of this conversation. |
@neutrinoceros - now that this PR is merged, I noticed that my workflow of is indeed broken (as expected). However, your statement that I could just do |
|
I am sure others might run into the same problem, so let's move follow-up discussions to the issue below. Thanks! |
Description
Based of #16960 #16973, close #16950, close #15865.I should highlight that, even though this goes beyond the scope initially discussed for #16950 (restricting the use of uv to the.oldestdepsfactor), this is actually a minimal change: setting tox to usepipORuvinternally, depending on env factors, would require additional work and I should note that I already tried and couldn't figure it out)update: fixed it. Now an tox will continue to work without tox-uv for except for
oldestdeps.gains:
pyproject.toml)costs:
tox-uvis now required to runtoxIt's a one-time install burden; once you have it installed, you don't need to do anything special when running tox, and it is fully transparent to anyone who relies on the
test_allextra target. I should clarify that this solution doesn't require (and is not incompatible with) a system-wide install of uv*: installing tox-uv pulls uv from PyPI to your dev env.TODO: