5 Commits
Author SHA1 Message Date
Alenka Frimandtadeja 12cdb09e32 GH-28859: [Doc][Python] Use only code-block directive and set up doctest for the python user guide (#48619)
### Rationale for this change

In many places in the Python User Guide the code exampels are written with IPython directive (elsewhere code-block is used). IPython directives are converted to IPython format (`In` and `Out` during the doc build). This can lead to slower builds.

### What changes are included in this PR?

IPython directives are converted to runnable code-block (with `>>>` and `...`) and pytest doctest support for `.rst` files is added to the `conda-python-docs` CI job. This means the code in the Python User Guide is tested separately to the building  of the documentation.

### Are these changes tested?

Yes, with the CI.

### Are there any user-facing changes?

Changes to the Python User Guide examples will have to be tested with `pytest --doctest-glob='*.rst' docs/source/python/file.rst`

* GitHub Issue: #28859

Lead-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Co-authored-by: tadeja <tadeja@users.noreply.github.com>
Signed-off-by: AlenkaF <frim.alenka@gmail.com>
2026-01-30 09:09:33 +01:00
Xuchen PanandAkshay Subramanian 16c7f1a0bb GH-14932: [Python] Add python bindings for JSON streaming reader (#45084)
### Rationale for this change

The C++ arrow has a JSON streaming reader which is not exposed on the Python interface.

### What changes are included in this PR?

This PR is based on #33761. It adds the `open_json` method to open a streaming reader for a JSON file.

### Are these changes tested?

Yes

### Are there any user-facing changes?

Yes. A new `open_json` method has been added to the Python interface, located at `pyarrow.json.open_json`, and its parameters are the same as the `pyarrow.json.read_json`

* GitHub Issue: #14932

Lead-authored-by: pxc <panxuchen.pxc@alibaba-inc.com>
Co-authored-by: Akshay Subramanian <asubramanian@grailbio.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
2025-02-06 14:47:52 +01:00
Bryce Mecum 0f7e9af437 GH-39990: [Docs][CI] Add sphinx-lint for docs linting (#40022)
### What changes are included in this PR?

This adds developer tooling to the repo for linting the docs by adding the sphinx-lint tool to archery and our pre-commit hooks. In both locations, only two rules are enabled at the moment (Discussed in https://github.com/apache/arrow/pull/40006): `trailing-whitespace` and `missing-final-newline`.

This PR also fixes the individual issues covered by the new tooling. 

### Are these changes tested?

Yes, though manually. I tested this works by running `archery lint --docs` and `pre-commit` without and without changes that should get caught by the rules. It works as expected.

### Are there any user-facing changes?

Yes,

1. Developers that use pre-commit hooks will see a change in behavior when they modify docs
2. Developers using archery will see a new --docs option in `archery lint`
3. Developers working on the docs may see CI failures related to the new checks

* Closes: #39990
* GitHub Issue: #39990

Authored-by: Bryce Mecum <petridish@gmail.com>
Signed-off-by: Bryce Mecum <petridish@gmail.com>
2024-04-30 17:27:26 -08:00
arw2019 78b96de0f8 ARROW-7226: [Python][Doc] Add note re: JSON format support
Closes #8055 from arw2019/ARROW-7226

Authored-by: arw2019 <andrew.r.wieteska@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
2020-09-02 14:35:08 +02:00
Antoine Pitrou ac4a9ef109 ARROW-5556: [Doc] [Python] Document JSON reader
Author: Antoine Pitrou <antoine@python.org>

Closes #4521 from pitrou/ARROW-5556-py-json-docs and squashes the following commits:

40064de97 <Antoine Pitrou> Address review comments
65f357a6b <Antoine Pitrou> ARROW-5556:   Document JSON reader
2019-06-12 10:57:27 -05:00