Skip to content

Commit

Permalink
chore: nox revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Aug 23, 2024
1 parent c68e95e commit c067225
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ todo.md
site/
.coverage.*
.nox
*.lock

docs/api-completeness/*.md
!docs/api-completeness/index.md
34 changes: 27 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ def run_common(session: Session, coverage_threshold: float) -> None:

@nox.session(python=PYTHON_VERSIONS) # type: ignore[misc]
def pytest_coverage(session: Session) -> None:
coverage_threshold = 90 if session.python == "3.8" else 100

session.install("modin[dask]")
if session.python == "3.8":
coverage_threshold = 90
else:
coverage_threshold = 100
session.install("modin[dask]")

run_common(session, coverage_threshold)


@nox.session(python=PYTHON_VERSIONS[0]) # type: ignore[misc]
def minimum_versions(session: Session) -> None:
@nox.parametrize("pandas_version", ["0.25.3", "1.1.5"]) # type: ignore[misc]
def min_and_old_versions(session: Session, pandas_version: str) -> None:
session.install(
"pandas==0.25.3",
f"pandas=={pandas_version}",
"polars==0.20.3",
"numpy==1.17.5",
"pyarrow==11.0.0",
Expand All @@ -46,12 +49,29 @@ def minimum_versions(session: Session) -> None:

@nox.session(python=PYTHON_VERSIONS[-1]) # type: ignore[misc]
def nightly_versions(session: Session) -> None:
session.install("modin[dask]", "polars")
session.install(
session.install("polars")

session.install( # pandas nightly
"--pre",
"--extra-index-url",
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple",
"pandas",
)

session.install( # numpy nightly
"--pre",
"--extra-index-url",
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple",
"numpy",
)

session.run("uv", "pip", "install", "pip")
session.run( # dask nightly
"pip",
"install",
"git+https://github.com/dask/distributed",
"git+https://github.com/dask/dask",
"git+https://github.com/dask/dask-expr",
)

run_common(session, coverage_threshold=50)
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ exclude = [
]

[project.optional-dependencies]
cudf = ["cudf>=23.08.00"]
cudf = ["cudf>=23.08.00; python_version >= '3.9'"]
modin = ["modin"]
pandas = ["pandas>=0.25.3"]
polars = ["polars>=0.20.3"]
pyarrow = ['pyarrow>=11.0.0']
dask = ['dask[dataframe]>=2024.7']
pyarrow = ["pyarrow>=11.0.0"]
dask = ["dask[dataframe]>=2024.7; python_version >= '3.9'"]

[project.urls]
"Homepage" = "https://github.com/narwhals-dev/narwhals"
Expand Down

0 comments on commit c067225

Please sign in to comment.