Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: nox doctests only in Python 3.12 #1222

Merged
merged 3 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions narwhals/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,9 @@ def write_parquet(self, file: str | Path | BytesIO) -> Any:

We can then pass either pandas, Polars or PyArrow to `func`:

>>> func(df_pd)
>>> func(df_pl)
>>> func(df_pa)
>>> func(df_pd) # doctest:+SKIP
>>> func(df_pl) # doctest:+SKIP
>>> func(df_pa) # doctest:+SKIP
Comment on lines +585 to +587
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these will create a foo.parquet locally. If we don't want to skip them, I'll add the file to .gitignore

what do you think? :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would opt for skipping those! Nice catch πŸ‘Œ

"""
self._compliant_frame.write_parquet(file)

Expand Down
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def run_common(session: Session, coverage_threshold: float) -> None:
f"--cov-fail-under={coverage_threshold}",
"--runslow",
)
session.run("pytest", "narwhals", "--doctest-modules")

if session.python == "3.12":
session.run("pytest", "narwhals", "--doctest-modules")


@nox.session(python=PYTHON_VERSIONS) # type: ignore[misc]
Expand Down
Loading