sphinx-examples-as-code 0.3.3__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/PKG-INFO +17 -7
  2. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/README.md +16 -6
  3. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code/__init__.py +215 -168
  4. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code/_version.py +3 -3
  5. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code.egg-info/PKG-INFO +17 -7
  6. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code.egg-info/scm_file_list.json +21 -21
  7. sphinx_examples_as_code-0.4.0/sphinx_examples_as_code.egg-info/scm_version.json +8 -0
  8. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/single_function_fixture/conf.py +12 -15
  9. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/single_function_fixture/mymodule.py +4 -0
  10. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/test_single_function_page.py +34 -0
  11. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/test_sphinx_examples_as_code.py +348 -27
  12. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/test_tinypages.py +89 -19
  13. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/tinypages/docstring_cases.py +27 -0
  14. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/tinypages/docstring_cases.rst +2 -0
  15. sphinx_examples_as_code-0.3.3/sphinx_examples_as_code.egg-info/scm_version.json +0 -8
  16. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/.github/dependabot.yml +0 -0
  17. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/.github/release.yml +0 -0
  18. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/.github/workflows/ci.yml +0 -0
  19. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/.gitignore +0 -0
  20. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/.pre-commit-config.yaml +0 -0
  21. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/LICENSE +0 -0
  22. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/pyproject.toml +0 -0
  23. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/setup.cfg +0 -0
  24. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code.egg-info/SOURCES.txt +0 -0
  25. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code.egg-info/dependency_links.txt +0 -0
  26. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code.egg-info/requires.txt +0 -0
  27. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/sphinx_examples_as_code.egg-info/top_level.txt +0 -0
  28. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/gallery_fixture/conf.py +0 -0
  29. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/gallery_fixture/examples/GALLERY_HEADER.rst +0 -0
  30. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/gallery_fixture/examples/plot_minimal.py +0 -0
  31. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/gallery_fixture/index.rst +0 -0
  32. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/heading_level_fixture/conf.py +0 -0
  33. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/heading_level_fixture/examples/GALLERY_HEADER.rst +0 -0
  34. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/heading_level_fixture/examples/plot_reused_level.py +0 -0
  35. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/heading_level_fixture/examples/plot_three_levels.py +0 -0
  36. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/heading_level_fixture/index.rst +0 -0
  37. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/single_function_fixture/index.rst +0 -0
  38. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/test_gallery_downloads.py +0 -0
  39. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/test_heading_level_reuse.py +0 -0
  40. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/tinypages/conf.py +0 -0
  41. {sphinx_examples_as_code-0.3.3 → sphinx_examples_as_code-0.4.0}/tests/tinypages/index.rst +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sphinx-examples-as-code
3
- Version: 0.3.3
3
+ Version: 0.4.0
4
4
  Summary: Sphinx extension for converting docstring examples into downloadable code.
5
5
  Author-email: The PyVista Developers <info@pyvista.org>
6
6
  License-Expression: MIT
@@ -66,6 +66,7 @@ sphinx_examples_as_code_conf = {
66
66
  'py': 'Download Python source code',
67
67
  'ipynb': 'Download Jupyter notebook',
68
68
  },
69
+ 'include_see_also': True,
69
70
  }
70
71
  ```
71
72
 
@@ -75,6 +76,13 @@ sphinx_examples_as_code_conf = {
75
76
  (default). Always offered in that order regardless of how the list is written.
76
77
  - `link_labels`: the text of the download link(s) themselves, per format. Set only the
77
78
  format(s) you want to change; any left unset keep reading their own default shown above.
79
+ - `include_see_also`: whether "See Also" content is included in the generated file.
80
+ `True` (default) includes it, in any of its forms: a `.. seealso::` admonition, a bare
81
+ `.. rubric:: See Also`, a hand-written `See Also` heading, or numpydoc's own "See Also"
82
+ field (including when it's been reordered outside the Examples section itself, or the
83
+ Examples section has been hoisted to a heading of its own — a setup some projects use to
84
+ get "Examples" listed in the page's own navigation). `False` excludes "See Also" content
85
+ in every one of those forms.
78
86
  - `gallery_downloads`: opt-in takeover of
79
87
  [sphinx-gallery](https://sphinx-gallery.github.io)'s own per-example downloads.
80
88
  `False` (default) leaves sphinx-gallery pages untouched. See
@@ -108,10 +116,13 @@ What happens to the content of an Examples section:
108
116
  comments, set off with blank lines on both sides like any other directive.
109
117
  - Admonitions (`.. note::`, `.. warning::`, `.. seealso::`, ...) become a `# LABEL:`
110
118
  comment followed by their content as comments, indented one level under the label in
