docs: API Completeness overhaul #13080
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Min, old, and nightly versions | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| env: | |
| PY_COLORS: 1 | |
| PYTEST_ADDOPTS: "--numprocesses=logical" | |
| jobs: | |
| minimum_versions: | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: min-versions-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-minimum-versions | |
| run: uv pip install pipdeptree tox virtualenv setuptools pandas==1.1.3 polars==0.20.4 numpy==1.19.3 pyarrow==13.0.0 "pyarrow-stubs<17" scipy==1.6.0 scikit-learn==1.1.0 duckdb==1.1 tzdata --system | |
| - name: install-reqs | |
| run: | | |
| uv pip install -e . --group tests --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Assert dependencies | |
| run: | | |
| DEPS=$(uv pip freeze) | |
| echo "$DEPS" | grep 'pandas==1.1.3' | |
| echo "$DEPS" | grep 'polars==0.20.4' | |
| echo "$DEPS" | grep 'numpy==1.19.3' | |
| echo "$DEPS" | grep 'pyarrow==13.0.0' | |
| echo "$DEPS" | grep 'scipy==1.6.0' | |
| echo "$DEPS" | grep 'scikit-learn==1.1.0' | |
| echo "$DEPS" | grep 'duckdb==1.1' | |
| - name: Run pytest | |
| run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow --constructors=pandas,pyarrow,polars[eager],polars[lazy],duckdb | |
| pretty_old_versions: | |
| strategy: | |
| matrix: | |
| python-version: ["3.9"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: pretty-old-versions-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-pretty-old-versions | |
| run: uv pip install pipdeptree tox virtualenv setuptools pandas==1.1.5 polars==0.20.4 numpy==1.19.3 pyarrow==14.0.0 "pyarrow-stubs<17" scipy==1.6.0 scikit-learn==1.1.0 duckdb==1.2 tzdata --system | |
| - name: install-reqs | |
| run: uv pip install -e . --group tests --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: show-deptree | |
| run: pipdeptree | |
| - name: Assert pretty old versions dependencies | |
| run : | | |
| DEPS=$(uv pip freeze) | |
| echo "$DEPS" | grep 'pandas==1.1.5' | |
| echo "$DEPS" | grep 'polars==0.20.4' | |
| echo "$DEPS" | grep 'numpy==1.19.3' | |
| echo "$DEPS" | grep 'pyarrow==14.0.0' | |
| echo "$DEPS" | grep 'scipy==1.6.0' | |
| echo "$DEPS" | grep 'scikit-learn==1.1.0' | |
| echo "$DEPS" | grep 'duckdb==1.2' | |
| - name: Run pytest | |
| run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow --constructors=pandas,pyarrow,polars[eager],polars[lazy],duckdb | |
| not_so_old_versions: | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: not-so-old-versions-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-not-so-old-versions | |
| run: uv pip install tox virtualenv setuptools pandas==2.0.3 polars==0.20.8 numpy==1.24.4 pyarrow==15.0.0 "pyarrow-stubs<17" scipy==1.8.0 scikit-learn==1.3.0 duckdb==1.3 dask[dataframe]==2024.10 tzdata --system | |
| - name: install-reqs | |
| run: uv pip install -e . --group tests --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Assert not so old versions dependencies | |
| run : | | |
| DEPS=$(uv pip freeze) | |
| echo "$DEPS" | grep 'pandas==2.0.3' | |
| echo "$DEPS" | grep 'polars==0.20.8' | |
| echo "$DEPS" | grep 'numpy==1.24.4' | |
| echo "$DEPS" | grep 'pyarrow==15.0.0' | |
| echo "$DEPS" | grep 'scipy==1.8.0' | |
| echo "$DEPS" | grep 'scikit-learn==1.3.0' | |
| echo "$DEPS" | grep 'dask==2024.10' | |
| echo "$DEPS" | grep 'duckdb==1.3' | |
| - name: Run pytest | |
| run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow --constructors=pandas,pyarrow,polars[eager],polars[lazy],dask,duckdb | |
| nightlies: | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: nightlies-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| run: uv pip install -e . --group tests --system | |
| - name: install polars pre-release | |
| run: | | |
| uv pip uninstall polars --system | |
| uv pip install -U --pre polars --system | |
| - name: install-pandas-nightly | |
| run: | | |
| uv pip uninstall pandas --system | |
| uv pip install pandas --pre --index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --system -U | |
| - name: install pyarrow nightly | |
| run: | | |
| uv pip uninstall pyarrow --system | |
| uv pip install pyarrow --pre --index https://pypi.fury.io/arrow-nightlies/ --system -U | |
| - name: install numpy nightly | |
| run: | | |
| uv pip uninstall numpy --system | |
| uv pip install numpy --pre --index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --system -U | |
| - name: install dask | |
| run: | | |
| uv pip uninstall dask dask-expr --system | |
| uv pip install "git+https://github.com/dask/dask[dataframe]" --system | |
| - name: install duckdb nightly | |
| run: | | |
| uv pip uninstall duckdb --system | |
| uv pip install -U --pre duckdb --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Assert nightlies dependencies | |
| run: | | |
| DEPS=$(uv pip freeze) | |
| echo "$DEPS" | grep 'pandas.*dev' | |
| echo "$DEPS" | grep 'pyarrow.*dev' | |
| echo "$DEPS" | grep 'numpy.*dev' | |
| echo "$DEPS" | grep 'dask.*@' | |
| echo "$DEPS" | grep 'duckdb.*dev' | |
| - name: Run pytest | |
| run: | | |
| pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow \ | |
| --constructors=pandas,pandas[nullable],pandas[pyarrow],pyarrow,polars[eager],polars[lazy],dask,duckdb |