Skip to content

Commit cf2366d

Browse files
committed
merge main, resolve conflicts
2 parents 6326446 + 0c1650c commit cf2366d

File tree

329 files changed

+8388
-8910
lines changed

Some content is hidden

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

329 files changed

+8388
-8910
lines changed

.github/release-drafter.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
exclude-labels:
2-
- skip changelog
2+
- ignore
33
- release
4+
- dependencies
45
name-template: 'Narwhals v$RESOLVED_VERSION'
56

67
change-template: '- $TITLE (#$NUMBER)'
@@ -34,6 +35,9 @@ autolabeler:
3435
- label: release
3536
title:
3637
- '/^([Rr]elease)/'
38+
- label: ignore
39+
title:
40+
- '/^\[pre-commit.ci\]/'
3741

3842
version-resolver:
3943
major:

.github/workflows/bump-version.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Bump version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: 'Type of version bump: patch, minor, or major'
8+
required: true
9+
default: 'patch'
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
16+
jobs:
17+
bump-version:
18+
runs-on: ubuntu-latest
19+
steps:
20+
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
27+
- name: bump version
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
31+
git checkout -b bump-version
32+
git remote rename origin upstream
33+
python utils/bump_version.py ${{ github.event.inputs.release_type }}
34+
35+
- name: Create pull request
36+
uses: actions/github-script@v7
37+
if: github.actor == 'MarcoGorelli' || github.actor == 'FBruzzesi'
38+
with:
39+
script: |
40+
const branch = `bump-version`
41+
github.pulls.create({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
head: branch,
45+
base: 'main',
46+
body: 'Bumping the version to reflect the latest release type.',
47+
})
48+

.github/workflows/check_docs_build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v2
22+
uses: astral-sh/setup-uv@v3
2323
with:
2424
enable-cache: "true"
2525
cache-suffix: ${{ matrix.python-version }}

.github/workflows/check_tpch_queries.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v2
22+
uses: astral-sh/setup-uv@v3
2323
with:
2424
enable-cache: "true"
2525
cache-suffix: ${{ matrix.python-version }}

.github/workflows/downstream_tests.yml

+97-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v2
22+
uses: astral-sh/setup-uv@v3
2323
with:
2424
enable-cache: "true"
2525
cache-suffix: ${{ matrix.python-version }}
@@ -50,6 +50,59 @@ jobs:
5050
cd altair
5151
mypy altair tests
5252
53+
marimo:
54+
strategy:
55+
matrix:
56+
python-version: ["3.12"]
57+
os: [ubuntu-latest]
58+
dependencies: ["core", "core,optional"]
59+
60+
runs-on: ${{ matrix.os }}
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/setup-python@v5
64+
with:
65+
python-version: ${{ matrix.python-version }}
66+
- name: Install uv
67+
uses: astral-sh/setup-uv@v3
68+
with:
69+
enable-cache: "true"
70+
cache-suffix: ${{ matrix.python-version }}
71+
cache-dependency-glob: "**requirements*.txt"
72+
- name: clone-marimo
73+
run: |
74+
git clone https://github.com/marimo-team/marimo.git --depth=1
75+
cd marimo
76+
git log
77+
- name: install-basics
78+
run: uv pip install --upgrade tox virtualenv setuptools hatch --system
79+
- name: install-marimo-dev
80+
run: |
81+
cd marimo
82+
uv pip install -e ".[dev]" --system
83+
- name: install-narwhals-dev
84+
run: |
85+
uv pip uninstall narwhals --system
86+
uv pip install -e . --system
87+
- name: show-deps
88+
run: uv pip freeze
89+
- name: Create assets directory, copy over index.html
90+
continue-on-error: true
91+
run: |
92+
mkdir -p marimo/marimo/_static/assets
93+
cp marimo/frontend/index.html marimo/marimo/_static/index.html
94+
cp marimo/frontend/public/favicon.ico marimo/marimo/_static/favicon.ico
95+
- name: Run tests with full dependencies
96+
if: ${{ matrix.dependencies == 'core,optional' }}
97+
run: |
98+
cd marimo
99+
hatch run +py=${{ matrix.python-version }} test-optional:test-narwhals
100+
timeout-minutes: 15
101+
- name: Run typechecks
102+
run: |
103+
cd marimo
104+
hatch run typecheck:check
105+
53106
scikit-lego:
54107
strategy:
55108
matrix:
@@ -63,7 +116,7 @@ jobs:
63116
with:
64117
python-version: ${{ matrix.python-version }}
65118
- name: Install uv
66-
uses: astral-sh/setup-uv@v2
119+
uses: astral-sh/setup-uv@v3
67120
with:
68121
enable-cache: "true"
69122
cache-suffix: ${{ matrix.python-version }}
@@ -86,3 +139,45 @@ jobs:
86139
run: |
87140
cd scikit-lego
88141
pytest -n auto --disable-warnings --cov=sklego -m "not cvxpy and not formulaic and not umap"
142+
143+
shiny:
144+
strategy:
145+
matrix:
146+
python-version: ["3.12"]
147+
os: [ubuntu-latest]
148+
149+
runs-on: ${{ matrix.os }}
150+
steps:
151+
- uses: actions/checkout@v4
152+
- uses: actions/setup-python@v5
153+
with:
154+
python-version: ${{ matrix.python-version }}
155+
- name: Install uv
156+
uses: astral-sh/setup-uv@v3
157+
with:
158+
enable-cache: "true"
159+
cache-suffix: ${{ matrix.python-version }}
160+
cache-dependency-glob: "**requirements*.txt"
161+
- name: clone-shiny
162+
run: |
163+
git clone https://github.com/posit-dev/py-shiny.git
164+
cd py-shiny
165+
git log
166+
- name: install-basics
167+
run: uv pip install --upgrade tox virtualenv setuptools --system
168+
- name: install-shiny-dev
169+
env:
170+
UV_SYSTEM_PYTHON: 1
171+
run: |
172+
cd py-shiny
173+
make narwhals-install-shiny
174+
- name: install-narwhals-dev
175+
run: |
176+
uv pip uninstall narwhals --system
177+
uv pip install -e . --system
178+
- name: show-deps
179+
run: uv pip freeze
180+
- name: Run `make narwhals-test-integration`
181+
run: |
182+
cd py-shiny
183+
make narwhals-test-integration

.github/workflows/extremes.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v2
22+
uses: astral-sh/setup-uv@v3
2323
with:
2424
enable-cache: "true"
2525
cache-suffix: ${{ matrix.python-version }}
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
python-version: ${{ matrix.python-version }}
4848
- name: Install uv
49-
uses: astral-sh/setup-uv@v2
49+
uses: astral-sh/setup-uv@v3
5050
with:
5151
enable-cache: "true"
5252
cache-suffix: ${{ matrix.python-version }}
@@ -59,8 +59,6 @@ jobs:
5959
run: uv pip freeze
6060
- name: Run pytest
6161
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
62-
- name: Run doctests
63-
run: pytest narwhals --doctest-modules
6462

6563
not_so_old_versions:
6664
strategy:
@@ -75,7 +73,7 @@ jobs:
7573
with:
7674
python-version: ${{ matrix.python-version }}
7775
- name: Install uv
78-
uses: astral-sh/setup-uv@v2
76+
uses: astral-sh/setup-uv@v3
7977
with:
8078
enable-cache: "true"
8179
cache-suffix: ${{ matrix.python-version }}
@@ -88,13 +86,11 @@ jobs:
8886
run: uv pip freeze
8987
- name: Run pytest
9088
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
91-
- name: Run doctests
92-
run: pytest narwhals --doctest-modules
9389

