Skip to content

Commit

Permalink
merge main, resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Oct 19, 2024
2 parents 6326446 + 0c1650c commit cf2366d
Show file tree
Hide file tree
Showing 329 changed files with 8,388 additions and 8,910 deletions.
6 changes: 5 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
exclude-labels:
- skip changelog
- ignore
- release
- dependencies
name-template: 'Narwhals v$RESOLVED_VERSION'

change-template: '- $TITLE (#$NUMBER)'
Expand Down Expand Up @@ -34,6 +35,9 @@ autolabeler:
- label: release
title:
- '/^([Rr]elease)/'
- label: ignore
title:
- '/^\[pre-commit.ci\]/'

version-resolver:
major:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Bump version

on:
workflow_dispatch:
inputs:
release_type:
description: 'Type of version bump: patch, minor, or major'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major

jobs:
bump-version:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: bump version
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b bump-version
git remote rename origin upstream
python utils/bump_version.py ${{ github.event.inputs.release_type }}
- name: Create pull request
uses: actions/github-script@v7
if: github.actor == 'MarcoGorelli' || github.actor == 'FBruzzesi'
with:
script: |
const branch = `bump-version`
github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head: branch,
base: 'main',
body: 'Bumping the version to reflect the latest release type.',
})
2 changes: 1 addition & 1 deletion .github/workflows/check_docs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_tpch_queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand Down
99 changes: 97 additions & 2 deletions .github/workflows/downstream_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand Down Expand Up @@ -50,6 +50,59 @@ jobs:
cd altair
mypy altair tests
marimo:
strategy:
matrix:
python-version: ["3.12"]
os: [ubuntu-latest]
dependencies: ["core", "core,optional"]

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@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: clone-marimo
run: |
git clone https://github.com/marimo-team/marimo.git --depth=1
cd marimo
git log
- name: install-basics
run: uv pip install --upgrade tox virtualenv setuptools hatch --system
- name: install-marimo-dev
run: |
cd marimo
uv pip install -e ".[dev]" --system
- name: install-narwhals-dev
run: |
uv pip uninstall narwhals --system
uv pip install -e . --system
- name: show-deps
run: uv pip freeze
- name: Create assets directory, copy over index.html
continue-on-error: true
run: |
mkdir -p marimo/marimo/_static/assets
cp marimo/frontend/index.html marimo/marimo/_static/index.html
cp marimo/frontend/public/favicon.ico marimo/marimo/_static/favicon.ico
- name: Run tests with full dependencies
if: ${{ matrix.dependencies == 'core,optional' }}
run: |
cd marimo
hatch run +py=${{ matrix.python-version }} test-optional:test-narwhals
timeout-minutes: 15
- name: Run typechecks
run: |
cd marimo
hatch run typecheck:check
scikit-lego:
strategy:
matrix:
Expand All @@ -63,7 +116,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand All @@ -86,3 +139,45 @@ jobs:
run: |
cd scikit-lego
pytest -n auto --disable-warnings --cov=sklego -m "not cvxpy and not formulaic and not umap"
shiny:
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: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: clone-shiny
run: |
git clone https://github.com/posit-dev/py-shiny.git
cd py-shiny
git log
- name: install-basics
run: uv pip install --upgrade tox virtualenv setuptools --system
- name: install-shiny-dev
env:
UV_SYSTEM_PYTHON: 1
run: |
cd py-shiny
make narwhals-install-shiny
- name: install-narwhals-dev
run: |
uv pip uninstall narwhals --system
uv pip install -e . --system
- name: show-deps
run: uv pip freeze
- name: Run `make narwhals-test-integration`
run: |
cd py-shiny
make narwhals-test-integration
20 changes: 9 additions & 11 deletions .github/workflows/extremes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand All @@ -46,7 +46,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand All @@ -59,8 +59,6 @@ jobs:
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
- name: Run doctests
run: pytest narwhals --doctest-modules

not_so_old_versions:
strategy:
Expand All @@ -75,7 +73,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand All @@ -88,13 +86,11 @@ jobs:
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
- name: Run doctests
run: pytest narwhals --doctest-modules

nightlies:
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
os: [ubuntu-latest]
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ matrix.os }}
Expand All @@ -104,7 +100,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand All @@ -119,6 +115,8 @@ jobs:
kaggle kernels output "marcogorelli/variable-brink-glacier"
- name: install-polars
run: python -m pip install *.whl
- name: install-pandas-nightly
run: pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas
- name: install-reqs
run: uv pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt --system
- name: uninstall pyarrow
Expand All @@ -127,8 +125,8 @@ jobs:
# run: uv pip install --extra-index-url https://pypi.fury.io/arrow-nightlies/ --pre pyarrow --system
- name: uninstall pandas
run: uv pip uninstall pandas --system
- name: install-pandas-nightly
run: uv pip install --prerelease=allow --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pandas --system
- name: show-deps
run: uv pip freeze
- name: uninstall numpy
run: uv pip uninstall numpy --system
- name: install numpy nightly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r docs/requirements-docs.txt -e . pandas polars
- run: pip install -r docs/requirements-docs.txt -e . pandas polars pyarrow

- run: mkdocs gh-deploy --force
15 changes: 6 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: install-reqs
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt ibis-framework[duckdb] --system
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
- name: show-deps
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=85
- name: Run doctests
run: pytest narwhals --doctest-modules

pytest-windows:
strategy:
Expand All @@ -46,7 +44,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand All @@ -59,8 +57,6 @@ jobs:
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --runslow --cov-fail-under=95
- name: Run doctests
run: pytest narwhals --doctest-modules

pytest-coverage:
strategy:
Expand All @@ -75,7 +71,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand All @@ -87,11 +83,12 @@ jobs:
- name: show-deps
run: uv pip freeze
- name: install ibis
run: uv pip install ibis-framework[duckdb] --system
run: uv pip install ibis-framework[duckdb]>=6.0.0 --system
# Ibis puts upper bounds on dependencies, and requires Python3.10+,
# which messes with other dependencies on lower Python versions
if: matrix.python-version == '3.12'
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=100 --runslow
- name: Run doctests
if: matrix.python-version == '3.12'
run: pytest narwhals --doctest-modules
2 changes: 1 addition & 1 deletion .github/workflows/random_ci_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v2
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ tpch/data/*
# VSCode
.vscode/

# IntelliJ IDEA / PyCharm
.idea/

# MacOS
.DS_Store
Loading

0 comments on commit cf2366d

Please sign in to comment.