Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into debug-nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Sep 13, 2024
2 parents 067e884 + db383a4 commit 367a8a1
Show file tree
Hide file tree
Showing 5 changed files with 295 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/check_docs_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check Docs Build

on:
pull_request:
push:
branches: [main]

jobs:
mkdocs:
strategy:
matrix:
python-version: ["3.11"]
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@v2
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 pip -r requirements-dev.txt --system
- name: install-docs-reqs
run: uv pip install --upgrade -r docs/requirements-docs.txt --system
- name: local-install
run: uv pip install -e . --system
- name: check-no-errors
run: python -m mkdocs build > output.txt 2>&1
- name: assert-no-errors
run: python utils/check_for_no_build_errors.py
- name: strict-docs-build
run: mkdocs build --strict
34 changes: 34 additions & 0 deletions .github/workflows/check_tpch_queries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests for TPCH Queries

on:
pull_request:
push:
branches: [main]

jobs:
validate-queries:
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@v2
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: install-reqs
run: uv pip install --upgrade -r requirements-dev.txt --system
- name: local-install
run: uv pip install -e . --system
- name: generate-data
run: cd tpch && python generate_data.py
- name: tpch-tests
run: cd tpch && pytest tests
88 changes: 88 additions & 0 deletions .github/workflows/downstream_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Test Downstream Libraries

on:
pull_request:
push:
branches: [main]

jobs:
altair:
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@v2
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: clone-altair
run: |
git clone https://github.com/vega/altair.git --depth=1
cd altair
git log
- name: install-basics
run: uv pip install --upgrade tox virtualenv setuptools --system
- name: install-altair-dev
run: |
cd altair
uv pip install -e ".[dev, all]" --system
- name: install-narwhals-dev
run: |
uv pip uninstall narwhals --system
uv pip install -e . --system
- name: show-deps
run: uv pip freeze
- name: Run pytest
run: |
cd altair
pytest tests
- name: Run mypy
run: |
cd altair
mypy altair tests
scikit-lego:
strategy:
matrix:
python-version: ["3.11"]
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@v2
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: clone-scikit-lego
run: git clone https://github.com/koaning/scikit-lego.git --depth 1
- name: install-basics
run: uv pip install --upgrade tox virtualenv setuptools --system
- name: install-scikit-lego-dev
run: |
cd scikit-lego
uv pip install -e ".[test]" --system
- name: install-narwhals-dev
run: |
uv pip uninstall narwhals --system
uv pip install -e . --system
- name: show-deps
run: uv pip freeze
- name: Run pytest
run: |
cd scikit-lego
pytest -n auto --disable-warnings --cov=sklego -m "not cvxpy and not formulaic and not umap"
97 changes: 97 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: PyTest

on:
pull_request:
push:
branches: [main]

jobs:
pytest-38:
strategy:
matrix:
python-version: ["3.8"]
os: [windows-latest, 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@v2
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
- 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:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [windows-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@v2
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 --system
- name: install-modin
run: uv pip install --upgrade modin[dask] --system
- name: show-deps
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:
matrix:
python-version: ["3.9", "3.10", "3.11", "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@v2
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 --system
- name: install-modin
run: uv pip install --upgrade modin[dask] --system
- name: show-deps
run: uv pip freeze
- name: install ibis
run: uv pip install ibis-framework[duckdb] --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
run: pytest narwhals --doctest-modules
38 changes: 38 additions & 0 deletions .github/workflows/random_ci_pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Random Versions

on:
pull_request:

jobs:
tox:
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@v2
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: install package
run: uv pip install -e . --system
- name: generate-random-versions
run: python utils/generate_random_versions.py
- name: install-reqs
run: uv pip install --upgrade tox virtualenv setuptools --system && uv pip install -r requirements-dev.txt --system
- name: uninstall scipy/sklearn
run: uv pip uninstall scipy scikit-learn --system
- name: install-random-verions
run: uv pip install -r random-requirements.txt --system
- name: show versions
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=80

0 comments on commit 367a8a1

Please sign in to comment.