9490
nightlies:
9591
strategy:
9692
matrix:
97-
python-version: ["3.11"]
93+
python-version: ["3.12"]
9894
os: [ubuntu-latest]
9995
if: github.event.pull_request.head.repo.full_name == github.repository
10096
runs-on: ${{ matrix.os }}
@@ -104,7 +100,7 @@ jobs:
104100
with:
105101
python-version: ${{ matrix.python-version }}
106102
- name: Install uv
107-
uses: astral-sh/setup-uv@v2
103+
uses: astral-sh/setup-uv@v3
108104
with:
109105
enable-cache: "true"
110106
cache-suffix: ${{ matrix.python-version }}
@@ -119,6 +115,8 @@ jobs:
119115
kaggle kernels output "marcogorelli/variable-brink-glacier"
120116
- name: install-polars
121117
run: python -m pip install *.whl
118+
- name: install-pandas-nightly
119+
run: pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas
122120
- name: install-reqs
123121
run: uv pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt --system
124122
- name: uninstall pyarrow
@@ -127,8 +125,8 @@ jobs:
127125
# run: uv pip install --extra-index-url https://pypi.fury.io/arrow-nightlies/ --pre pyarrow --system
128126
- name: uninstall pandas
129127
run: uv pip uninstall pandas --system
130-
- name: install-pandas-nightly
131-
run: uv pip install --prerelease=allow --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas --system
128+
- name: show-deps
129+
run: uv pip freeze
132130
- name: uninstall numpy
133131
run: uv pip uninstall numpy --system
134132
- name: install numpy nightly

.github/workflows/mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
path: .cache
2828
restore-keys: |
2929
mkdocs-material-
30-
- run: pip install -r docs/requirements-docs.txt -e . pandas polars
30+
- run: pip install -r docs/requirements-docs.txt -e . pandas polars pyarrow
3131

3232
- run: mkdocs gh-deploy --force

.github/workflows/pytest.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ jobs:
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v2
22+
uses: astral-sh/setup-uv@v3
2323
with:
2424
enable-cache: "true"
2525
cache-suffix: ${{ matrix.python-version }}
2626
cache-dependency-glob: "**requirements*.txt"
2727
- name: install-reqs
28-
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt ibis-framework[duckdb] --system
28+
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
2929
- name: show-deps
3030
run: uv pip freeze
3131
- name: Run pytest
3232
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=85
33-
- name: Run doctests
34-
run: pytest narwhals --doctest-modules
3533

3634
pytest-windows:
3735
strategy:
@@ -46,7 +44,7 @@ jobs:
4644
with:
4745
python-version: ${{ matrix.python-version }}
4846
- name: Install uv
49-
uses: astral-sh/setup-uv@v2
47+
uses: astral-sh/setup-uv@v3
5048
with:
5149
enable-cache: "true"
5250
cache-suffix: ${{ matrix.python-version }}
@@ -59,8 +57,6 @@ jobs:
5957
run: uv pip freeze
6058
- name: Run pytest
6159
run: pytest tests --cov=narwhals --cov=tests --runslow --cov-fail-under=95
62-
- name: Run doctests
63-
run: pytest narwhals --doctest-modules
6460

6561
pytest-coverage:
6662
strategy:
@@ -75,7 +71,7 @@ jobs:
7571
with:
7672
python-version: ${{ matrix.python-version }}
7773
- name: Install uv
78-
uses: astral-sh/setup-uv@v2
74+
uses: astral-sh/setup-uv@v3
7975
with:
8076
enable-cache: "true"
8177
cache-suffix: ${{ matrix.python-version }}
@@ -87,11 +83,12 @@ jobs:
8783
- name: show-deps
8884
run: uv pip freeze
8985
- name: install ibis
90-
run: uv pip install ibis-framework[duckdb] --system
86+
run: uv pip install ibis-framework[duckdb]>=6.0.0 --system
9187
# Ibis puts upper bounds on dependencies, and requires Python3.10+,
9288
# which messes with other dependencies on lower Python versions
9389
if: matrix.python-version == '3.12'
9490
- name: Run pytest
9591
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=100 --runslow
9692
- name: Run doctests
93+
if: matrix.python-version == '3.12'
9794
run: pytest narwhals --doctest-modules

.github/workflows/random_ci_pytest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
python-version: ${{ matrix.python-version }}
1919
- name: Install uv
20-
uses: astral-sh/setup-uv@v2
20+
uses: astral-sh/setup-uv@v3
2121
with:
2222
enable-cache: "true"
2323
cache-suffix: ${{ matrix.python-version }}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@ tpch/data/*
3232
# VSCode
3333
.vscode/
3434

35+
# IntelliJ IDEA / PyCharm
36+
.idea/
37+
3538
# MacOS
3639
.DS_Store

0 commit comments

Comments
 (0)