fix: pyspark group by with kwargs #5247
Workflow file for this run
This file contains 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] | |
jobs: | |
minimum_versions: | |
strategy: | |
matrix: | |
python-version: ["3.8"] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: "true" | |
cache-suffix: ${{ matrix.python-version }} | |
cache-dependency-glob: "pyproject.toml" | |
- name: install-minimum-versions | |
run: uv pip install pipdeptree tox virtualenv setuptools pandas==0.25.3 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 "pyarrow-stubs<17" scipy==1.5.0 scikit-learn==1.1.0 tzdata --system | |
- name: install-reqs | |
run: | | |
uv pip install -e ".[dev]" --system | |
- name: show-deps | |
run: uv pip freeze | |
- name: Assert dependencies | |
run: | | |
DEPS=$(uv pip freeze) | |
echo "$DEPS" | grep 'pandas==0.25.3' | |
echo "$DEPS" | grep 'polars==0.20.3' | |
echo "$DEPS" | grep 'numpy==1.17.5' | |
echo "$DEPS" | grep 'pyarrow==11.0.0' | |
echo "$DEPS" | grep 'scipy==1.5.0' | |
echo "$DEPS" | grep 'scikit-learn==1.1.0' | |
- name: Run pytest | |
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow | |
pretty_old_versions: | |
strategy: | |
matrix: | |
python-version: ["3.8"] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: "true" | |
cache-suffix: ${{ matrix.python-version }} | |
cache-dependency-glob: "pyproject.toml" | |
- name: install-minimum-versions | |
run: uv pip install pipdeptree tox virtualenv setuptools pandas==1.1.5 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 "pyarrow-stubs<17" pyspark==3.3.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata --system | |
- name: install-reqs | |
run: uv pip install -e ".[dev]" --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.3' | |
echo "$DEPS" | grep 'numpy==1.17.5' | |
echo "$DEPS" | grep 'pyarrow==11.0.0' | |
echo "$DEPS" | grep 'pyspark==3.3.0' | |
echo "$DEPS" | grep 'scipy==1.5.0' | |
echo "$DEPS" | grep 'scikit-learn==1.1.0' | |
- name: Run pytest | |
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow | |
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: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: "true" | |
cache-suffix: ${{ 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==14.0.0 "pyarrow-stubs<17" pyspark==3.4.0 scipy==1.8.0 scikit-learn==1.3.0 dask[dataframe]==2024.7 tzdata --system | |
- name: install-reqs | |
run: uv pip install -e ".[dev]" --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==14.0.0' | |
echo "$DEPS" | grep 'pyspark==3.4.0' | |
echo "$DEPS" | grep 'scipy==1.8.0' | |
echo "$DEPS" | grep 'scikit-learn==1.3.0' | |
echo "$DEPS" | grep 'dask==2024.7' | |
- name: Run pytest | |
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow | |
nightlies: | |
strategy: | |
matrix: | |
python-version: ["3.13"] | |
os: [ubuntu-latest] | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: "true" | |
cache-suffix: ${{ matrix.python-version }} | |
cache-dependency-glob: "pyproject.toml" | |
- name: install-reqs | |
run: uv pip install -e ".[dev]" --system | |
- name: install-kaggle | |
run: uv pip install kaggle --system | |
- name: Download Kaggle notebook artifact | |
env: | |
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | |
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} | |
run: | | |
kaggle kernels output "marcogorelli/variable-brink-glacier" | |
- name: install-polars | |
run: | | |
uv pip uninstall polars --system | |
python -m pip install *.whl | |
- name: install-pandas-nightly | |
run: | | |
uv pip uninstall pandas --system | |
pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas | |
- name: install pyarrow nightly | |
run: | | |
uv pip uninstall pyarrow --system | |
uv pip install --extra-index-url https://pypi.fury.io/arrow-nightlies/ --pre pyarrow --system | |
- name: show-deps | |
run: uv pip freeze | |
- name: install numpy nightly | |
run: | | |
uv pip uninstall numpy --system | |
uv pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy --system | |
- name: install dask | |
run: | | |
uv pip uninstall dask dask-expr --system | |
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: uv pip freeze | |
- name: Assert nightlies dependencies | |
run: | | |
DEPS=$(uv pip freeze) | |
echo "$DEPS" | grep 'polars' | |
echo "$DEPS" | grep 'pandas.*dev' | |
echo "$DEPS" | grep 'pyarrow.*dev' | |
echo "$DEPS" | grep 'numpy' | |
echo "$DEPS" | grep 'dask' | |
- name: Run pytest | |
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow |