Skip to content

Commit 56333a8

Browse files
committed
Update Sphinx documentation for v1.0 release
- Updated docs/source/conf.py with version 1.0.0 and modern Sphinx configuration - Enhanced docs/source/index.rst with Python 3.11+ requirements note - Added comprehensive overview, compatibility, and quick start sections - Fixed tox.ini docs build command (removed setup.py reference) - Added docs extras to pyproject.toml with sphinx and sphinx_rtd_theme Documentation now reflects v1.0 modernization with UV, Ruff, and Python 3.11+ requirements.
1 parent 931d293 commit 56333a8

File tree

5 files changed

+383
-7
lines changed

5 files changed

+383
-7
lines changed

docs/source/conf.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,25 @@
1313
# License for the specific language governing permissions and limitations
1414
# under the License.
1515

16+
# -- Project information -----------------------------------------------------
17+
project = "python-gerritclient"
18+
copyright = "2017-2025, Vitalii Kulanov"
19+
author = "Vitalii Kulanov"
20+
21+
# The version info for the project
22+
release = "1.0.0"
23+
version = "1.0"
24+
25+
# -- General configuration ---------------------------------------------------
26+
1627
# Add any Sphinx extension module names here, as strings. They can be
1728
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
18-
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "cliff.sphinxext"]
29+
extensions = [
30+
"sphinx.ext.autodoc",
31+
"sphinx.ext.viewcode",
32+
"sphinx.ext.intersphinx",
33+
"cliff.sphinxext",
34+
]
1935

2036
# Options for cliff.sphinxext plugin
2137
autoprogram_cliff_application = "gerrit"
@@ -26,5 +42,16 @@
2642
# The master toctree document.
2743
master_doc = "index"
2844

29-
# General information about the project.
30-
project = "python-gerritclient"
45+
# -- Options for HTML output -------------------------------------------------
46+
html_theme = "sphinx_rtd_theme"
47+
html_static_path = []
48+
49+
# Intersphinx configuration
50+
intersphinx_mapping = {
51+
"python": ("https://docs.python.org/3", None),
52+
}
53+
54+
# -- Options for LaTeX output ------------------------------------------------
55+
latex_documents = [
56+
(master_doc, "python-gerritclient.tex", "python-gerritclient Documentation", author, "manual"),
57+
]

docs/source/index.rst

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,86 @@ python-gerritclient
55
This is a CLI tool and Python API wrapper for
66
`Gerrit Code Review <https://www.gerritcodereview.com/>`_.
77

8-
User Documentation
9-
------------------
8+
.. note::
9+
**Version 1.0+** requires **Python 3.11 or higher**.
10+
Python 2.7 and Python 3.5-3.10 are no longer supported.
11+
12+
Overview
13+
--------
14+
15+
python-gerritclient is a modern Python client for Gerrit Code Review that provides:
16+
17+
* **Command Line Interface**: 88 commands for managing accounts, changes, projects, plugins, and more
18+
* **Python API**: Clean, pythonic interface for programmatic access
19+
* **Modern Tooling**: Built with UV and Ruff for blazing fast performance
20+
* **Production Tested**: Validated against Gerrit 3.13.1 on real-world instances
21+
22+
Compatibility
23+
-------------
24+
25+
**Gerrit Versions:**
26+
- Recommended: Gerrit 3.11+ (tested with 3.13.1)
27+
- Supported: Gerrit 2.14+
28+
- API Coverage: ~45% of Gerrit REST API
29+
30+
**Python Versions:**
31+
- Required: Python 3.11+
32+
- Tested: Python 3.11, 3.12, 3.13
33+
34+
Quick Start
35+
-----------
36+
37+
Installation
38+
~~~~~~~~~~~~
39+
40+
Using UV (recommended)::
41+
42+
curl -LsSf https://astral.sh/uv/install.sh | sh
43+
uv pip install python-gerritclient
44+
45+
Using pip::
46+
47+
pip install python-gerritclient
48+
49+
Basic Usage
50+
~~~~~~~~~~~
51+
52+
Command line::
53+
54+
gerrit --help
55+
gerrit server version
56+
gerrit change list "status:open"
57+
58+
Python API::
59+
60+
from gerritclient import client
61+
62+
connection = client.connect(
63+
"review.example.com",
64+
auth_type="digest",
65+
username="user",
66+
password="pass"
67+
)
68+
69+
group_client = client.get_client('group', connection=connection)
70+
members = group_client.get_group_members('core-team')
71+
72+
Documentation
73+
-------------
1074

1175
.. toctree::
1276
:maxdepth: 3
1377

1478
cli/index
79+
80+
Additional Resources
81+
--------------------
82+
83+
* `GitHub Repository <https://github.com/tivaliy/python-gerritclient>`_
84+
* `Issue Tracker <https://github.com/tivaliy/python-gerritclient/issues>`_
85+
* `PyPI Package <https://pypi.org/project/python-gerritclient/>`_
86+
87+
License
88+
-------
89+
90+
Apache License 2.0

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ test = [
4242
"oslotest>=5.0.0",
4343
"testtools>=2.5.0",
4444
]
45+
docs = [
46+
"sphinx>=1.6.2",
47+
"sphinx_rtd_theme>=1.0.0",
48+
]
4549

4650
[project.scripts]
4751
gerrit = "gerritclient.main:main"

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ commands =
4343
{posargs:}
4444

4545
[testenv:docs]
46+
deps =
47+
sphinx>=1.6.2
48+
sphinx_rtd_theme
4649
commands =
47-
python setup.py build_sphinx
50+
sphinx-build -W -b html docs/source docs/build/html
4851

4952
[flake8]
5053
show-pep8 = True

0 commit comments

Comments
 (0)