Skip to content

Commit 16dabbb

Browse files
committed
Fix: add docstring examples
1 parent 57a8c8e commit 16dabbb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

documentation/package-documentation-sphinx.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,16 @@ def extent_to_json(ext_obj):
196196

197197
```
198198

199+
```{figure} ../images/sphinx-rendering-extent-to-json-earthpy.png
200+
---
201+
name: directive-fig
202+
width: 80%
203+
---
204+
Using the above numpy-style docstring in sphinx, the autodoc extension will
205+
create the about documentation section for the `extent_to_json` function. The
206+
output of the `es.extent_to_json(rmnp)` command can even be tested using
207+
doctest adding another quality check to your package.
208+
```
209+
210+
199211

216 KB
Loading

0 commit comments

Comments
 (0)