-
Notifications
You must be signed in to change notification settings - Fork 85
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
ci: Use uv for all pip installs #2444
Changes from all commits
fea7834
02a891a
8eee37a
66811f2
3ed06bd
96b6f0d
4ce9ccd
7117d0c
d803c48
3758cd4
249241e
9b7570a
fd7b114
3bd1ff1
3eef2a7
b8f2958
d4f6e7c
aa7955d
49b8ed2
854906d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,9 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip --no-cache-dir --quiet install --upgrade --pre ".[all,test]" | ||
python -m pip install uv | ||
uv pip install --system --upgrade pip setuptools wheel | ||
uv pip --no-cache --quiet install --system --upgrade --pre ".[all,test]" | ||
python -m pip list | ||
|
||
- name: List release candidates, alpha, and beta releases | ||
|
@@ -57,14 +58,14 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Use nightly SciPy wheels from Anaconda's PyPI | ||
# c.f. https://twitter.com/ralfgommers/status/1419917265781334025 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" | ||
python -m pip uninstall --yes scipy | ||
python -m pip install --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy | ||
python -m pip install uv | ||
uv pip install --system --upgrade pip setuptools wheel | ||
uv pip --no-cache --quiet install --system --upgrade ".[all,test]" | ||
uv pip uninstall --system scipy | ||
# uv wants to upgrade dependencies (numpy) to a dev release too, so don't --upgrade | ||
uv pip install --system --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy | ||
Comment on lines
+67
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was previously forcing an upgrade of |
||
python -m pip list | ||
|
||
- name: Test with pytest | ||
|
@@ -87,11 +88,12 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" | ||
python -m pip uninstall --yes iminuit | ||
python -m pip install --upgrade cython | ||
python -m pip install --upgrade git+https://github.com/scikit-hep/iminuit.git | ||
python -m pip install uv | ||
uv pip install --system --upgrade pip setuptools wheel | ||
uv pip --no-cache --quiet install --system --upgrade ".[all,test]" | ||
uv pip uninstall --system iminuit | ||
uv pip install --system --upgrade cython | ||
uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git | ||
python -m pip list | ||
- name: Test with pytest | ||
run: | | ||
|
@@ -113,10 +115,11 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" | ||
python -m pip uninstall --yes uproot | ||
python -m pip install --upgrade git+https://github.com/scikit-hep/uproot5.git | ||
python -m pip install uv | ||
uv pip install --system --upgrade pip setuptools wheel | ||
uv pip --no-cache --quiet install --system --upgrade ".[all,test]" | ||
uv pip uninstall --system uproot | ||
uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git | ||
python -m pip list | ||
- name: Test with pytest | ||
run: | | ||
|
@@ -140,16 +143,18 @@ jobs: | |
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" | ||
python -m pip uninstall --yes matplotlib | ||
# Need to use --extra-index-url as dependencies aren't on scientific-python-nightly-wheels package index. | ||
python -m pip install uv | ||
uv pip install --system --upgrade pip setuptools wheel | ||
uv pip --no-cache --quiet install --system --upgrade ".[all,test]" | ||
uv pip uninstall --system matplotlib | ||
# Need to use --extra-index-url as all dependencies aren't on scientific-python-nightly-wheels package index. | ||
# Need to use --pre as dev releases will need priority over stable releases. | ||
python -m pip install \ | ||
--upgrade \ | ||
# Note that uv and pip differ on --extra-index-url priority | ||
# c.f. https://github.com/scientific-python/upload-nightly-action/issues/76 | ||
uv pip install --system \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double check this as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this needed to get flipped to uv pip install --system \
--pre \
--index-url https://pypi.org/simple/ \
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
matplotlib as
|
||
--pre \ | ||
--index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ | ||
--extra-index-url https://pypi.org/simple/ \ | ||
--index-url https://pypi.org/simple/ \ | ||
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ | ||
matplotlib | ||
|
||
- name: List installed Python packages | ||
|
@@ -175,10 +180,11 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" | ||
python -m pip uninstall --yes pytest | ||
python -m pip install --upgrade git+https://github.com/pytest-dev/pytest.git | ||
python -m pip install uv | ||
uv pip install --system --upgrade pip setuptools wheel | ||
uv pip --no-cache --quiet install --system --upgrade ".[all,test]" | ||
uv pip uninstall --system pytest | ||
uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git | ||
python -m pip list | ||
- name: Test with pytest | ||
run: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,7 @@ develop = [ | |
"pre-commit", | ||
"nox", | ||
"codemetapy>=2.3.0", | ||
"uv>=0.1.39" | ||
] | ||
|
||
[tool.hatch.version] | ||
|
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.
A bit of a hack, but until astral-sh/uv#2062 gets resolves, we might as well speed up everything else.