File tree 2 files changed +24
-2
lines changed 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,25 @@ request](https://help.github.com/articles/using-pull-requests). You
172
172
might also use the GitHub
173
173
[ Edit] ( https://github.com/blog/844-forking-with-the-edit-button ) button.
174
174
175
- We use the [ Sphinx docstring format] ( https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html ) .
175
+ We use [ reStructuredText] ( https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html ) for all
176
+ documentation including narrative docs, and the [ Sphinx docstring format] ( https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html ) .
176
177
177
178
You can build the documentation locally by running:
178
179
179
180
``` bash
180
181
tox -e doc
181
182
```
182
183
184
+ When updating docs, it can be helpful to run the live docs server as:
185
+
186
+ ``` bash
187
+ tox -e doc-serve
188
+ ```
189
+
190
+ Browse to the link provided, and then as you make changes to docstrings or narrative docs,
191
+ the pages will re-render and the browser will automatically refresh.
192
+
193
+
183
194
## Running Tests Locally
184
195
185
196
- Ensure you have started the appropriate Mongo Server(s).
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ envlist =
21
21
typecheck,
22
22
# Build sphinx docs
23
23
doc,
24
+ # Server live sphinx docs
25
+ doc-serve,
24
26
# Test sphinx docs
25
27
doc-test,
26
28
# Linkcheck sphinx docs
@@ -38,6 +40,7 @@ labels = # Use labels and -m instead of -e so that tox -m <label> fails instantl
38
40
typecheck-pyright-strict = typecheck-pyright-strict
39
41
typecheck = typecheck
40
42
doc = doc
43
+ doc-serve = doc-serve
41
44
doc-test = doc-test
42
45
linkcheck = linkcheck
43
46
test-mockupdb = test-mockupdb
@@ -134,7 +137,15 @@ description = build sphinx docs
134
137
deps =
135
138
-rdoc/docs-requirements.txt
136
139
commands =
137
- sphinx-build -E -W -b html doc ./doc/_build/html
140
+ sphinx-build -W -b html doc ./doc/_build/html
141
+
142
+ [testenv:doc-serve]
143
+ description = serve sphinx docs
144
+ deps =
145
+ {[testenv:doc]deps}
146
+ sphinx-autobuild
147
+ commands =
148
+ sphinx-autobuild -W -b html doc --watch ./pymongo --watch ./bson --watch ./gridfs ./doc/_build/serve
138
149
139
150
[testenv:doc-test]
140
151
description = run sphinx doc tests
You can’t perform that action at this time.
0 commit comments