Skip to content
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
2 changes: 1 addition & 1 deletion py/docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `selenium` package is used to automate web browser interaction from Python.
| **API Docs**: | `api.html <api.html>`_ |
+-------------------+------------------------------------------------+

Updated documentation published with each commit is available at: https://selenium-python-api-docs.readthedocs.io
Updated documentation published with each commit is available at: `readthedocs.io <https://selenium-python-api-docs.readthedocs.io/en/latest>`_

----

Expand Down
18 changes: 9 additions & 9 deletions py/generate_api_module_listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
# specific language governing permissions and limitations
# under the License.

# -----------------------------------------------------------------
# This script recursively scans the `selenium` package directory
# to find all modules, then generates the `py/docs/source/api.rst`
# file containing a listing of all modules in separate sections.
# The `api.rst` file is later used by `sphinx-autogen` to generate
# sphinx autodoc stub pages used in the Python API documentation.
# See `py/tox.ini` for how it is invoked.

"""This script recursively scans the `selenium` package directory
to find all modules, then generates the `py/docs/source/api.rst`
file containing a listing of all modules in separate sections.
The `api.rst` file is later used by `sphinx-autogen` to generate
sphinx autodoc stub pages used in the Python API documentation.
See `py/tox.ini` for how it is invoked."""

import os
import site
Expand All @@ -47,8 +47,8 @@ def find_modules(package_name):
package_name = "selenium"
output_file = os.path.join("docs", "source", "api.rst")
print(f"generating module list for sphinx autodoc in: {output_file}\n")
modules = find_modules(package_name)
base_modules = [mod for mod in sorted(set(module.rsplit(".", 1)[0] for module in modules)) if mod != package_name]
modules = [module for module in find_modules(package_name) if ".devtools." not in module]
base_modules = [mod for mod in sorted({module.rsplit(".", 1)[0] for module in modules}) if mod != package_name]
print("found sections:")
for base_module in base_modules:
print(f" {base_module}")
Expand Down
Loading