Skip to content

Commit 8a180e8

Browse files
committed
Add docs for readthedocs
1 parent 18c4e70 commit 8a180e8

9 files changed

Lines changed: 299 additions & 5 deletions

File tree

caqui/asynchronous.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ async def go_back(server_url, session):
611611

612612

613613
async def get_url(server_url, session) -> str:
614-
"""Return the URL from web page:"""
614+
"""Returns the URL from web page:"""
615615
try:
616616
url = f"{server_url}/session/{session}/url"
617617
response = await __get(url)
@@ -622,7 +622,7 @@ async def get_url(server_url, session) -> str:
622622

623623
async def get_timeouts(server_url, session) -> dict:
624624
"""
625-
Return the configured timeouts:
625+
Returns the configured timeouts:
626626
{"implicit": 0, "pageLoad": 300000, "script": 30000}
627627
"""
628628
try:
@@ -634,8 +634,8 @@ async def get_timeouts(server_url, session) -> dict:
634634

635635

636636
async def get_status(server_url) -> dict:
637-
"""
638-
Return the status and details of the WebDriver:
637+
"""Returns the status and details of the WebDriver
638+
::
639639
"build": {
640640
"version": "113.0.5672.63 (1a2b3c-refs/branch-heads/5672@{#912})"
641641
},

caqui/easy/action_chains.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ def __init__(self, driver) -> None:
99
self.__coroutines = []
1010

1111
def click(self, element: Element):
12-
"""Clicks on the element `element`"""
12+
"""
13+
Clicks on the element `element`
14+
"""
1315
self.__element = element
1416
coroutine = asynchronous.click(self.__remote, self.__session, str(element))
1517
self.__coroutines.append(coroutine)

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/caqui.easy.rst

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
caqui.easy package
2+
==================
3+
4+
Submodules
5+
----------
6+
7+
caqui.easy.action\_chains module
8+
--------------------------------
9+
10+
.. automodule:: caqui.easy.action_chains
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
caqui.easy.alert module
16+
-----------------------
17+
18+
.. automodule:: caqui.easy.alert
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
caqui.easy.capabilities module
24+
------------------------------
25+
26+
.. automodule:: caqui.easy.capabilities
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
caqui.easy.element module
32+
-------------------------
33+
34+
.. automodule:: caqui.easy.element
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
caqui.easy.options module
40+
-------------------------
41+
42+
.. automodule:: caqui.easy.options
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
caqui.easy.page module
48+
----------------------
49+
50+
.. automodule:: caqui.easy.page
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
caqui.easy.server module
56+
------------------------
57+
58+
.. automodule:: caqui.easy.server
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
63+
caqui.easy.switch\_to module
64+
----------------------------
65+
66+
.. automodule:: caqui.easy.switch_to
67+
:members:
68+
:undoc-members:
69+
:show-inheritance:
70+
71+
caqui.easy.window module
72+
------------------------
73+
74+
.. automodule:: caqui.easy.window
75+
:members:
76+
:undoc-members:
77+
:show-inheritance:
78+
79+
Module contents
80+
---------------
81+
82+
.. automodule:: caqui.easy
83+
:members:
84+
:undoc-members:
85+
:show-inheritance:

docs/caqui.rst

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
caqui package
2+
=============
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
caqui.easy
11+
12+
Submodules
13+
----------
14+
15+
caqui.asynchronous module
16+
-------------------------
17+
18+
.. automodule:: caqui.asynchronous
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
caqui.by module
24+
---------------
25+
26+
.. automodule:: caqui.by
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
caqui.constants module
32+
----------------------
33+
34+
.. automodule:: caqui.constants
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
caqui.exceptions module
40+
-----------------------
41+
42+
.. automodule:: caqui.exceptions
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
caqui.helper module
48+
-------------------
49+
50+
.. automodule:: caqui.helper
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
caqui.synchronous module
56+
------------------------
57+
58+
.. automodule:: caqui.synchronous
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
63+
Module contents
64+
---------------
65+
66+
.. automodule:: caqui
67+
:members:
68+
:undoc-members:
69+
:show-inheritance:

docs/conf.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'caqui'
21+
copyright = '2025, Douglas Cardoso'
22+
author = 'Douglas Cardoso'
23+
24+
# The full version, including alpha/beta/rc tags
25+
release = '3.0.3'
26+
27+
28+
# -- General configuration ---------------------------------------------------
29+
30+
# Add any Sphinx extension module names here, as strings. They can be
31+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32+
# ones.
33+
extensions = [
34+
'sphinx.ext.autodoc'
35+
]
36+
37+
# Add any paths that contain templates here, relative to this directory.
38+
templates_path = ['_templates']
39+
40+
# List of patterns, relative to source directory, that match files and
41+
# directories to ignore when looking for source files.
42+
# This pattern also affects html_static_path and html_extra_path.
43+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
44+
45+
46+
# -- Options for HTML output -------------------------------------------------
47+
48+
# The theme to use for HTML and HTML Help pages. See the documentation for
49+
# a list of builtin themes.
50+
#
51+
html_theme = 'alabaster'
52+
53+
# Add any paths that contain custom static files (such as style sheets) here,
54+
# relative to this directory. They are copied after the builtin static files,
55+
# so a file named "default.css" will overwrite the builtin "default.css".
56+
html_static_path = ['_static']

docs/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. caqui documentation master file, created by
2+
sphinx-quickstart on Wed May 7 00:53:20 2025.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to caqui's documentation!
7+
=================================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
modules
14+
15+
Indices and tables
16+
==================
17+
18+
* :ref:`genindex`
19+
* :ref:`modindex`
20+
* :ref:`search`

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.https://www.sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/modules.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
caqui
2+
=====
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
caqui

0 commit comments

Comments
 (0)