Skip to content

Commit

Permalink
docs(python): Small clarifications in the contributing guide (#14310)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Feb 6, 2024
1 parent dd13f75 commit 7070368
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
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)

0 comments on commit 7070368

Please sign in to comment.