Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4aa58d2
Move to code-block in memory.rst
AlenkaF Dec 16, 2025
b149ba1
Add conftest in python docs folder
AlenkaF Dec 16, 2025
6b2acf9
Update getstarted.rst
AlenkaF Dec 16, 2025
fdc592c
Update data.rstz
AlenkaF Dec 16, 2025
fafaa94
Update dataset.rst
AlenkaF Dec 16, 2025
47eda37
Update ipc.rst and pandas.rst
AlenkaF Dec 17, 2025
66b824f
Update parquet.rst
AlenkaF Dec 18, 2025
5d0b46e
Add doctest glob to CI and docs
AlenkaF Dec 19, 2025
9d8d9df
Update extending_types.rst
AlenkaF Dec 19, 2025
9747b41
Update compute.rst
AlenkaF Dec 19, 2025
df299e0
Update csv.rst
AlenkaF Dec 19, 2025
7e42690
Update dlpack.rst
AlenkaF Dec 19, 2025
9a0e31c
Update filesystems.rst
AlenkaF Dec 19, 2025
d8af83f
Update install.rst
AlenkaF Dec 19, 2025
fcc35df
Update install.rst
AlenkaF Dec 19, 2025
88581ef
Update substrait.rst
AlenkaF Dec 19, 2025
b893cc7
Update interchange_protocol.rst
AlenkaF Dec 22, 2025
2139207
Update json.rst
AlenkaF Dec 22, 2025
dc96f32
Update numpy.rst
AlenkaF Dec 22, 2025
693851e
Update orc.rst
AlenkaF Dec 22, 2025
873d279
Update timestamps.rst
AlenkaF Dec 22, 2025
c6b1d6a
Remove trailing-whitespaces
AlenkaF Dec 23, 2025
a9691d9
Try running doctest-glob separately
AlenkaF Dec 23, 2025
b469523
Remove type - forgotten -r
AlenkaF Dec 23, 2025
de96904
Move location to python_test.sh, fix missing trailing space with ...
AlenkaF Dec 23, 2025
8f552a2
Skip doctest-glob if not documentation job
AlenkaF Dec 23, 2025
70ad664
Fix single quotes
AlenkaF Dec 23, 2025
9b66529
Fix CI failure in parquet.rst
AlenkaF Dec 23, 2025
4119721
Fix other isntances of serialized_size
AlenkaF Dec 23, 2025
351645c
Try passing PYTEST_RST_ARGS in docs_light.yml
AlenkaF Dec 23, 2025
9a07526
Try passing PYTEST_RST_ARGS sooner
AlenkaF Dec 23, 2025
0fab4bc
Revert "Try passing PYTEST_RST_ARGS sooner"
AlenkaF Jan 7, 2026
2f0f3cd
Revert "Try passing PYTEST_RST_ARGS in docs_light.yml"
AlenkaF Jan 7, 2026
1d62830
Fix table1.join non-deterministic outcome
AlenkaF Jan 8, 2026
e07fad5
Update Python in Sphinx & Numpydoc to 3.12
AlenkaF Jan 8, 2026
9bd80b8
Revert "Update Python in Sphinx & Numpydoc to 3.12"
AlenkaF Jan 8, 2026
1fb6f0a
DO not use datetime.now() in examples
AlenkaF Jan 9, 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