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 4f956df
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 73 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,15 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand All @@ -71,10 +78,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
22 changes: 18 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python
with:
python-version: ${{ matrix.python-version }}
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

- name: Install a specific version of uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- name: Check for semantic version tag
id: check-tag
Expand Down Expand Up @@ -68,11 +75,18 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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
52 changes: 32 additions & 20 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,34 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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 @@ -90,17 +94,21 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- name: Install Packages
shell: bash
run: |
pip install ruff
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 Down Expand Up @@ -129,20 +137,24 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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
117 changes: 78 additions & 39 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,28 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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 +62,28 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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 +122,28 @@ jobs:
with:
ref: ${{ steps.latestrelease.outputs.latestrelease }}

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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 +181,28 @@ jobs:
with:
ref: ${{ steps.latestrelease.outputs.latestrelease }}

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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 +228,28 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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 +267,28 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
python-version: ${{ matrix.python-version }}

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

- name: Make uv use system python
run: echo "UV_SYSTEM_PYTHON=true" >> $GITHUB_ENV

- 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 4f956df

Please sign in to comment.