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

GH-35906: [Docs] Enable building the documentation without having pyarrow installed #35907

Merged
merged 6 commits into from
Jun 21, 2023

Conversation

AlenkaF
Copy link
Member

@AlenkaF AlenkaF commented Jun 5, 2023

Rationale for this change

Ease the process of building the documentation for dev purposes.

What changes are included in this PR?

conf.py is updated in a way to permit having pyarrow not installed (from source or as a binary).
In case pyarrow is not available:

  • docs/source/python folder will be excluded from the build of the documentation
  • version of the documentation will be set to '0.0.0-local-docs-build'

I have tested the changes for cases when:

  • pyarrow was built from source
  • without pyarrow
  • pyarrow was installed from PyPI, version 12.0.0

with building all of the docs and only format/developers sections.

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of PARQUET issues on JIRA the title also supports:

PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@AlenkaF AlenkaF changed the title Add a change to conf.py to build docs without pyarrow installed GH-35906: [Docs] Enable the build of the documentation without pyarrow built from source Jun 5, 2023
@github-actions
Copy link

github-actions bot commented Jun 5, 2023

⚠️ GitHub issue #35906 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

One question: this is excluding the full of the python docs. Longer term, should we try to only exclude the API docs? (there are currently a few files in the python/ directory that require pyarrow to be installed to run the examples in the ipython directives, but many files also don't have this, and could in theory be built without pyarrow being installed)

docs/source/conf.py Outdated Show resolved Hide resolved
docs/source/conf.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting changes Awaiting changes awaiting review Awaiting review awaiting committer review Awaiting committer review and removed awaiting review Awaiting review awaiting changes Awaiting changes awaiting committer review Awaiting committer review labels Jun 6, 2023
@AlenkaF
Copy link
Member Author

AlenkaF commented Jun 6, 2023

One question: this is excluding the full of the python docs. Longer term, should we try to only exclude the API docs? (there are currently a few files in the python/ directory that require pyarrow to be installed to run the examples in the ipython directives, but many files also don't have this, and could in theory be built without pyarrow being installed)

Excluding files with ipython directives ('python/data.rst', 'python/dataset.rst', 'python/getstarted.rst', 'python/ipc.rst', 'python/memory.rst', 'python/pandas.rst', 'python/parquet.rst') and 'python/filesystems_deprecated.rst' with the HDFS API autosummary list, I still get an error


Sphinx parallel build error:
ModuleNotFoundError: No module named 'pyarrow.lib'
make: *** [html] Error 2

and I think it is connected to all 33 .rst files that have .. currentmodule:: pyarrow (but am not sure). At this point I decided this doesn't make much sense and it is better just to exclude full of the python docs.

I can try a bit further to see where I get, if you think this would be beneficial? But I do think if one is building the docs without even binary version of pyarrow then the need for python docs is not very high.

@jorisvandenbossche
Copy link
Member

I can try a bit further to see where I get, if you think this would be beneficial? But I do think if one is building the docs without even binary version of pyarrow then the need for python docs is not very high.

Yes, it certainly is less important (given that you need some python environment anyway, given that we are using sphinx to build the docs). So let's not worry about that use case here.

@jorisvandenbossche jorisvandenbossche changed the title GH-35906: [Docs] Enable the build of the documentation without pyarrow built from source GH-35906: [Docs] Enable building the documentation without pyarrow built from source Jun 14, 2023
@jorisvandenbossche jorisvandenbossche changed the title GH-35906: [Docs] Enable building the documentation without pyarrow built from source GH-35906: [Docs] Enable building the documentation without having pyarrow installed Jun 14, 2023
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 15, 2023
@AlenkaF
Copy link
Member Author

AlenkaF commented Jun 15, 2023

This PR should be ready now @jorisvandenbossche

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Jun 15, 2023
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 16, 2023
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Jun 21, 2023
@AlenkaF AlenkaF merged commit 65d603a into apache:main Jun 21, 2023
6 checks passed
@AlenkaF AlenkaF deleted the build-docs-without-pyarrow branch June 21, 2023 10:47
@conbench-apache-arrow
Copy link

Conbench analyzed the 6 benchmark runs on commit 65d603ae.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Enable the build of the documentation without pyarrow built from source
2 participants