111
- `.py` (not `.ipynb`, where leading whitespace within a paragraph has no visible effect
112
- once rendered). "See Also" is recognized in any of its three forms (`.. seealso::`, a
113
- bare `.. rubric:: See Also`, or a hand-written `See Also` heading) and always renders
114
- the same way.
119
+ `.py` only. "See Also" is recognized in any of its three forms (`.. seealso::`, a bare
120
+ `.. rubric:: See Also`, or a hand-written `See Also` heading) and always renders the
121
+ same way.
122
+ - A bullet/numbered list becomes a `-`/`N.`-marked line per item, set off with a blank
123
+ line on both sides in either format. A definition list's term stays at the surrounding
124
+ indent; its definition (the body nested under it) is indented one level further in
125
+ `.py`, same as an admonition's own content.
115
126
  - Cross-references and inline code (`:class:`, `:meth:`, `:func:`, `:attr:`,
116
127
  double-backtick literals, ...) keep their display text, wrapped in backticks (e.g.
117
128
  ``:class:`pyvista.Plotter` `` -> `` `pyvista.Plotter` ``). If `html_baseurl` is set and
@@ -169,8 +180,7 @@ styles:
169
180
  - `.py` uses an RST-style title + underline, one character per level -- the same
170
181
  sequence Sphinx's own documentation uses for sections through sub-paragraphs: `=`, `-`,
171
182
  `~`, `^`, `"`, `'` for levels 1 through 6.
172
- - `.ipynb` always uses ATX syntax (`#`, `##`, `###`, ...), since that's a real Markdown
173
- heading at any level, whereas an underline only reads as one for the first two.
183
+ - `.ipynb` always uses ATX syntax (`#`, `##`, `###`, ...) at every level.
174
184
 
175
185
  Two things worth knowing before turning this on:
176
186
 
@@ -39,6 +39,7 @@ sphinx_examples_as_code_conf = {
39
39
  'py': 'Download Python source code',
40
40
  'ipynb': 'Download Jupyter notebook',
41
41
  },
42
+ 'include_see_also': True,
42
43
  }
43
44
  ```
44
45
 
@@ -48,6 +49,13 @@ sphinx_examples_as_code_conf = {
48
49
  (default). Always offered in that order regardless of how the list is written.
49
50
  - `link_labels`: the text of the download link(s) themselves, per format. Set only the
50
51
  format(s) you want to change; any left unset keep reading their own default shown above.
52
+ - `include_see_also`: whether "See Also" content is included in the generated file.
53
+ `True` (default) includes it, in any of its forms: a `.. seealso::` admonition, a bare
54
+ `.. rubric:: See Also`, a hand-written `See Also` heading, or numpydoc's own "See Also"
55
+ field (including when it's been reordered outside the Examples section itself, or the
56
+ Examples section has been hoisted to a heading of its own — a setup some projects use to
57
+ get "Examples" listed in the page's own navigation). `False` excludes "See Also" content
58
+ in every one of those forms.
51
59
  - `gallery_downloads`: opt-in takeover of
52
60
  [sphinx-gallery](https://sphinx-gallery.github.io)'s own per-example downloads.
53
61
  `False` (default) leaves sphinx-gallery pages untouched. See
@@ -81,10 +89,13 @@ What happens to the content of an Examples section:
81
89
  comments, set off with blank lines on both sides like any other directive.
82
90
  - Admonitions (`.. note::`, `.. warning::`, `.. seealso::`, ...) become a `# LABEL:`
83
91
  comment followed by their content as comments, indented one level under the label in
84
- `.py` (not `.ipynb`, where leading whitespace within a paragraph has no visible effect
85
- once rendered). "See Also" is recognized in any of its three forms (`.. seealso::`, a
86
- bare `.. rubric:: See Also`, or a hand-written `See Also` heading) and always renders
87
- the same way.
92
+ `.py` only. "See Also" is recognized in any of its three forms (`.. seealso::`, a bare
93
+ `.. rubric:: See Also`, or a hand-written `See Also` heading) and always renders the
94
+ same way.
95
+ - A bullet/numbered list becomes a `-`/`N.`-marked line per item, set off with a blank
96
+ line on both sides in either format. A definition list's term stays at the surrounding
97
+ indent; its definition (the body nested under it) is indented one level further in
98
+ `.py`, same as an admonition's own content.
88
99
  - Cross-references and inline code (`:class:`, `:meth:`, `:func:`, `:attr:`,
89
100
  double-backtick literals, ...) keep their display text, wrapped in backticks (e.g.
90
101
  ``:class:`pyvista.Plotter` `` -> `` `pyvista.Plotter` ``). If `html_baseurl` is set and
@@ -142,8 +153,7 @@ styles:
142
153
  - `.py` uses an RST-style title + underline, one character per level -- the same
143
154
  sequence Sphinx's own documentation uses for sections through sub-paragraphs: `=`, `-`,
144
155
  `~`, `^`, `"`, `'` for levels 1 through 6.
145
- - `.ipynb` always uses ATX syntax (`#`, `##`, `###`, ...), since that's a real Markdown
146
- heading at any level, whereas an underline only reads as one for the first two.
156
+ - `.ipynb` always uses ATX syntax (`#`, `##`, `###`, ...) at every level.
147
157
 
148
158
  Two things worth knowing before turning this on:
149
159