Skip to content
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: adopt uv #682

Merged
merged 7 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/check_docs_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Check Docs Build

on:
pull_request:
Expand All @@ -18,20 +18,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt
run: uv pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt --system
- name: install-docs-reqs
run: python -m pip install --upgrade -r docs/requirements-docs.txt
run: uv pip install --upgrade -r docs/requirements-docs.txt --system
- name: local-install
run: python -m pip install -e .
run: uv pip install -e . --system
- name: check-no-errors
run: python -m mkdocs build > output.txt 2>&1
- name: assert-no-errors
Expand Down
42 changes: 15 additions & 27 deletions .github/workflows/downstream_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Test Downstream Libraries

on:
pull_request:
Expand All @@ -18,31 +18,25 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: clone-altair
run: |
git clone https://github.com/vega/altair.git --depth=1
cd altair
git log
- name: install-basics
run: python -m pip install --upgrade tox virtualenv setuptools pip
run: uv pip install --upgrade tox virtualenv setuptools --system
- name: install-altair-dev
run: |
cd altair
pip install -e ".[dev, all]"
uv pip install -e ".[dev, all]" --system
- name: install-narwhals-dev
run: |
pip uninstall narwhals -y
pip install -e .
uv pip uninstall narwhals --system
uv pip install -e . --system
- name: show-deps
run: pip freeze
run: uv pip freeze
- name: Run pytest
run: |
cd altair
Expand All @@ -64,28 +58,22 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: clone-scikit-lego
run: git clone https://github.com/koaning/scikit-lego.git --depth 1
- name: install-basics
run: python -m pip install --upgrade tox virtualenv setuptools pip
run: uv pip install --upgrade tox virtualenv setuptools --system
- name: install-scikit-lego-dev
run: |
cd scikit-lego
pip install -e ".[test]"
uv pip install -e ".[test]" --system
- name: install-narwhals-dev
run: |
pip uninstall narwhals -y
pip install -e .
uv pip uninstall narwhals --system
uv pip install -e . --system
- name: show-deps
run: pip freeze
run: uv pip freeze
- name: Run pytest
run: |
cd scikit-lego
Expand Down
64 changes: 23 additions & 41 deletions .github/workflows/extremes.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Min, old, and nightly versions

on:
pull_request:
Expand All @@ -18,20 +18,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-minimu-versions
run: python -m pip install tox virtualenv setuptools pandas==0.25.3 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata
run: uv pip install tox virtualenv setuptools pandas==0.25.3 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata --system
- name: install-reqs
run: python -m pip install -r requirements-dev.txt
run: uv pip install -r requirements-dev.txt --system
- name: show-deps
run: pip freeze
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow

Expand All @@ -47,20 +41,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-minimu-versions
run: python -m pip install tox virtualenv setuptools pandas==1.1.5 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata
run: uv pip install tox virtualenv setuptools pandas==1.1.5 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata --system
- name: install-reqs
run: python -m pip install -r requirements-dev.txt
run: uv pip install -r requirements-dev.txt --system
- name: show-deps
run: pip freeze
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
- name: Run doctests
Expand All @@ -78,35 +66,29 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-polars
run: pip install polars
run: uv pip install polars --system
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt
run: uv pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt --system
- name: uninstall pyarrow
run: python -m pip uninstall pyarrow -y
run: uv pip uninstall pyarrow --system
- name: install pyarrow nightly
run: python -m pip install --extra-index-url https://pypi.fury.io/arrow-nightlies/ --prefer-binary --pre pyarrow
run: uv pip install --pre --extra-index-url https://pypi.fury.io/arrow-nightlies/ pyarrow --system
- name: uninstall pandas
run: python -m pip uninstall pandas -y
run: uv pip uninstall pandas --system
- name: install-pandas-nightly
run: python -m pip install --pre --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas
run: uv pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas --system
- name: uninstall numpy
run: python -m pip uninstall numpy -y
run: uv pip uninstall numpy --system
- name: install numpy nightly
run: python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
run: uv pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy --system
- name: install dask
run: |
pip install git+https://github.com/dask/distributed git+https://github.com/dask/dask git+https://github.com/dask/dask-expr
python -m pip install git+https://github.com/dask/distributed git+https://github.com/dask/dask git+https://github.com/dask/dask-expr
- name: show-deps
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using uv here would require a token?! I was not able to

run: pip freeze
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
- name: Run doctests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: mkdocs
name: Publish Docs

on:
push:
Expand Down
52 changes: 19 additions & 33 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: PyTest

on:
pull_request:
Expand All @@ -18,18 +18,16 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
if: runner.os != 'Windows'
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install uv (Windows)
if: runner.os == 'Windows'
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
- name: show-deps
run: pip freeze
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=90
- name: Run doctests
Expand All @@ -47,20 +45,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Windows)
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
- name: install-modin
run: python -m pip install --upgrade modin[dask]
run: uv pip install --upgrade modin[dask] --system
- name: show-deps
run: pip freeze
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --runslow --cov-fail-under=95
- name: Run doctests
Expand All @@ -78,20 +70,14 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
- name: install-modin
run: python -m pip install --upgrade modin[dask]
run: uv pip install --upgrade modin[dask] --system
- name: show-deps
run: pip freeze
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=100 --runslow
- name: Run doctests
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/random_ci_pytest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: random-versions
name: Random Versions

on:
pull_request:
Expand All @@ -16,17 +16,19 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install package
run: pip install -e .
run: uv pip install -e . --system
- name: generate-random-versions
run: python utils/generate_random_versions.py
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip && python -m pip install -r requirements-dev.txt
run: uv pip install --upgrade tox virtualenv setuptools --system && uv pip install -r requirements-dev.txt --system
- name: uninstall scipy/sklearn
run: python -m pip uninstall -y scipy scikit-learn
run: uv pip uninstall scipy scikit-learn --system
- name: install-random-verions
run: python -m pip install -r random-requirements.txt
run: uv pip install -r random-requirements.txt --system
- name: show versions
run: python -m pip freeze
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=80
Loading