Skip to content

Commit fd6f5c1

Browse files
authored
Merge branch 'main' into test/sum-horizontal-with-scalar
2 parents c91ece5 + 352542c commit fd6f5c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1413
-830
lines changed

.github/workflows/check_tpch_queries.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
env:
77
PY_COLORS: 1
8-
8+
UV_SYSTEM_PYTHON: 1
99
jobs:
1010
validate-queries:
1111
strategy:
@@ -26,10 +26,8 @@ jobs:
2626
cache-suffix: ${{ matrix.python-version }}
2727
cache-dependency-glob: "pyproject.toml"
2828
- name: local-install
29-
run: |
30-
uv pip install -U -e ".[dask]" --group core-tests --system
31-
uv pip install -U duckdb --system
29+
run: uv pip install -U -e ".[dask]" --group core-tests
3230
- name: generate-data
33-
run: cd tpch && python generate_data.py
31+
run: cd tpch && python generate_data.py --debug
3432
- name: tpch-tests
3533
run: cd tpch && pytest tests

.github/workflows/downstream_tests.yml

Lines changed: 54 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ env:
88

99
jobs:
1010
altair:
11+
env:
12+
UV_SYSTEM_PYTHON: 1
1113
strategy:
1214
matrix:
1315
python-version: ["3.12"]
@@ -31,29 +33,27 @@ jobs:
3133
cd altair
3234
git log
3335
- name: install-basics
34-
run: uv pip install --upgrade tox virtualenv setuptools --system
36+
run: uv pip install --upgrade tox virtualenv setuptools
3537
- name: install-altair-dev
3638
run: |
3739
cd altair
3840
# Temporary pin until it's addressed upstream.
39-
uv pip install "pandas<3" --system
40-
uv pip install -e ".[dev, all]" --system
41+
uv pip install "pandas<3"
42+
uv pip install -e ".[dev, all]"
4143
- name: install-narwhals-dev
4244
run: |
43-
uv pip uninstall narwhals --system
44-
uv pip install -e . --system
45+
uv pip uninstall narwhals
46+
uv pip install -e .
4547
- name: show-deps
4648
run: uv pip freeze
4749
- name: Run pytest
4850
run: |
4951
cd altair
5052
pytest tests
51-
# Temporarily commented-out to get CI green
52-
# https://github.com/narwhals-dev/narwhals/issues/3013
53-
# - name: Run mypy
54-
# run: |
55-
# cd altair
56-
# mypy altair tests
53+
- name: Run mypy
54+
run: |
55+
cd altair
56+
mypy altair tests
5757
5858
marimo:
5959
strategy:
@@ -76,35 +76,22 @@ jobs:
7676
cache-dependency-glob: "pyproject.toml"
7777
- name: clone-marimo
7878
run: |
79-
git clone https://github.com/marimo-team/marimo.git --depth=1
79+
# TODO: remove branch pin once https://github.com/marimo-team/marimo/pull/8510 is merged
80+
git clone https://github.com/marimo-team/marimo.git --depth=1 --branch=push-kmswtyynuukw
8081
cd marimo
81-
uv venv -p 3.12
8282
git log
83-
- name: install-basics
84-
run:
85-
uv pip install --upgrade tox virtualenv setuptools hatch
86-
"click!=8.3.0" --system
87-
- name: install-marimo-dev
83+
- name: install-narwhals-dev
8884
run: |
8985
cd marimo
90-
. .venv/bin/activate
86+
uv add ../ --editable
9187
# Temporary pin until it's addressed upstream.
92-
uv pip install "pandas<3"
88+
uv add "pandas<3" --group test-optional
9389
# Temporary pin to get CI green
94-
uv pip install "sqlglot<28.7.0"
95-
uv pip install -e ".[dev]"
96-
which python
97-
- name: install-narwhals-dev
98-
run: |
99-
cd marimo
100-
. .venv/bin/activate
101-
uv pip uninstall narwhals
102-
uv pip install -e ./..
90+
uv add "sqlglot<28.7.0" --group test-optional
10391
- name: show-deps
10492
run: |
10593
cd marimo
106-
. .venv/bin/activate
107-
uv pip freeze
94+
uv tree --group test-optional
10895
- name: Create assets directory, copy over index.html
10996
continue-on-error: true
11097
run: |
@@ -115,15 +102,13 @@ jobs:
115102
if: ${{ matrix.dependencies == 'core,optional' }}
116103
run: |
117104
cd marimo
118-
. .venv/bin/activate
119-
# make sure that we use the .venv when running tests, so that
120-
# the local narwhals install is picked up
121-
sed -i '/^\[tool.hatch.envs.default\]/a path = ".venv"' pyproject.toml
122-
hatch run python -c "import narwhals; print(narwhals.__file__)"
123-
hatch run +py=${{ matrix.python-version }} test-optional:test-narwhals
105+
uv run --python ${{ matrix.python-version }} python -c "import narwhals; print(narwhals.__file__)"
106+
scripts/test-narwhals.sh --python=${{ matrix.python-version }}
124107
timeout-minutes: 15
125108

