test2doc 0.0.2__tar.gz → 0.0.3__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.
@@ -0,0 +1,17 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+
9
+ [*.{py,toml,yml,yaml}]
10
+ indent_style = space
11
+ indent_size = 4
12
+
13
+ [*.md]
14
+ trim_trailing_whitespace = false
15
+
16
+ [Makefile]
17
+ indent_style = tab
@@ -0,0 +1,46 @@
1
+ # wads CI — calls the reusable workflow hosted in i2mint/wads.
2
+ #
3
+ # All configuration comes from this repo's pyproject.toml [tool.wads.ci.*].
4
+ # To customize the workflow itself (rare), replace this file with the
5
+ # full inline template `wads/data/github_ci_uv.yml` from i2mint/wads.
6
+ #
7
+ # Pinning: `@master` floats with wads. If you need version stability for
8
+ # a release-sensitive repo, change `@master` to a wads tag (e.g. `@v0.1.81`).
9
+ # CI failure does not block a published release — it blocks the publish
10
+ # step itself — so floating master is generally safe.
11
+ #
12
+ # Permissions: GitHub validates that the caller grants AT LEAST the
13
+ # permissions any job in the called workflow requests — at workflow-parse
14
+ # time, not at run-time, even if the job would be skipped via `if:`.
15
+ # The reusable workflow needs:
16
+ # contents: write for the publish job's version-bump push-back
17
+ # pages: write for the github-pages publish (if enabled)
18
+ # id-token: write for the github-pages OIDC handshake (if enabled)
19
+ # Granting these in the stub keeps it working on any caller, including
20
+ # personal-account repos where id-token is not write-by-default.
21
+ name: Continuous Integration
22
+ on: [push, pull_request]
23
+ jobs:
24
+ ci:
25
+ uses: i2mint/wads/.github/workflows/uv-ci.yml@master
26
+ permissions:
27
+ contents: write
28
+ pages: write
29
+ id-token: write
30
+ # Explicit pass-through (not `secrets: inherit`) because `inherit` does
31
+ # not reliably propagate caller-repo secrets to a reusable workflow
32
+ # owned by a different account (verified empirically: caller in a
33
+ # personal account, called in i2mint org → `${{ secrets.PYPI_PASSWORD }}`
34
+ # resolved to empty inside the reusable workflow despite the secret
35
+ # being set on the caller repo). Listing each secret here makes the
36
+ # propagation unambiguous regardless of caller-vs-called ownership.
37
+ # Missing secrets on the caller resolve to empty strings, harmless for
38
+ # the optional ones; PYPI_PASSWORD must be set for the publish job.
39
+ secrets:
40
+ PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
41
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
42
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
43
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
44
+ HUGGINGFACE_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
45
+ KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
46
+ KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
@@ -0,0 +1,115 @@
1
+ wads_configs.json
2
+ data/wads_configs.json
3
+ wads/data/wads_configs.json
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+
11
+ .DS_Store
12
+ # C extensions
13
+ *.so
14
+
15
+ # Distribution / packaging
16
+ .Python
17
+ build/
18
+ develop-eggs/
19
+ dist/
20
+ downloads/
21
+ eggs/
22
+ .eggs/
23
+ lib/
24
+ lib64/
25
+ parts/
26
+ sdist/
27
+ var/
28
+ wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+ MANIFEST
33
+ _build
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .coverage
49
+ .coverage.*
50
+ .cache
51
+ nosetests.xml
52
+ coverage.xml
53
+ *.cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+ docs/*
76
+
77
+ # PyBuilder
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # celery beat schedule file
87
+ celerybeat-schedule
88
+
89
+ # SageMath parsed files
90
+ *.sage.py
91
+
92
+ # Environments
93
+ .env
94
+ .venv
95
+ env/
96
+ venv/
97
+ ENV/
98
+ env.bak/
99
+ venv.bak/
100
+
101
+ # Spyder project settings
102
+ .spyderproject
103
+ .spyproject
104
+
105
+ # Rope project settings
106
+ .ropeproject
107
+
108
+ # mkdocs documentation
109
+ /site
110
+
111
+ # mypy
112
+ .mypy_cache/
113
+
114
+ # PyCharm
115
+ .idea
test2doc-0.0.3/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,105 @@
1
+ Metadata-Version: 2.4
2
+ Name: test2doc
3
+ Version: 0.0.3
4
+ Summary: Generate documentation from tests
5
+ Project-URL: Homepage, https://github.com/i2mint/test2doc
6
+ Author: Thor Whalen
7
+ License-Expression: Apache-2.0
8
+ License-File: LICENSE
9
+ Keywords: ast,code-generation,docs,documentation,markdown,testing,tests
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Documentation
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: dol
19
+ Requires-Dist: i2
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
22
+ Requires-Dist: pytest>=7.0; extra == 'dev'
23
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
24
+ Provides-Extra: docs
25
+ Requires-Dist: sphinx-rtd-theme>=1.0; extra == 'docs'
26
+ Requires-Dist: sphinx>=6.0; extra == 'docs'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # test2doc
30
+ Generate documentation from tests.
31
+
32
+ To install: ```pip install test2doc```
33
+
34
+ # Motivation
35
+
36
+ If you're like me, you think that having tests and documentation is good,
37
+ but writing them is soul-killing.
38
+ It's repetitive and so easy to deviate from a consistent look, make mistakes,
39
+ and all that jazz.
40
+
41
+ Fortunately, there are tools out there to help out.
42
+ Tools that will transform your docs into tests, so you not only can
43
+ make sure that the examples in your docs actually work,
44
+ but also get some test coverage from your docs.
45
+
46
+ That's `doc2test` stuff, and it's nice.
47
+
48
+ But what about `test2doc`?
49
+
50
+ What if you have a nicely commented test function like the following one in
51
+ your `tests/` folder:
52
+
53
+ ```python
54
+ def test_func(func, wrap):
55
+ from inspect import signature
56
+
57
+ # Just wrapping the func gives you a sort of copy of the func.
58
+ wrapped_func = wrap(func) # no transformations
59
+ # The behavior remains the same:
60
+ assert wrapped_func(2, "co") == "coco" == func(2, "co")
61
+ # ... and the signature as well:
62
+ assert str(signature(wrapped_func)) == "(a, b: str, c='hi')"
63
+ ```
64
+
65
+ Who's going to read that?
66
+
67
+ The nerds, okay, but not the normal people, the many users you'd have if
68
+ you had this as a nicely formatted documentation.
69
+
70
+ Something that would look like
71
+
72
+ ## About `test_func(func, wrap)`
73
+
74
+ ```python
75
+ from inspect import signature
76
+ ```
77
+
78
+ Just wrapping the func gives you a sort of copy of the func.
79
+
80
+ ```python
81
+ wrapped_func = wrap(func) # no transformations
82
+ ```
83
+
84
+ The behavior remains the same:
85
+
86
+ ```python
87
+ assert wrapped_func(2, "co") == "coco" == func(2, "co")
88
+ ```
89
+
90
+ ... and the signature as well:
91
+
92
+ ```python
93
+ assert str(signature(wrapped_func)) == "(a, b: str, c='hi')"
94
+ ```
95
+
96
+ ## You know what I'm getting at...
97
+
98
+ Do it like this:
99
+
100
+ ```python
101
+ from test2doc import code_to_docs
102
+
103
+ docs = code_to_docs(test_func)
104
+ ```
105
+
@@ -29,11 +29,9 @@ def test_func(func, wrap):
29
29
  # Just wrapping the func gives you a sort of copy of the func.
30
30
  wrapped_func = wrap(func) # no transformations
31
31
  # The behavior remains the same:
32
- assert wrapped_func(2, 'co') == 'coco' == func(2, 'co')
32
+ assert wrapped_func(2, "co") == "coco" == func(2, "co")
33
33
  # ... and the signature as well:
34
- assert (
35
- str(signature(wrapped_func)) == "(a, b: str, c='hi')"
36
- )
34
+ assert str(signature(wrapped_func)) == "(a, b: str, c='hi')"
37
35
  ```
38
36
 
39
37
  Who's going to read that?
@@ -58,16 +56,13 @@ wrapped_func = wrap(func) # no transformations
58
56
  The behavior remains the same:
59
57
 
60
58
  ```python
61
- assert wrapped_func(2, 'co') == 'coco' == func(2, 'co')
59
+ assert wrapped_func(2, "co") == "coco" == func(2, "co")
62
60
  ```
63
61
 
64
62
  ... and the signature as well:
65
63
 
66
64
  ```python
67
- assert (
68
- str(signature(wrapped_func)) == "(a, b: str, c='hi')"
69
- )
70
-
65
+ assert str(signature(wrapped_func)) == "(a, b: str, c='hi')"
71
66
  ```
72
67
 
73
68
  ## You know what I'm getting at...
@@ -0,0 +1 @@
1
+ _build/
@@ -0,0 +1,33 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+ GITHUBPAGESDIR = ../docs
11
+ GITLABPAGESDIR = ../public
12
+
13
+ # Put it first so that "make" without argument is like "make help".
14
+ help:
15
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
16
+
17
+ .PHONY: help Makefile
18
+
19
+ github:
20
+ @make html
21
+ @cp -a "$(BUILDDIR)"/html/. $(GITHUBPAGESDIR)
22
+
23
+ gitlab:
24
+ @make html
25
+ @cp -a "$(BUILDDIR)"/html/. $(GITLABPAGESDIR)
26
+
27
+ clean:
28
+ rm -rfv $(BUILDDIR) $(GITHUBPAGESDIR) $(GITLABPAGESDIR)
29
+
30
+ # Catch-all target: route all unknown targets to Sphinx using the new
31
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
32
+ %: Makefile
33
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,82 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # This file only contains a selection of the most common options.
4
+ # For a full list see the documentation:
5
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
+
7
+ # -- Path setup --------------------------------------------------------------
8
+
9
+ # If extensions (or modules to document with autodoc) are in another directory,
10
+ # add these directories to sys.path here. If the directory is relative to the
11
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
12
+
13
+ import os
14
+ import sys
15
+
16
+ sys.path.insert(0, os.path.abspath(".."))
17
+
18
+ # -- Project information -----------------------------------------------------
19
+ from epythet.config_parser import parse_config
20
+ from pathlib import Path
21
+
22
+ project, copyright, author, release, display_name = parse_config(
23
+ Path(__file__).absolute().parent.parent / "setup.cfg"
24
+ )
25
+
26
+ # -- General configuration ---------------------------------------------------
27
+
28
+ # Add any Sphinx extension module names here, as strings. They can be
29
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
30
+ # ones.
31
+ extensions = [
32
+ "sphinx_toggleprompt",
33
+ "sphinx_copybutton",
34
+ "sphinx.ext.autodoc", # Include documentation from docstrings
35
+ "sphinx.ext.doctest", # Test snippets in the documentation
36
+ "sphinx.ext.githubpages", # This extension creates .nojekyll file
37
+ "sphinx.ext.graphviz", # Add Graphviz graphs
38
+ "sphinx.ext.napoleon", # Support for NumPy and Google style docstrings
39
+ "sphinx.ext.todo", # Support for todo items
40
+ "sphinx.ext.viewcode", # Add links to highlighted source code
41
+ "myst_parser", # Parse .md files
42
+ ]
43
+
44
+ # Add any paths that contain templates here, relative to this directory.
45
+ templates_path = ["_templates"]
46
+
47
+ # List of patterns, relative to source directory, that match files and
48
+ # directories to ignore when looking for source files.
49
+ # This pattern also affects html_static_path and html_extra_path.
50
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
51
+
52
+ # -- Options for HTML output -------------------------------------------------
53
+
54
+ # The theme to use for HTML and HTML Help pages. See the documentation for
55
+ # a list of builtin themes.
56
+ #
57
+ html_theme = "sphinx_rtd_theme"
58
+
59
+ # Add any paths that contain custom static files (such as style sheets) here,
60
+ # relative to this directory. They are copied after the builtin static files,
61
+ # so a file named "default.css" will overwrite the builtin "default.css".
62
+ html_static_path = ["_static"]
63
+
64
+
65
+ # -- Options for Markdown support -------------------------------------------
66
+ # TODO: fix md support so that it doesn't interfere with rst docs
67
+ # import commonmark
68
+ #
69
+ #
70
+ # def docstring(app, what, name, obj, options, lines):
71
+ # md = '\n'.join(lines)
72
+ # ast = commonmark.Parser().parse(md)
73
+ # rst = commonmark.ReStructuredTextRenderer().render(ast)
74
+ # lines.clear()
75
+ # lines += rst.splitlines()
76
+ #
77
+ #
78
+ # def setup(app):
79
+ # app.connect('autodoc-process-docstring', docstring)
80
+
81
+
82
+ toggleprompt_offset_right = 30
@@ -0,0 +1,18 @@
1
+ Welcome to test2doc's documentation!
2
+ ====================================
3
+
4
+
5
+ .. include:: ./table_of_contents.rst
6
+
7
+
8
+ Indices and tables
9
+ ==================
10
+
11
+ * :ref:`genindex`
12
+ * :ref:`modindex`
13
+ * :ref:`search`
14
+
15
+
16
+ Release: |release|
17
+
18
+ Last change: |today|