Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
43ae291
Move to code-block in memory.rst
AlenkaF Dec 16, 2025
0bad43d
Add conftest in python docs folder
AlenkaF Dec 16, 2025
77199c1
Update getstarted.rst
AlenkaF Dec 16, 2025
91c852f
Update data.rstz
AlenkaF Dec 16, 2025
29493be
Update dataset.rst
AlenkaF Dec 16, 2025
c95fc57
Update ipc.rst and pandas.rst
AlenkaF Dec 17, 2025
af4f480
Update parquet.rst
AlenkaF Dec 18, 2025
159e866
Add doctest glob to CI and docs
AlenkaF Dec 19, 2025
a0ce23d
Update extending_types.rst
AlenkaF Dec 19, 2025
ffb7c66
Update compute.rst
AlenkaF Dec 19, 2025
18ab576
Update csv.rst
AlenkaF Dec 19, 2025
81c377c
Update dlpack.rst
AlenkaF Dec 19, 2025
f9f9788
Update filesystems.rst
AlenkaF Dec 19, 2025
0185212
Update install.rst
AlenkaF Dec 19, 2025
fd8816d
Update install.rst
AlenkaF Dec 19, 2025
dceba1b
Update substrait.rst
AlenkaF Dec 19, 2025
d125cc2
Update interchange_protocol.rst
AlenkaF Dec 22, 2025
5042445
Update json.rst
AlenkaF Dec 22, 2025
3a57b10
Update numpy.rst
AlenkaF Dec 22, 2025
a26af94
Update orc.rst
AlenkaF Dec 22, 2025
b9efe1b
Update timestamps.rst
AlenkaF Dec 22, 2025
438dc10
Remove trailing-whitespaces
AlenkaF Dec 23, 2025
77a206a
Try running doctest-glob separately
AlenkaF Dec 23, 2025
192d2a2
Remove type - forgotten -r
AlenkaF Dec 23, 2025
e6516eb
Move location to python_test.sh, fix missing trailing space with ...
AlenkaF Dec 23, 2025
ea2d02d
Skip doctest-glob if not documentation job
AlenkaF Dec 23, 2025
9f1ad24
Fix single quotes
AlenkaF Dec 23, 2025
78b42dd
Fix CI failure in parquet.rst
AlenkaF Dec 23, 2025
31f1364
Fix other isntances of serialized_size
AlenkaF Dec 23, 2025
72364f2
Try passing PYTEST_RST_ARGS in docs_light.yml
AlenkaF Dec 23, 2025
6b79b0d
Try passing PYTEST_RST_ARGS sooner
AlenkaF Dec 23, 2025
2a4ed1b
Revert "Try passing PYTEST_RST_ARGS sooner"
AlenkaF Jan 7, 2026
bebc248
Revert "Try passing PYTEST_RST_ARGS in docs_light.yml"
AlenkaF Jan 7, 2026
1fd3031
Fix table1.join non-deterministic outcome
AlenkaF Jan 8, 2026
25bbe8c
Update Python in Sphinx & Numpydoc to 3.12
AlenkaF Jan 8, 2026
bab2d0f
Revert "Update Python in Sphinx & Numpydoc to 3.12"
AlenkaF Jan 8, 2026
a4a7817
DO not use datetime.now() in examples
AlenkaF Jan 9, 2026
f68926a
Add blanklines between function definitions
AlenkaF Jan 13, 2026
58c71c9
Fix memory example - use context manager
AlenkaF Jan 13, 2026
71f6c78
Remove unused import
AlenkaF Jan 13, 2026
ba0f508
Add skip to the imports also
AlenkaF Jan 13, 2026
3543d56
Update docs/source/python/data.rst
AlenkaF Jan 14, 2026
a272fab
Fix indentation
AlenkaF Jan 19, 2026
13056f4
Keep spark timestamp example outputs as they were
AlenkaF Jan 19, 2026
9fbd079
Remove forgotten <blankline>
AlenkaF Jan 19, 2026
5fcb2cf
Make fixture more robust
AlenkaF Jan 19, 2026
1209294
Suggestions from Tadeja
AlenkaF Jan 20, 2026
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
5 changes: 5 additions & 0 deletions ci/scripts/python_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,8 @@ export PYARROW_TEST_S3

# Testing PyArrow
pytest -r s ${PYTEST_ARGS} --pyargs pyarrow

# Testing RST documentation examples (if PYTEST_RST_ARGS is set)
if [ -n "${PYTEST_RST_ARGS}" ]; then
pytest ${PYTEST_RST_ARGS} ${arrow_dir}/docs/source/python
fi
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1530,6 +1530,7 @@ services:
BUILD_DOCS_CPP: "ON"
BUILD_DOCS_PYTHON: "ON"
PYTEST_ARGS: "--doctest-modules --doctest-cython"
PYTEST_RST_ARGS: "--doctest-glob=*.rst"
volumes: *conda-volumes
command:
["/arrow/ci/scripts/cpp_build.sh /arrow /build &&
Expand Down
18 changes: 18 additions & 0 deletions docs/source/developers/python/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,24 @@ for ``.py`` files or
for ``.pyx`` and ``.pxi`` files. In this case you will also need to
install the `pytest-cython <https://github.com/lgpage/pytest-cython>`_ plugin.

Testing Documentation Examples
-------------------------------

Documentation examples in ``.rst`` files under ``docs/source/python/`` use
doctest syntax and can be tested locally using:

.. code-block::

$ pushd arrow/python
$ pytest --doctest-glob="*.rst" docs/source/python/file.rst # checking single file
$ pytest --doctest-glob="*.rst" docs/source/python # checking entire directory
$ popd

The examples use standard doctest syntax with ``>>>`` for Python prompts and
``...`` for continuation lines. The ``conftest.py`` fixture automatically
handles temporary directory setup for examples that create files.


Debugging
=========

Expand Down
Loading
Loading