Skip to content

Commit 75a57b4

Browse files
authored
Improve apidoc with pydoctor tool (#28)
Using the [numpy doc style](https://numpydoc.readthedocs.io/en/latest/format.html). This format is also compatible with `pdoc` by specifying `--docformat=numpy`.
1 parent 325f852 commit 75a57b4

File tree

5 files changed

+686
-650
lines changed

5 files changed

+686
-650
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,17 @@ Run a single unit test (e.g. `PulsarTest.test_tls_auth`):
110110
```bash
111111
python3 ./tests/pulsar_test.py 'PulsarTest.test_tls_auth'
112112
```
113+
114+
## Generate API docs
115+
116+
Pulsar Python Client uses [pydoctor](https://github.com/twisted/pydoctor) to generate API docs. To generate by yourself, run the following command in the root path of this repository:
117+
118+
```bash
119+
pip3 install pydoctor
120+
pydoctor --make-html \
121+
--html-viewsource-base=https://github.com/apache/pulsar-client-python/tree/<release-version-tag> \
122+
--docformat=numpy --theme=readthedocs \
123+
--intersphinx=https://docs.python.org/3/objects.inv \
124+
--html-output=<path-to-apidocs> \
125+
pulsar
126+
```

0 commit comments

Comments
 (0)