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

docs(python): Small clarifications in the contributing guide #14310

Merged
merged 3 commits into from
Feb 6, 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
2 changes: 1 addition & 1 deletion docs/development/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ From the `py-polars` directory, run `make fmt` to make sure your additions pass

Polars uses Sphinx to build the API reference.
This means docstrings in general should follow the [reST](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) format.
If you want to build the API reference locally, go to the `py-polars/docs` directory and run `make html SPHINXOPTS=-W`.
If you want to build the API reference locally, go to the `py-polars/docs` directory and run `make html`.
The resulting HTML files will be in `py-polars/docs/build/html`.

New additions to the API should be added manually to the API reference by adding an entry to the correct `.rst` file in the `py-polars/docs/source/reference` directory.
Expand Down
3 changes: 2 additions & 1 deletion docs/development/contributing/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Slow tests are marked as such using a [custom pytest marker](https://docs.pytest
If you wish to run slow tests, run `pytest -m slow`.
Or run `pytest -m ""` to run _all_ tests, regardless of marker.

Tests can be run in parallel using [`pytest-xdist`](https://pytest-xdist.readthedocs.io/en/latest/). Run `pytest -n auto` to parallelize your test run.
Tests can be run in parallel by running `pytest -n auto`.
The parallelization is handled by [`pytest-xdist`](https://pytest-xdist.readthedocs.io/en/latest/).

### Writing unit tests

Expand Down
9 changes: 4 additions & 5 deletions py-polars/tests/unit/io/test_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def test_write_delta_with_merge_and_no_table(tmp_path: Path) -> None:
def test_write_delta_with_merge(tmp_path: Path) -> None:
df = pl.DataFrame({"a": [1, 2, 3]})

df.write_delta(tmp_path, mode="append")
df.write_delta(tmp_path)

merger = df.write_delta(
tmp_path,
Expand All @@ -407,8 +407,7 @@ def test_write_delta_with_merge(tmp_path: Path) -> None:

merger.when_matched_delete(predicate="t.a > 2").execute()

table = pl.read_delta(str(tmp_path))
result = pl.read_delta(str(tmp_path))

# TODO: Re-enable row order check after issue is resolved:
# https://github.com/delta-io/delta-rs/issues/2165
assert_frame_equal(df.filter(pl.col("a") <= 2), table, check_row_order=False)
expected = df.filter(pl.col("a") <= 2)
assert_frame_equal(result, expected, check_row_order=False)
Loading