126109
scikit-lego:
110+
env:
111+
UV_SYSTEM_PYTHON: 1
127112
strategy:
128113
matrix:
129114
python-version: ["3.11"]
@@ -144,15 +129,15 @@ jobs:
144129
- name: clone-scikit-lego
145130
run: git clone https://github.com/koaning/scikit-lego.git --depth 1
146131
- name: install-basics
147-
run: uv pip install --upgrade tox virtualenv setuptools --system
132+
run: uv pip install --upgrade tox virtualenv setuptools
148133
- name: install-scikit-lego-dev
149134
run: |
150135
cd scikit-lego
151-
uv pip install -e ".[test]" --system
136+
uv pip install -e ".[test]"
152137
- name: install-narwhals-dev
153138
run: |
154-
uv pip uninstall narwhals --system
155-
uv pip install -e . --system
139+
uv pip uninstall narwhals
140+
uv pip install -e .
156141
- name: show-deps
157142
run: uv pip freeze
158143
- name: Run pytest
@@ -262,6 +247,8 @@ jobs:
262247
uv run --no-sync pytest tests
263248
264249
tubular:
250+
env:
251+
UV_SYSTEM_PYTHON: 1
265252
strategy:
266253
matrix:
267254
python-version: ["3.12"]
@@ -286,17 +273,17 @@ jobs:
286273
git log
287274
- name: install-basics
288275
run:
289-
uv pip install --upgrade tox virtualenv setuptools pytest-env --system
276+
uv pip install --upgrade tox virtualenv setuptools pytest-env
290277
- name: install-tubular-dev
291278
run: |
292279
cd tubular
293280
# Temporary pin until it's addressed upstream.
294-
uv pip install "pandas<3" --system
295-
uv pip install -e ".[dev]" --system
281+
uv pip install "pandas<3"
282+
uv pip install -e ".[dev]"
296283
- name: install-narwhals-dev
297284
run: |
298-
uv pip uninstall narwhals --system
299-
uv pip install -e . --system
285+
uv pip uninstall narwhals
286+
uv pip install -e .
300287
- name: show-deps
301288
run: uv pip freeze
302289
- name: Run pytest
@@ -350,6 +337,8 @@ jobs:
350337
pytest tests/test_optional/test_px
351338
352339
hierarchicalforecast:
340+
env:
341+
UV_SYSTEM_PYTHON: 1
353342
strategy:
354343
matrix:
355344
python-version: ["3.12"]
@@ -373,17 +362,17 @@ jobs:
373362
cd hierarchicalforecast
374363
git log
375364
- name: install-basics
376-
run: uv pip install --upgrade tox virtualenv setuptools --system
365+
run: uv pip install --upgrade tox virtualenv setuptools
377366
- name: install-deps
378367
run: |
379368
cd hierarchicalforecast
380369
# Temporary pin until it's addressed upstream.
381-
uv pip install "pandas<3" --system
382-
uv pip install . --group dev --group polars --system
370+
uv pip install "pandas<3"
371+
uv pip install . --group dev --group polars
383372
- name: install-narwhals-dev
384373
run: |
385-
uv pip uninstall narwhals --system
386-
uv pip install -e . --system
374+
uv pip uninstall narwhals
375+
uv pip install -e .
387376
- name: show-deps
388377
run: uv pip freeze
389378
- name: Run tests
@@ -468,6 +457,8 @@ jobs:
468457
uv pip install . --group dev
469458
# Temporary pin to get CI green
470459
uv pip install "sqlglot<28.7.0"
460+
# Temporary pin to get CI green
461+
uv pip install "pandas<3"
471462
uv pip install pytest pytest-cov pytest-snapshot pandas polars "ibis-framework[duckdb,mysql,postgres,sqlite]>=9.5.0" chatlas shiny
472463
- name: install-narwhals-dev
473464
run: |
@@ -540,6 +531,8 @@ jobs:
540531
timeout-minutes: 15
541532

542533
darts:
534+
env:
535+
UV_SYSTEM_PYTHON: 1
543536
strategy:
544537
matrix:
545538
python-version: ["3.12"]
@@ -564,19 +557,15 @@ jobs:
564557
- name: install-deps
565558
run: |
566559
cd darts
567-
# Temporary pin until it's addressed upstream.
568-
uv pip install "pandas<3" --system
569-
uv pip install \
570-
-r requirements/core.txt \
571-
-r requirements/dev.txt \
560+
uv pip install . \
561+
--group dev \
572562
llvmlite==0.46.0 \
573-
numba==0.63.1 \
574-
--system
563+
numba==0.63.1
575564
- name: install-narwhals-dev
576565
run: |
577-
uv pip uninstall narwhals --system
566+
uv pip uninstall narwhals
578567
# TODO(FBruzzesi): Install polars & pyarrow from darts requirements when they introduce it
579-
uv pip install -e ".[polars, pyarrow]" --system
568+
uv pip install -e ".[polars, pyarrow]"
580569
- name: show-deps
581570
run: uv pip freeze
582571
- name: Run tests
@@ -628,6 +617,8 @@ jobs:
628617
uv run --no-sync pytest
629618
630619
fairlearn:
620+
env:
621+
UV_SYSTEM_PYTHON: 1
631622
strategy:
632623
matrix:
633624
python-version: ["3.12"]
@@ -654,12 +645,12 @@ jobs:
654645
run: |
655646
cd fairlearn
656647
# TODO(FBruzzesi): Align with fairlearn team to get a minimal requirement to test narwhals features
657-
uv pip install -e . -r requirements.txt lightgbm matplotlib polars pyarrow pytest typing-extensions --system
648+
uv pip install -e . -r requirements.txt lightgbm matplotlib polars pyarrow pytest typing-extensions
658649
- name: install-narwhals-dev
659650
run: |
660651
cd fairlearn
661-
uv pip uninstall narwhals --system
662-
uv pip install -e ./.. --system
652+
uv pip uninstall narwhals
653+
uv pip install -e ./..
663654
uv pip freeze
664655
- name: run-pytest
665656
run: |

