Skip to content

[py] Auto-generate Python API docs from code #15822

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ py/selenium/webdriver/remote/isDisplayed.js
py/docs/build/
py/docs/source/**/*
!py/docs/source/conf.py
!py/docs/source/*.rst
py/build/
py/LICENSE
py/pytestdebug.log
Expand Down
3 changes: 2 additions & 1 deletion py/docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ version: 2
build:
os: ubuntu-24.04
tools:
python: "3.11"
python: "3.12"
commands:
- pip install -r py/docs/requirements.txt
- pip install -r py/requirements.txt
- PYTHONPATH=py python3 py/generate_api_module_listing.py
- PYTHONPATH=py sphinx-autogen -o $READTHEDOCS_OUTPUT/html py/docs/source/api.rst
- PYTHONPATH=py sphinx-build -b html -d build/docs/doctrees py/docs/source $READTHEDOCS_OUTPUT/html

Expand Down
131 changes: 0 additions & 131 deletions py/docs/Makefile

This file was deleted.

14 changes: 3 additions & 11 deletions py/docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,14 @@ and develop the Python docs.
To clean up the build assets and tox cache
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Although there is a Sphinx Makefile option, to clean up using the tox environment above, one can
manually clean the build assets by deleting the ``build`` directory on the root (``selenium/build``
using the default directory on git clone). Note that tox caches parts of the build and recognizes
changes to speed up the build. To start fresh, delete the aformentioned directory to clean the
Sphinx build assets and delete the ``selenium/py/.tox`` directory to clean the tox environment.
After using the tox environment above, you can clean up the build assets by deleting the ``build``
directory in the root of the repo. Note that tox caches parts of the build and recognizes changes
to speed up the build. To start fresh, delete the ``py/.tox`` directory to clean the tox environment.


Known documentation issues
==========================

The API Reference primarily builds from the source code. But currently the initial template stating
which modules to document is hard coded within ``py/docs/source/api.rst``. So if modules are added or
removed, then the generated docs will be inaccurate. It would be preferred that the API docs generate
soley from the code if possible. This is being tracked in
`#14178 <https://github.com/SeleniumHQ/selenium/issues/14178>`_

We are working through the Sphinx build warnings and errors, trying to clean up both the syntax and
the build.

Expand Down
Loading