Skip to content

Commit

Permalink
Merge branch 'main' into add-when-chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
aivanoved committed Aug 26, 2024
2 parents 10245c4 + 570ca78 commit c2bbc66
Show file tree
Hide file tree
Showing 220 changed files with 8,299 additions and 3,386 deletions.
18 changes: 9 additions & 9 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ autolabeler:
- label: breaking
title:
# Example: feat!: ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)(\(.*\))?\!\: /'
- '/^([Bb]uild|[Cc]hore|CI|ci|[Dd]epr|[Dd]oc|DOC|[Ff]eat|[Ff]ix|[Pp]erf|[Rr]efactor|[Rr]elease|[Tt]est)\! /'
- label: build
title:
- '/^build/'
- '/^([Bb]uild)/'
- label: internal
title:
- '/^(chore|ci|refactor|test|template|bench)/'
- '/^(chore|ci|refactor|test|template|bench|Chore|CI|Refactor|Test|Template|Bench)/'
- label: deprecation
title:
- '/^depr/'
- '/^([Dd]epr)/'
- label: documentation
title:
- '/(.*doc|.*docstring)/'
- '/^([Dd]oc|DOC)/'
- label: enhancement
title:
- '/^(.*feat|.*enh)/'
- '/^(feat|enh|Feat|ENH|Enh)/'
- label: fix
title:
- '/^fix/'
- '/^([Ff]ix)/'
- label: performance
title:
- '/^perf/'
- '/^([Pp]erf)/'
- label: release
title:
- '/^release/'
- '/^([Rr]elease)/'

version-resolver:
major:
Expand Down
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
93 changes: 50 additions & 43 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-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
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-minimum-versions
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,39 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache multiple paths
uses: actions/cache@v4
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-minimum-versions
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: uv pip install -r requirements-dev.txt --system
- name: show-deps
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
- name: Run doctests
run: pytest narwhals --doctest-modules

not_so_old_versions:
strategy:
matrix:
python-version: ["3.9"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- 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
python-version: ${{ matrix.python-version }}
- name: Install uv (Unix)
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: install-minimum-versions
run: uv pip install tox virtualenv setuptools pandas==2.0.3 polars==0.20.8 numpy==1.24.4 pyarrow==14.0.0 scipy==1.8.0 scikit-learn==1.3.0 dask[dataframe]==2024.7 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 +91,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
- 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 uninstall pyarrow --system
# - name: install pyarrow nightly
# run: uv pip install --extra-index-url https://pypi.fury.io/arrow-nightlies/ --pre 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
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
2 changes: 1 addition & 1 deletion .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
Expand Down
54 changes: 20 additions & 34 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,20 +18,18 @@ 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
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=85
- name: Run doctests
run: pytest narwhals --doctest-modules

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
Loading

0 comments on commit c2bbc66

Please sign in to comment.