Skip to content

Commit

Permalink
MAINT: Use uv pip to install packages
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Sep 20, 2024
1 parent 737611e commit 94d5164
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 82 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand All @@ -71,10 +77,7 @@ jobs:
run: |
ls -la
ls -la doc
pip list
- name: Get Commit Title
run: |
uv pip list
- name: Build docs
shell: bash
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Python
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
uses: actions/setup-python@v5
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Check for semantic version tag
id: check-tag
Expand Down Expand Up @@ -66,13 +72,19 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
run: python -m pip install build
run: uv pip install build

- name: Build a wheel and a source tarball
run: make dist
Expand Down
57 changes: 33 additions & 24 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,33 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
# Install as an editable so that the coverage path
# is predicable
pip install -e ".[extra,test]"
uv pip install -e ".[extra,test]"
- name: Environment Information
shell: bash
run: |
pip list
uv pip list
- name: Run Tests
shell: bash
run: |
coverage erase
make test
- name: List Directory
shell: bash
run: |
ls -la
Expand Down Expand Up @@ -88,19 +91,22 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install Packages
shell: bash
- name: Install python ${{ matrix.python-version }}
run: |
pip install ruff
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
run: uv tool install ruff

- name: Environment Information
shell: bash
run: pip list
run: uv pip list

- name: Check lint with Ruff
shell: bash
Expand All @@ -127,22 +133,25 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
pip install ".[extra, typing]"
uv pip install ".[extra, typing]"
- name: Environment Information
shell: bash
run: pip list
run: uv pip list

- name: Run Tests
shell: bash
run: make typecheck

call-build-documentation:
Expand Down
111 changes: 72 additions & 39 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,27 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
pip install --upgrade pip
pip install ".[extra,test]"
pip install --upgrade git+https://github.com/matplotlib/matplotlib
uv pip install ".[extra,test]"
uv pip install --upgrade git+https://github.com/matplotlib/matplotlib
- name: Environment Information
shell: bash
run: |
pip list
uv pip list
- name: Run Tests
shell: bash
run: |
make test
Expand All @@ -58,21 +61,27 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
pip install --upgrade pip
pip install ".[extra,test]"
pip install --upgrade git+https://github.com/pandas-dev/pandas
uv pip install ".[extra,test]"
uv pip install --upgrade git+https://github.com/pandas-dev/pandas
- name: Environment Information
shell: bash
run: |
pip list
uv pip list
# to do: think about catching deprecations earlier
- name: Run Tests
Expand Down Expand Up @@ -111,21 +120,27 @@ jobs:
with:
ref: ${{ steps.latestrelease.outputs.latestrelease }}

- uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
pip install --upgrade pip
pip install --upgrade git+https://github.com/matplotlib/matplotlib
pip install ".[extra,test]"
uv pip install --upgrade git+https://github.com/matplotlib/matplotlib
uv pip install ".[extra,test]"
- name: Environment Information
shell: bash
run: |
pip list
uv pip list
- name: Run Tests
shell: bash
Expand Down Expand Up @@ -163,21 +178,27 @@ jobs:
with:
ref: ${{ steps.latestrelease.outputs.latestrelease }}

- uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
pip install --upgrade pip
pip install --upgrade git+https://github.com/pandas-dev/pandas
pip install ".[extra,test]"
uv pip install --upgrade git+https://github.com/pandas-dev/pandas
uv pip install ".[extra,test]"
- name: Environment Information
shell: bash
run: |
pip list
uv pip list
# to do: think about catching deprecations earlier
- name: Run Tests
Expand All @@ -203,21 +224,27 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
pip install --upgrade pip
pip install ".[extra,typing]"
pip install --upgrade git+https://github.com/matplotlib/matplotlib
uv pip install ".[extra,typing]"
uv pip install --upgrade git+https://github.com/matplotlib/matplotlib
- name: Environment Information
shell: bash
run: |
pip list
uv pip list
- name: Run Tests
shell: bash
Expand All @@ -235,21 +262,27 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "0.4.x"

- name: Install python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv venv -p ${{ matrix.python-version }}
source .venv/bin/activate
- name: Install Packages
shell: bash
run: |
pip install --upgrade pip
pip install ".[extra,typing]"
pip install --upgrade git+https://github.com/pandas-dev/pandas
uv pip install ".[extra,typing]"
uv pip install --upgrade git+https://github.com/pandas-dev/pandas
- name: Environment Information
shell: bash
run: |
pip list
uv pip list
# to do: think about catching deprecations earlier
- name: Run Tests
Expand Down
Loading

0 comments on commit 94d5164

Please sign in to comment.