Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 143a01c

Browse files
committed
uv pip
1 parent 72bb67e commit 143a01c

6 files changed

Lines changed: 34 additions & 18 deletions

File tree

.github/workflows/docs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@ jobs:
1515
uses: actions/setup-python@v6
1616
with:
1717
python-version: 3.x
18+
cache: pip
19+
cache-dependency-path: |
20+
docs/requirements.txt
21+
pyproject.toml
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v7
1824
- name: Install Graphviz
1925
run: |
2026
sudo apt-get update
2127
sudo apt-get install graphviz
2228
- name: Install Python dependencies
2329
run: |
24-
python -m pip install --upgrade pip setuptools coverage rstvalidator
25-
pip install -r docs/requirements.txt
30+
uv pip install --system setuptools coverage rstvalidator
31+
uv pip install --system -r docs/requirements.txt
2632
- name: Build docs
2733
run: |
2834
python -m rstvalidator long_description.rst

.github/workflows/mypy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ jobs:
2323
uses: actions/setup-python@v6
2424
with:
2525
python-version: ${{ matrix.python-version }}
26+
cache: pip
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v7
2629
- name: Install dependencies
2730
run: |
28-
python -m pip install --upgrade pip
29-
pip install mypy pyflakes flake8 types-decorator
31+
uv pip install --system mypy pyflakes flake8 types-decorator
3032
- name: Lint with mypy
3133
run: |
3234
set -e

.github/workflows/nightly-wheel-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ jobs:
2121
cache: pip
2222
cache-dependency-path: |
2323
pyproject.toml
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v7
2426
- name: Try building with Python build
2527
if: runner.os != 'Windows' # setup.py does not support sdist on Windows
2628
run: |
27-
python -m pip install build
29+
uv pip install --system build
2830
python -m build
2931
3032
- name: Upload wheel

.github/workflows/python-package.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ jobs:
2525
uses: actions/setup-python@v6
2626
with:
2727
python-version: 3.x
28+
cache: pip
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v7
2831
- name: Install dependencies
2932
run: |
30-
python -m pip install --upgrade pip
3133
# when changing the versions please update CONTRIBUTING.md too
32-
pip install --only-binary ':all:' darker==2.1.1 black==24.10.0
34+
uv pip install --system darker==2.1.1 black==24.10.0
3335
- name: Lint with darker
3436
run: |
3537
darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || (

.github/workflows/ruff.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ jobs:
2323
uses: actions/setup-python@v6
2424
with:
2525
python-version: ${{ matrix.python-version }}
26+
cache: pip
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v7
2629
- name: Install dependencies
2730
run: |
28-
python -m pip install --upgrade pip
29-
pip install ruff
31+
uv pip install --system ruff
3032
- name: Lint with ruff
3133
run: |
3234
set -e

.github/workflows/test.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,23 @@ jobs:
6262
cache: pip
6363
cache-dependency-path: |
6464
pyproject.toml
65+
- name: Install uv
66+
uses: astral-sh/setup-uv@v7
6567
- name: Install latex
6668
if: runner.os == 'Linux' && matrix.deps == 'test_extra'
6769
run: echo "disable latex for now, issues in mirros" #sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng
6870
- name: Install and update Python dependencies (binary only)
6971
if: ${{ ! contains( matrix.python-version, 'dev' ) }}
7072
run: |
71-
python -m pip install --only-binary ':all:' --upgrade pip setuptools wheel build
72-
python -m pip install --no-binary curio --no-binary psutil --no-binary tornado --upgrade -e .[${{ matrix.deps }}]
73-
python -m pip install --only-binary ':all:' --upgrade check-manifest pytest-cov pytest
73+
uv pip install --system setuptools wheel build
74+
uv pip install --system -e .[${{ matrix.deps }}]
75+
uv pip install --system check-manifest pytest-cov pytest
7476
- name: Install and update Python dependencies (dev?)
7577
if: ${{ contains( matrix.python-version, 'dev' ) }}
7678
run: |
77-
python -m pip install --pre --upgrade pip setuptools wheel build
78-
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-binary curio --no-binary psutil --no-binary tornado --upgrade -e .[${{ matrix.deps }}]
79-
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --upgrade check-manifest pytest-cov
79+
uv pip install --system --prerelease=allow setuptools wheel build
80+
uv pip install --system --prerelease=allow --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple -e .[${{ matrix.deps }}]
81+
uv pip install --system --prerelease=allow --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple check-manifest pytest-cov
8082
- name: Try building with Python build
8183
if: runner.os != 'Windows' # setup.py does not support sdist on Windows
8284
run: |
@@ -89,11 +91,11 @@ jobs:
8991
- name: Install entry point compatible code (TEMPORARY, April 2024)
9092
if: matrix.want-latest-entry-point-code
9193
run: |
92-
python -m pip list
94+
uv pip list --system
9395
# Not installing matplotlib's entry point code as building matplotlib from source is complex.
9496
# Rely upon matplotlib to test all the latest entry point branches together.
95-
python -m pip install --upgrade git+https://github.com/ipython/matplotlib-inline.git@main
96-
python -m pip list
97+
uv pip install --system git+https://github.com/ipython/matplotlib-inline.git@main
98+
uv pip list --system
9799
98100
- name: pytest
99101
env:

0 commit comments

Comments
 (0)