Skip to content

Commit

Permalink
WIP: extremes and pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
akmalsoliev committed Oct 15, 2024
1 parent c3230b4 commit 09eb5a2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/extremes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: install-reqs
run: uv sync --extra dev --upgrade
- name: install-minimum-versions
run: uv pip install tox virtualenv setuptools pandas==0.25.3 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata --system
- name: install-reqs
run: uv pip install -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=50 --runslow
run: uv run pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow

pretty_old_versions:
strategy:
Expand All @@ -51,16 +51,16 @@ jobs:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: install-reqs
run: uv sync --extra dev --upgrade
- name: install-minimum-versions
run: uv pip install tox virtualenv setuptools pandas==1.1.5 polars==0.20.3 numpy==1.17.5 pyarrow==11.0.0 scipy==1.5.0 scikit-learn==1.1.0 tzdata --system
- name: install-reqs
run: uv pip install -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=50 --runslow
run: uv run pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
- name: Run doctests
run: pytest narwhals --doctest-modules
run: uv run pytest narwhals --doctest-modules

not_so_old_versions:
strategy:
Expand All @@ -80,16 +80,16 @@ jobs:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: install-reqs
run: uv sync --extra dev --upgrade
- name: install-minimum-versions
run: uv pip install tox virtualenv setuptools pandas==2.0.3 polars==0.20.8 numpy==1.24.4 pyarrow==14.0.0 scipy==1.8.0 scikit-learn==1.3.0 dask[dataframe]==2024.7 tzdata --system
- name: install-reqs
run: uv pip install -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=50 --runslow
run: uv run pytest tests --cov=narwhals --cov=tests --cov-fail-under=50 --runslow
- name: Run doctests
run: pytest narwhals --doctest-modules
run: uv run pytest narwhals --doctest-modules

nightlies:
strategy:
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ jobs:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: sync
run: uv sync --extra dev --upgrade
- name: install-reqs
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
run: uv pip install --upgrade tox virtualenv setuptools --system
- name: show-deps
run: uv pip freeze
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=85
run: uv run pytest tests --cov=narwhals --cov=tests --cov-fail-under=85
- name: Run doctests
if: startsWith(matrix.os, 'windows') != true
run: pytest narwhals --doctest-modules
run: uv run pytest narwhals --doctest-modules

pytest-windows:
strategy:
Expand All @@ -52,16 +54,18 @@ jobs:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: sync
run: uv sync --extra dev --upgrade
- name: install-reqs
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
run: uv pip install --upgrade tox virtualenv setuptools --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
run: uv run pytest tests --cov=narwhals --cov=tests --runslow --cov-fail-under=95
- name: Run doctests
run: pytest narwhals --doctest-modules
run: uv run pytest narwhals --doctest-modules

pytest-coverage:
strategy:
Expand All @@ -81,8 +85,10 @@ jobs:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: sync
run: uv sync --extra dev --upgrade
- name: install-reqs
run: uv pip install --upgrade tox virtualenv setuptools -r requirements-dev.txt --system
run: uv pip install --upgrade tox virtualenv setuptools --system
- name: install-modin
run: uv pip install --upgrade modin[dask] --system
- name: show-deps
Expand All @@ -93,6 +99,6 @@ jobs:
# 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
run: uv run pytest tests --cov=narwhals --cov=tests --cov-fail-under=100 --runslow
- name: Run doctests
run: pytest narwhals --doctest-modules
run: uv run pytest narwhals --doctest-modules

0 comments on commit 09eb5a2

Please sign in to comment.