From daae61d81dccf112a325afefadef33f99c86256e Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:28:21 +0100 Subject: [PATCH] q20, revert nightly experiment --- .github/workflows/extremes.yml | 53 ++++++++++++++++++++++++++-------- tpch/execute/q20.py | 4 +-- 2 files changed, 43 insertions(+), 14 deletions(-) diff --git a/.github/workflows/extremes.yml b/.github/workflows/extremes.yml index 527c436c6..7e1a5586e 100644 --- a/.github/workflows/extremes.yml +++ b/.github/workflows/extremes.yml @@ -79,7 +79,7 @@ jobs: - name: Run doctests run: pytest narwhals --doctest-modules - nightlies: + pandas-nightly-and-dask: strategy: matrix: python-version: ["3.12"] @@ -97,8 +97,6 @@ jobs: run: uv pip install polars --system - name: install-reqs run: uv pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt --system - - name: uninstall polars - run: uv pip uninstall polars --system - name: uninstall pyarrow run: uv pip uninstall pyarrow --system # - name: install pyarrow nightly @@ -114,15 +112,6 @@ jobs: - name: install dask run: | python -m pip install git+https://github.com/dask/distributed git+https://github.com/dask/dask git+https://github.com/dask/dask-expr - - name: install-kaggle - run: python -m pip install kaggle - - 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-nightly - run: python -m pip install *.whl - name: show-deps run: uv pip freeze - name: Run pytest @@ -130,3 +119,43 @@ jobs: - name: Run doctests run: pytest narwhals --doctest-modules + # polars-nightly: + # if: github.ref == 'refs/heads/main' + # strategy: + # matrix: + # python-version: ["3.12"] + # os: [ubuntu-latest] + + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@v4 + # - 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-kaggle + # run: python -m pip install kaggle + # - name: Download Kaggle notebook artifact + # env: + # KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} + # KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} + # run: kaggle kernels output marcogorelli/polars-nightly + # - name: install-reqs + # run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt + # - name: uninstall polars + # run: python -m pip uninstall polars -y + # - name: install-modin-pandas + # run: pip install modin[dask] pandas + # - name: install-polars-nightly + # run: python -m pip install *.whl + # - name: Run pytest + # run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 + # - name: Run doctests + # run: pytest narwhals --doctest-modules diff --git a/tpch/execute/q20.py b/tpch/execute/q20.py index d15f8c85f..044031f3d 100644 --- a/tpch/execute/q20.py +++ b/tpch/execute/q20.py @@ -10,8 +10,8 @@ fn = IO_FUNCS["pandas[pyarrow]"] print(q20.query(fn(part), fn(partsupp), fn(nation), fn(lineitem), fn(supplier))) -fn = IO_FUNCS["polars[lazy]"] -print(q20.query(fn(part), fn(partsupp), fn(nation), fn(lineitem), fn(supplier)).collect()) +fn = IO_FUNCS["polars[eager]"] +print(q20.query(fn(part), fn(partsupp), fn(nation), fn(lineitem), fn(supplier))) fn = IO_FUNCS["pyarrow"] print(q20.query(fn(part), fn(partsupp), fn(nation), fn(lineitem), fn(supplier)))