.github/workflows/downstream_tests_slow.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ on:
66

77
env:
88
PY_COLORS: 1
9-
9+
UV_SYSTEM_PYTHON: 1
1010
jobs:
1111
vegafusion:
12-
env:
13-
UV_SYSTEM_PYTHON: true
14-
1512
strategy:
1613
matrix:
1714
python-version: ["3.11"]

.github/workflows/extremes.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
env:
77
PY_COLORS: 1
88
PYTEST_ADDOPTS: "--numprocesses=logical"
9-
9+
UV_SYSTEM_PYTHON: 1
1010
jobs:
1111
minimum_versions:
1212
strategy:
@@ -27,10 +27,10 @@ jobs:
2727
cache-suffix: min-versions-${{ matrix.python-version }}
2828
cache-dependency-glob: "pyproject.toml"
2929
- name: install-minimum-versions
30-
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
30+
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
3131
- name: install-reqs
3232
run: |
33-
uv pip install -e . --group tests --system
33+
uv pip install -e . --group tests
3434
- name: show-deps
3535
run: uv pip freeze
3636
- name: Assert dependencies
@@ -64,9 +64,9 @@ jobs:
6464
cache-suffix: pretty-old-versions-${{ matrix.python-version }}
6565
cache-dependency-glob: "pyproject.toml"
6666
- name: install-pretty-old-versions
67-
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
67+
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
6868
- name: install-reqs
69-
run: uv pip install -e . --group tests --system
69+
run: uv pip install -e . --group tests
7070
- name: show-deps
7171
run: uv pip freeze
7272
- name: show-deptree
@@ -102,9 +102,9 @@ jobs:
102102
cache-suffix: not-so-old-versions-${{ matrix.python-version }}
103103
cache-dependency-glob: "pyproject.toml"
104104
- name: install-not-so-old-versions
105-
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
105+
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
106106
- name: install-reqs
107-
run: uv pip install -e . --group tests --system
107+
run: uv pip install -e . --group tests
108108
- name: show-deps
109109
run: uv pip freeze
110110
- name: Assert not so old versions dependencies
@@ -139,31 +139,31 @@ jobs:
139139
cache-suffix: nightlies-${{ matrix.python-version }}
140140
cache-dependency-glob: "pyproject.toml"
141141
- name: install-reqs
142-
run: uv pip install -e . --group tests --system
142+
run: uv pip install -e . --group tests
143143
- name: install polars pre-release
144144
run: |
145-
uv pip uninstall polars --system
146-
uv pip install -U --pre polars --system
145+
uv pip uninstall polars
146+
uv pip install -U --pre polars
147147
- name: install-pandas-nightly
148148
run: |
149-
uv pip uninstall pandas --system
150-
uv pip install pandas --pre --index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --system -U
149+
uv pip uninstall pandas
150+
uv pip install pandas --pre --index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple -U
151151
- name: install pyarrow nightly
152152
run: |
153-
uv pip uninstall pyarrow --system
154-
uv pip install pyarrow --pre --index https://pypi.fury.io/arrow-nightlies/ --system -U
153+
uv pip uninstall pyarrow
154+
uv pip install pyarrow --pre --index https://pypi.fury.io/arrow-nightlies/ -U
155155
- name: install numpy nightly
156156
run: |
157-
uv pip uninstall numpy --system
158-
uv pip install numpy --pre --index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --system -U
157+
uv pip uninstall numpy
158+
uv pip install numpy --pre --index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple -U
159159
- name: install dask
160160
run: |
161-
uv pip uninstall dask dask-expr --system
162-
uv pip install "git+https://github.com/dask/dask[dataframe]" --system
161+
uv pip uninstall dask dask-expr
162+
uv pip install "git+https://github.com/dask/dask[dataframe]"
163163
- name: install duckdb nightly
164164
run: |
165-
uv pip uninstall duckdb --system
166-
uv pip install -U --pre duckdb --system
165+
uv pip uninstall duckdb
166+
uv pip install -U --pre duckdb
167167
- name: show-deps
168168
run: uv pip freeze
169169
- name: Assert nightlies dependencies

0 commit comments

Comments
 (0)