docs: added auto-generation of documentation
ref: N25B-270
This commit is contained in:
22
README.md
22
README.md
@@ -146,3 +146,25 @@ If your commit fails its either:
|
||||
branch name != <type>/description-of-branch ,
|
||||
commit name != <type>: description of the commit.
|
||||
<ref>: N25B-Num's
|
||||
|
||||
## Documentation
|
||||
Generate documentation web pages using:
|
||||
|
||||
```bash
|
||||
PYTHONPATH=src sphinx-apidoc -F -o docs src/robot_interface
|
||||
```
|
||||
|
||||
Optionally, in the `conf.py` file in the new `docs` folder, change preferences.
|
||||
For the page theme, change `html_theme` to `'sphinx_rtd_theme'`.
|
||||
|
||||
In the `docs` folder:
|
||||
|
||||
### Windows
|
||||
```bash
|
||||
.\make.bat html
|
||||
```
|
||||
|
||||
### MacOS
|
||||
```bash
|
||||
make html
|
||||
```
|
||||
@@ -3,3 +3,5 @@ pyaudio<=0.2.11
|
||||
pytest<5
|
||||
pytest-mock<3.0.0
|
||||
pytest-cov<3.0.0
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
@@ -45,7 +45,13 @@ class State(object):
|
||||
|
||||
def __getattribute__(self, name):
|
||||
# Enforce that the state is initialized before accessing any property (aside from the basic ones)
|
||||
if name in ("initialize", "deinitialize", "is_initialized", "__dict__", "__class__"):
|
||||
if name in (
|
||||
"initialize",
|
||||
"deinitialize",
|
||||
"is_initialized",
|
||||
"__dict__",
|
||||
"__class__",
|
||||
"__doc__"):
|
||||
return object.__getattribute__(self, name)
|
||||
|
||||
if not object.__getattribute__(self, "is_initialized"):
|
||||
|
||||
Reference in New Issue
Block a user