markdown-exec 1.12.3__tar.gz → 1.12.5__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.
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/CHANGELOG.md +22 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/PKG-INFO +7 -8
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/README.md +2 -4
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/git-changelog.toml +1 -1
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/ruff.toml +1 -1
- markdown_exec-1.12.5/config/zed/debug.json +44 -0
- markdown_exec-1.12.5/config/zed/settings.json +43 -0
- markdown_exec-1.12.5/config/zed/tasks.json +72 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/matplotlib.py +5 -6
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/duties.py +48 -4
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/pyproject.toml +5 -4
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/scripts/gen_credits.py +20 -8
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/scripts/get_version.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/scripts/make.py +29 -3
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/__init__.py +18 -0
- markdown_exec-1.12.5/src/markdown_exec/_internal/__init__.py +17 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/debug.py +18 -0
- markdown_exec-1.12.5/src/markdown_exec/_internal/formatters/__init__.py +19 -0
- markdown_exec-1.12.5/src/markdown_exec/_internal/formatters/_exec_python.py +26 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/formatters/base.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/formatters/bash.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/formatters/console.py +18 -0
- markdown_exec-1.12.5/src/markdown_exec/_internal/formatters/markdown.py +29 -0
- markdown_exec-1.12.5/src/markdown_exec/_internal/formatters/pycon.py +44 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/formatters/pyodide.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/formatters/python.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/formatters/sh.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/formatters/tree.py +19 -1
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/logger.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/main.py +19 -1
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/mkdocs_plugin.py +19 -1
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/processors.py +26 -2
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/_internal/rendering.py +48 -10
- markdown_exec-1.12.5/src/markdown_exec/formatters/__init__.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/base.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/bash.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/console.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/markdown.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/pycon.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/pyodide.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/python.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/sh.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/formatters/tree.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/logger.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/mkdocs_plugin.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/processors.py +35 -0
- markdown_exec-1.12.5/src/markdown_exec/rendering.py +35 -0
- markdown_exec-1.12.5/tests/__init__.py +25 -0
- markdown_exec-1.12.5/tests/conftest.py +46 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/tests/test_api.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/tests/test_base_formatter.py +18 -0
- markdown_exec-1.12.5/tests/test_converter.py +128 -0
- markdown_exec-1.12.5/tests/test_headings.py +122 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/tests/test_python.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/tests/test_shell.py +18 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/tests/test_toc.py +56 -0
- markdown_exec-1.12.5/tests/test_tree.py +43 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/tests/test_validator.py +18 -0
- markdown_exec-1.12.3/src/markdown_exec/_internal/__init__.py +0 -0
- markdown_exec-1.12.3/src/markdown_exec/_internal/formatters/__init__.py +0 -1
- markdown_exec-1.12.3/src/markdown_exec/_internal/formatters/_exec_python.py +0 -8
- markdown_exec-1.12.3/src/markdown_exec/_internal/formatters/markdown.py +0 -11
- markdown_exec-1.12.3/src/markdown_exec/_internal/formatters/pycon.py +0 -26
- markdown_exec-1.12.3/src/markdown_exec/formatters/__init__.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/base.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/bash.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/console.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/markdown.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/pycon.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/pyodide.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/python.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/sh.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/formatters/tree.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/logger.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/mkdocs_plugin.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/processors.py +0 -17
- markdown_exec-1.12.3/src/markdown_exec/rendering.py +0 -17
- markdown_exec-1.12.3/tests/__init__.py +0 -7
- markdown_exec-1.12.3/tests/conftest.py +0 -28
- markdown_exec-1.12.3/tests/test_converter.py +0 -76
- markdown_exec-1.12.3/tests/test_headings.py +0 -30
- markdown_exec-1.12.3/tests/test_tree.py +0 -25
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/AI_POLICY.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/CODE_OF_CONDUCT.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/CONTRIBUTING.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/LICENSE +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/coverage.ini +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/pytest.ini +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/ty.toml +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/vscode/launch.json +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/vscode/settings.json +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/config/vscode/tasks.json +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/.overrides/main.html +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/.overrides/partials/comments.html +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/changelog.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/code_of_conduct.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/contributing.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/credits.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/css/apidocs.css +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/gallery.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/index.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/js/feedback.js +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/license.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/reference/api.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/schema.json +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/ansi.sh +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/argparse.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/argparse_format.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/chalk.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/d2.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/diagrams.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/drawsvg.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/expandable_filetree.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/hyperbolic.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/plotly.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/pydeps.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/qrcode.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/rich.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/rich_terminal.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/runpy.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/gallery/textual.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/usage/boolean_matrix.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/usage/hide.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/usage/multiple.pycon +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/usage/platform_html.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/usage/platform_md.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/usage/source.py +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/snippets/usage/source.pycon +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/usage/index.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/usage/pyodide.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/usage/python.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/usage/shell.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/docs/usage/tree.md +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/scripts/make +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/assets/ansi.css +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/assets/pyodide.css +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/assets/pyodide.js +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/src/markdown_exec/py.typed +0 -0
- {markdown_exec-1.12.3 → markdown_exec-1.12.5}/zensical.toml +0 -0
|
@@ -5,6 +5,28 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
<!-- insertion marker -->
|
|
8
|
+
## [1.12.5](https://github.com/pawamoy/markdown-exec/releases/tag/1.12.5) - 2026-10-14
|
|
9
|
+
|
|
10
|
+
<small>[Compare with 1.12.4](https://github.com/pawamoy/markdown-exec/compare/1.12.4...1.12.5)</small>
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Preserve heading placeholders across Markdown conversions ([f071b31](https://github.com/pawamoy/markdown-exec/commit/f071b31c614fd008e8a88a417f9223d4a53ca051) by Timothée Mazzucotelli). [Issue-97](https://github.com/pawamoy/markdown-exec/issues/97)
|
|
15
|
+
|
|
16
|
+
## [1.12.4](https://github.com/pawamoy/markdown-exec/releases/tag/1.12.4) - 2026-10-06
|
|
17
|
+
|
|
18
|
+
<small>[Compare with 1.12.3](https://github.com/pawamoy/markdown-exec/compare/1.12.3...1.12.4)</small>
|
|
19
|
+
|
|
20
|
+
### Build
|
|
21
|
+
|
|
22
|
+
- Drop support for Python 3.10 ([9bfb0c7](https://github.com/pawamoy/markdown-exec/commit/9bfb0c74c5b704fdd88e9ad9a4d1dc316c2ea963) by Timothée Mazzucotelli).
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
- Don't propagate Zensical's preview extension, which requires its zrelpath processor ([c2f3e0b](https://github.com/pawamoy/markdown-exec/commit/c2f3e0b6070d19ffca96f9c2d3992a9f18e00001) by Timothée Mazzucotelli).
|
|
27
|
+
- Declare markupsafe as a dependency ([a8f4330](https://github.com/pawamoy/markdown-exec/commit/a8f43303f3bf2c63d337091d36b1e1e53f88b3fc) by Kayvan Zahiri). [Issue-94](https://github.com/pawamoy/markdown-exec/issues/94), [PR-102](https://github.com/pawamoy/markdown-exec/pull/102)
|
|
28
|
+
- Prevent mutating original registered extensions list ([3866f5e](https://github.com/pawamoy/markdown-exec/commit/3866f5e242de5e285219440a10ed58ac7eb996cd) by Timothée Mazzucotelli).
|
|
29
|
+
|
|
8
30
|
## [1.12.3](https://github.com/pawamoy/markdown-exec/releases/tag/1.12.3) - 2026-07-07
|
|
9
31
|
|
|
10
32
|
<small>[Compare with 1.12.2](https://github.com/pawamoy/markdown-exec/compare/1.12.2...1.12.3)</small>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-exec
|
|
3
|
-
Version: 1.12.
|
|
3
|
+
Version: 1.12.5
|
|
4
4
|
Summary: Utilities to execute code blocks in Markdown files.
|
|
5
5
|
Keywords: markdown,python,exec,shell,bash,mkdocs
|
|
6
|
-
Author-Email:
|
|
6
|
+
Author-Email: Timothée Mazzucotelli <dev@pawamoy.fr>
|
|
7
7
|
License-Expression: ISC
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -11,11 +11,11 @@ Classifier: Intended Audience :: Developers
|
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
19
19
|
Classifier: Topic :: Documentation
|
|
20
20
|
Classifier: Topic :: Software Development
|
|
21
21
|
Classifier: Topic :: Utilities
|
|
@@ -28,7 +28,8 @@ Project-URL: Issues, https://github.com/pawamoy/markdown-exec/issues
|
|
|
28
28
|
Project-URL: Discussions, https://github.com/pawamoy/markdown-exec/discussions
|
|
29
29
|
Project-URL: Gitter, https://gitter.im/markdown-exec/community
|
|
30
30
|
Project-URL: Funding, https://github.com/sponsors/pawamoy
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.11
|
|
32
|
+
Requires-Dist: markupsafe>=2
|
|
32
33
|
Requires-Dist: pymdown-extensions>=9
|
|
33
34
|
Provides-Extra: ansi
|
|
34
35
|
Requires-Dist: pygments-ansi-color>=0.3; extra == "ansi"
|
|
@@ -185,7 +186,7 @@ and the [gallery](https://pawamoy.github.io/markdown-exec/gallery/) for more exa
|
|
|
185
186
|
<a href="https://github.com/BenHammersley"><img alt="BenHammersley" src="https://avatars.githubusercontent.com/u/99436?u=4499a7b507541045222ee28ae122dbe3c8d08ab5&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
186
187
|
<a href="https://github.com/trevorWieland"><img alt="trevorWieland" src="https://avatars.githubusercontent.com/u/28811461?u=74cc0e3756c1d4e3d66b5c396e1d131ea8a10472&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
187
188
|
<a href="https://github.com/MarcoGorelli"><img alt="MarcoGorelli" src="https://avatars.githubusercontent.com/u/33491632?u=7de3a749cac76a60baca9777baf71d043a4f884d&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
188
|
-
<a href="https://github.com/analog-cbarber"><img alt="analog-cbarber" src="https://avatars.githubusercontent.com/u/7408243?u=
|
|
189
|
+
<a href="https://github.com/analog-cbarber"><img alt="analog-cbarber" src="https://avatars.githubusercontent.com/u/7408243?u=fe0e7bf2882d1c9c901a341c2502e1518466527a&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
189
190
|
<a href="https://github.com/OdinManiac"><img alt="OdinManiac" src="https://avatars.githubusercontent.com/u/22727172?u=36ab20970f7f52ae8e7eb67b7fcf491fee01ac22&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
190
191
|
<a href="https://github.com/rstudio-sponsorship"><img alt="rstudio-sponsorship" src="https://avatars.githubusercontent.com/u/58949051?u=0c471515dd18111be30dfb7669ed5e778970959b&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
191
192
|
<a href="https://github.com/schlich"><img alt="schlich" src="https://avatars.githubusercontent.com/u/21191435?u=6f1240adb68f21614d809ae52d66509f46b1e877&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
@@ -197,17 +198,15 @@ and the [gallery](https://pawamoy.github.io/markdown-exec/gallery/) for more exa
|
|
|
197
198
|
<a href="https://github.com/activeloopai"><img alt="activeloopai" src="https://avatars.githubusercontent.com/u/34816118?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
198
199
|
<a href="https://github.com/roboflow"><img alt="roboflow" src="https://avatars.githubusercontent.com/u/53104118?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
199
200
|
<a href="https://github.com/cmclaughlin"><img alt="cmclaughlin" src="https://avatars.githubusercontent.com/u/1061109?u=ddf6eec0edd2d11c980f8c3aa96e3d044d4e0468&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
200
|
-
<a href="https://github.com/blaisep"><img alt="blaisep" src="https://avatars.githubusercontent.com/u/254456?u=97d584b7c0a6faf583aa59975df4f993f671d121&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
201
201
|
<a href="https://github.com/RapidataAI"><img alt="RapidataAI" src="https://avatars.githubusercontent.com/u/104209891?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
202
202
|
<a href="https://github.com/rodolphebarbanneau"><img alt="rodolphebarbanneau" src="https://avatars.githubusercontent.com/u/46493454?u=6c405452a40c231cdf0b68e97544e07ee956a733&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
203
203
|
<a href="https://github.com/theSymbolSyndicate"><img alt="theSymbolSyndicate" src="https://avatars.githubusercontent.com/u/111542255?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
204
204
|
<a href="https://github.com/blakeNaccarato"><img alt="blakeNaccarato" src="https://avatars.githubusercontent.com/u/20692450?u=bb919218be30cfa994514f4cf39bb2f7cf952df4&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
205
205
|
<a href="https://github.com/ChargeStorm"><img alt="ChargeStorm" src="https://avatars.githubusercontent.com/u/26000165?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
206
|
-
<a href="https://github.com/Alphadelta14"><img alt="Alphadelta14" src="https://avatars.githubusercontent.com/u/480845?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
207
206
|
<a href="https://github.com/Cusp-AI"><img alt="Cusp-AI" src="https://avatars.githubusercontent.com/u/178170649?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
208
207
|
</p></div>
|
|
209
208
|
|
|
210
209
|
|
|
211
|
-
*And
|
|
210
|
+
*And 4 more private sponsor(s).*
|
|
212
211
|
|
|
213
212
|
<!-- sponsors-end -->
|
|
@@ -149,7 +149,7 @@ and the [gallery](https://pawamoy.github.io/markdown-exec/gallery/) for more exa
|
|
|
149
149
|
<a href="https://github.com/BenHammersley"><img alt="BenHammersley" src="https://avatars.githubusercontent.com/u/99436?u=4499a7b507541045222ee28ae122dbe3c8d08ab5&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
150
150
|
<a href="https://github.com/trevorWieland"><img alt="trevorWieland" src="https://avatars.githubusercontent.com/u/28811461?u=74cc0e3756c1d4e3d66b5c396e1d131ea8a10472&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
151
151
|
<a href="https://github.com/MarcoGorelli"><img alt="MarcoGorelli" src="https://avatars.githubusercontent.com/u/33491632?u=7de3a749cac76a60baca9777baf71d043a4f884d&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
152
|
-
<a href="https://github.com/analog-cbarber"><img alt="analog-cbarber" src="https://avatars.githubusercontent.com/u/7408243?u=
|
|
152
|
+
<a href="https://github.com/analog-cbarber"><img alt="analog-cbarber" src="https://avatars.githubusercontent.com/u/7408243?u=fe0e7bf2882d1c9c901a341c2502e1518466527a&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
153
153
|
<a href="https://github.com/OdinManiac"><img alt="OdinManiac" src="https://avatars.githubusercontent.com/u/22727172?u=36ab20970f7f52ae8e7eb67b7fcf491fee01ac22&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
154
154
|
<a href="https://github.com/rstudio-sponsorship"><img alt="rstudio-sponsorship" src="https://avatars.githubusercontent.com/u/58949051?u=0c471515dd18111be30dfb7669ed5e778970959b&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
155
155
|
<a href="https://github.com/schlich"><img alt="schlich" src="https://avatars.githubusercontent.com/u/21191435?u=6f1240adb68f21614d809ae52d66509f46b1e877&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
@@ -161,17 +161,15 @@ and the [gallery](https://pawamoy.github.io/markdown-exec/gallery/) for more exa
|
|
|
161
161
|
<a href="https://github.com/activeloopai"><img alt="activeloopai" src="https://avatars.githubusercontent.com/u/34816118?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
162
162
|
<a href="https://github.com/roboflow"><img alt="roboflow" src="https://avatars.githubusercontent.com/u/53104118?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
163
163
|
<a href="https://github.com/cmclaughlin"><img alt="cmclaughlin" src="https://avatars.githubusercontent.com/u/1061109?u=ddf6eec0edd2d11c980f8c3aa96e3d044d4e0468&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
164
|
-
<a href="https://github.com/blaisep"><img alt="blaisep" src="https://avatars.githubusercontent.com/u/254456?u=97d584b7c0a6faf583aa59975df4f993f671d121&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
165
164
|
<a href="https://github.com/RapidataAI"><img alt="RapidataAI" src="https://avatars.githubusercontent.com/u/104209891?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
166
165
|
<a href="https://github.com/rodolphebarbanneau"><img alt="rodolphebarbanneau" src="https://avatars.githubusercontent.com/u/46493454?u=6c405452a40c231cdf0b68e97544e07ee956a733&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
167
166
|
<a href="https://github.com/theSymbolSyndicate"><img alt="theSymbolSyndicate" src="https://avatars.githubusercontent.com/u/111542255?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
168
167
|
<a href="https://github.com/blakeNaccarato"><img alt="blakeNaccarato" src="https://avatars.githubusercontent.com/u/20692450?u=bb919218be30cfa994514f4cf39bb2f7cf952df4&v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
169
168
|
<a href="https://github.com/ChargeStorm"><img alt="ChargeStorm" src="https://avatars.githubusercontent.com/u/26000165?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
170
|
-
<a href="https://github.com/Alphadelta14"><img alt="Alphadelta14" src="https://avatars.githubusercontent.com/u/480845?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
171
169
|
<a href="https://github.com/Cusp-AI"><img alt="Cusp-AI" src="https://avatars.githubusercontent.com/u/178170649?v=4" style="height: 32px; border-radius: 100%;"></a>
|
|
172
170
|
</p></div>
|
|
173
171
|
|
|
174
172
|
|
|
175
|
-
*And
|
|
173
|
+
*And 4 more private sponsor(s).*
|
|
176
174
|
|
|
177
175
|
<!-- sponsors-end -->
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Project-local debug tasks
|
|
2
|
+
//
|
|
3
|
+
// For more documentation on how to configure debug tasks,
|
|
4
|
+
// see: https://zed.dev/docs/debugger
|
|
5
|
+
[
|
|
6
|
+
{
|
|
7
|
+
"label": "python (current file)",
|
|
8
|
+
"adapter": "Debugpy",
|
|
9
|
+
"request": "launch",
|
|
10
|
+
"program": "$ZED_FILE",
|
|
11
|
+
"justMyCode": false
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"label": "run",
|
|
15
|
+
"adapter": "Debugpy",
|
|
16
|
+
"request": "launch",
|
|
17
|
+
"module": "markdown_exec",
|
|
18
|
+
"justMyCode": false
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"label": "docs",
|
|
22
|
+
"adapter": "Debugpy",
|
|
23
|
+
"request": "launch",
|
|
24
|
+
"module": "zensical",
|
|
25
|
+
"args": [
|
|
26
|
+
"serve"
|
|
27
|
+
],
|
|
28
|
+
"justMyCode": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"label": "test",
|
|
32
|
+
"adapter": "Debugpy",
|
|
33
|
+
"request": "launch",
|
|
34
|
+
"module": "pytest",
|
|
35
|
+
"args": [
|
|
36
|
+
"-c=config/pytest.ini",
|
|
37
|
+
"-vvv",
|
|
38
|
+
"--no-cov",
|
|
39
|
+
"--dist=no",
|
|
40
|
+
"tests"
|
|
41
|
+
],
|
|
42
|
+
"justMyCode": false
|
|
43
|
+
}
|
|
44
|
+
]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Zed settings
|
|
2
|
+
//
|
|
3
|
+
// For information on how to configure Zed, see the Zed
|
|
4
|
+
// documentation: https://zed.dev/docs/configuring-zed
|
|
5
|
+
//
|
|
6
|
+
// To see all of Zed's default settings without changing your
|
|
7
|
+
// custom settings, run `zed: open default settings` from the
|
|
8
|
+
// command palette (cmd-shift-p / ctrl-shift-p)
|
|
9
|
+
{
|
|
10
|
+
"languages": {
|
|
11
|
+
"YAML": {
|
|
12
|
+
"auto_indent_on_paste": false,
|
|
13
|
+
"auto_indent": "preserve_indent",
|
|
14
|
+
"format_on_save": "off"
|
|
15
|
+
},
|
|
16
|
+
"Python": {
|
|
17
|
+
"language_servers": ["ty", "ruff"],
|
|
18
|
+
"code_actions_on_format": {
|
|
19
|
+
"source.organizeImports.ruff": true
|
|
20
|
+
},
|
|
21
|
+
"formatter": {
|
|
22
|
+
"language_server": {
|
|
23
|
+
"name": "ruff"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"lsp": {
|
|
29
|
+
"ty": {
|
|
30
|
+
"settings": {
|
|
31
|
+
"configurationFile": "config/ty.toml"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"ruff": {
|
|
35
|
+
"initialization_options": {
|
|
36
|
+
"settings": {
|
|
37
|
+
"configurationPreference": "filesystemFirst",
|
|
38
|
+
"configuration": "config/ruff.toml"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"label": "changelog",
|
|
4
|
+
"command": "scripts/make",
|
|
5
|
+
"args": ["changelog"]
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"label": "check",
|
|
9
|
+
"command": "scripts/make",
|
|
10
|
+
"args": ["check"]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"label": "check-quality",
|
|
14
|
+
"command": "scripts/make",
|
|
15
|
+
"args": ["check-quality"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"label": "check-types",
|
|
19
|
+
"command": "scripts/make",
|
|
20
|
+
"args": ["check-types"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"label": "check-docs",
|
|
24
|
+
"command": "scripts/make",
|
|
25
|
+
"args": ["check-docs"]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"label": "check-api",
|
|
29
|
+
"command": "scripts/make",
|
|
30
|
+
"args": ["check-api"]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"label": "clean",
|
|
34
|
+
"command": "scripts/make",
|
|
35
|
+
"args": ["clean"]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"label": "docs",
|
|
39
|
+
"command": "scripts/make",
|
|
40
|
+
"args": ["docs"]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"label": "docs-deploy",
|
|
44
|
+
"command": "scripts/make",
|
|
45
|
+
"args": ["docs-deploy"]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "format",
|
|
49
|
+
"command": "scripts/make",
|
|
50
|
+
"args": ["format"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"label": "release",
|
|
54
|
+
"command": "scripts/make",
|
|
55
|
+
"args": ["release"]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"label": "setup",
|
|
59
|
+
"command": "scripts/make",
|
|
60
|
+
"args": ["setup"]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"label": "test",
|
|
64
|
+
"command": "scripts/make",
|
|
65
|
+
"args": ["test", "coverage"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"label": "vscode",
|
|
69
|
+
"command": "scripts/make",
|
|
70
|
+
"args": ["vscode"]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# https://matplotlib.org/stable/gallery/lines_bars_and_markers/scatter_demo2.html
|
|
2
|
-
import warnings
|
|
3
2
|
from io import StringIO
|
|
4
3
|
|
|
5
4
|
import matplotlib.cbook as cbook
|
|
6
|
-
import matplotlib.pyplot as plt
|
|
7
5
|
import numpy as np
|
|
6
|
+
from matplotlib.figure import Figure
|
|
8
7
|
|
|
9
8
|
# Load a numpy record array from yahoo csv data with fields date, open, close,
|
|
10
9
|
# volume, adj_close from the mpl-data/example directory. The record array
|
|
@@ -18,9 +17,9 @@ delta1 = np.diff(price_data["adj_close"]) / price_data["adj_close"][:-1]
|
|
|
18
17
|
volume = (15 * price_data["volume"][:-2] / price_data["volume"][0])**2
|
|
19
18
|
close = 0.003 * price_data["close"][:-2] / 0.003 * price_data["open"][:-2]
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
# Create the figure without a GUI backend for documentation builds.
|
|
21
|
+
fig = Figure()
|
|
22
|
+
ax = fig.subplots()
|
|
24
23
|
|
|
25
24
|
ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.5)
|
|
26
25
|
ax.set_xlabel(r"$\Delta_i$", fontsize=15)
|
|
@@ -31,5 +30,5 @@ ax.grid(True)
|
|
|
31
30
|
fig.tight_layout()
|
|
32
31
|
|
|
33
32
|
buffer = StringIO()
|
|
34
|
-
|
|
33
|
+
fig.savefig(buffer, format="svg")
|
|
35
34
|
print(buffer.getvalue())
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# SPDX-License-Identifier: ISC
|
|
2
|
+
#
|
|
3
|
+
# ISC License
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2022, Timothée Mazzucotelli and contributors
|
|
6
|
+
#
|
|
7
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
# purpose with or without fee is hereby granted, provided that the above
|
|
9
|
+
# copyright notice and this permission notice appear in all copies.
|
|
10
|
+
#
|
|
11
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
17
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
|
|
1
19
|
"""Development tasks."""
|
|
2
20
|
|
|
3
21
|
from __future__ import annotations
|
|
@@ -22,7 +40,7 @@ WINDOWS = os.name == "nt"
|
|
|
22
40
|
PTY = not WINDOWS and not CI
|
|
23
41
|
MULTIRUN = os.environ.get("MULTIRUN", "0") == "1"
|
|
24
42
|
PY_VERSION = f"{sys.version_info.major}{sys.version_info.minor}"
|
|
25
|
-
PY_DEV = "
|
|
43
|
+
PY_DEV = "316"
|
|
26
44
|
|
|
27
45
|
|
|
28
46
|
def pyprefix(title: str) -> str:
|
|
@@ -101,6 +119,21 @@ def check_api(ctx: Context, *cli_args: str) -> None:
|
|
|
101
119
|
)
|
|
102
120
|
|
|
103
121
|
|
|
122
|
+
@duty
|
|
123
|
+
def check_security(ctx: Context) -> None:
|
|
124
|
+
"""Check for security vulnerabilities."""
|
|
125
|
+
ctx.run(
|
|
126
|
+
["uv", "audit"],
|
|
127
|
+
title="Auditing dependencies",
|
|
128
|
+
pty=PTY,
|
|
129
|
+
)
|
|
130
|
+
ctx.run(
|
|
131
|
+
["zizmor", "."],
|
|
132
|
+
title="Auditing GitHub Actions workflows",
|
|
133
|
+
pty=PTY,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
104
137
|
@duty
|
|
105
138
|
def docs(ctx: Context, *cli_args: str, host: str = "127.0.0.1", port: int = 8000) -> None:
|
|
106
139
|
"""Serve the documentation (localhost:8000).
|
|
@@ -162,8 +195,19 @@ def publish(ctx: Context) -> None:
|
|
|
162
195
|
if not Path("dist").exists():
|
|
163
196
|
ctx.run("false", title="No distribution files found")
|
|
164
197
|
dists = [str(dist) for dist in Path("dist").iterdir() if dist.suffix in (".gz", ".whl")]
|
|
198
|
+
password = None
|
|
199
|
+
if password_cmd := os.getenv("PUBLISH_PASS_CMD"):
|
|
200
|
+
password = ctx.run(
|
|
201
|
+
password_cmd.format(project="markdown-exec"),
|
|
202
|
+
capture="stdout",
|
|
203
|
+
pty=False,
|
|
204
|
+
silent=True,
|
|
205
|
+
allow_overrides=False,
|
|
206
|
+
).strip()
|
|
165
207
|
ctx.run(
|
|
166
|
-
tools.twine.upload(*dists, skip_existing=True),
|
|
208
|
+
tools.twine.upload(*dists, skip_existing=True, password=password),
|
|
209
|
+
# Keep the password out of the displayed command, including on failure.
|
|
210
|
+
command=tools.twine.upload(*dists, skip_existing=True).cli_command,
|
|
167
211
|
title="Publishing distributions to PyPI",
|
|
168
212
|
pty=PTY,
|
|
169
213
|
)
|
|
@@ -176,8 +220,8 @@ def release(ctx: Context, version: str = "") -> None:
|
|
|
176
220
|
Parameters:
|
|
177
221
|
version: The new version number to use.
|
|
178
222
|
"""
|
|
179
|
-
if not
|
|
180
|
-
ctx.run(
|
|
223
|
+
if not version:
|
|
224
|
+
version = ctx.run(tools.git_changelog(latest_version=True), silent=True).strip()
|
|
181
225
|
ctx.run("git add pyproject.toml CHANGELOG.md", title="Staging files", pty=PTY)
|
|
182
226
|
ctx.run(["git", "commit", "-m", f"chore: Prepare release {version}"], title="Committing changes", pty=PTY)
|
|
183
227
|
ctx.run(f"git tag -m '' -a {version}", title="Tagging commit", pty=PTY)
|
|
@@ -15,7 +15,7 @@ license-files = [
|
|
|
15
15
|
"LICENSE",
|
|
16
16
|
]
|
|
17
17
|
readme = "README.md"
|
|
18
|
-
requires-python = ">=3.
|
|
18
|
+
requires-python = ">=3.11"
|
|
19
19
|
keywords = [
|
|
20
20
|
"markdown",
|
|
21
21
|
"python",
|
|
@@ -31,20 +31,21 @@ classifiers = [
|
|
|
31
31
|
"Programming Language :: Python",
|
|
32
32
|
"Programming Language :: Python :: 3",
|
|
33
33
|
"Programming Language :: Python :: 3 :: Only",
|
|
34
|
-
"Programming Language :: Python :: 3.10",
|
|
35
34
|
"Programming Language :: Python :: 3.11",
|
|
36
35
|
"Programming Language :: Python :: 3.12",
|
|
37
36
|
"Programming Language :: Python :: 3.13",
|
|
38
37
|
"Programming Language :: Python :: 3.14",
|
|
38
|
+
"Programming Language :: Python :: 3.15",
|
|
39
39
|
"Topic :: Documentation",
|
|
40
40
|
"Topic :: Software Development",
|
|
41
41
|
"Topic :: Utilities",
|
|
42
42
|
"Typing :: Typed",
|
|
43
43
|
]
|
|
44
44
|
dependencies = [
|
|
45
|
+
"markupsafe>=2",
|
|
45
46
|
"pymdown-extensions>=9",
|
|
46
47
|
]
|
|
47
|
-
version = "1.12.
|
|
48
|
+
version = "1.12.5"
|
|
48
49
|
|
|
49
50
|
[project.optional-dependencies]
|
|
50
51
|
ansi = [
|
|
@@ -113,12 +114,12 @@ ci = [
|
|
|
113
114
|
"ty>=0.0.14",
|
|
114
115
|
"types-markdown>=3.6",
|
|
115
116
|
"types-pyyaml>=6.0",
|
|
117
|
+
"zizmor>=1.0",
|
|
116
118
|
]
|
|
117
119
|
docs = [
|
|
118
120
|
"ghp-import>=2.1",
|
|
119
121
|
"markdown-callouts>=0.4",
|
|
120
122
|
"mkdocstrings[python]>=0.29",
|
|
121
|
-
"tomli>=2.0; python_version < '3.11'",
|
|
122
123
|
"zensical>=0.0.21",
|
|
123
124
|
"pydeps>=3.0; python_version == '3.12'",
|
|
124
125
|
"diagrams>=0.24.1; python_version == '3.12'",
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
# SPDX-License-Identifier: ISC
|
|
2
|
+
#
|
|
3
|
+
# ISC License
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2022, Timothée Mazzucotelli and contributors
|
|
6
|
+
#
|
|
7
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
# purpose with or without fee is hereby granted, provided that the above
|
|
9
|
+
# copyright notice and this permission notice appear in all copies.
|
|
10
|
+
#
|
|
11
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
17
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
|
|
1
19
|
# Script to generate the project's credits.
|
|
2
20
|
|
|
3
21
|
from __future__ import annotations
|
|
4
22
|
|
|
5
|
-
import
|
|
23
|
+
import tomllib
|
|
6
24
|
from collections import defaultdict
|
|
7
25
|
from collections.abc import Iterable
|
|
8
26
|
from importlib.metadata import distributions
|
|
@@ -14,12 +32,6 @@ from jinja2 import StrictUndefined
|
|
|
14
32
|
from jinja2.sandbox import SandboxedEnvironment
|
|
15
33
|
from packaging.requirements import Requirement
|
|
16
34
|
|
|
17
|
-
# YORE: EOL 3.10: Replace block with line 2.
|
|
18
|
-
if sys.version_info >= (3, 11):
|
|
19
|
-
import tomllib
|
|
20
|
-
else:
|
|
21
|
-
import tomli as tomllib
|
|
22
|
-
|
|
23
35
|
project_dir = Path.cwd()
|
|
24
36
|
with project_dir.joinpath("pyproject.toml").open("rb") as pyproject_file:
|
|
25
37
|
pyproject = tomllib.load(pyproject_file)
|
|
@@ -53,7 +65,7 @@ def _extra_marker(req: Requirement) -> str | None:
|
|
|
53
65
|
if not req.marker:
|
|
54
66
|
return None
|
|
55
67
|
try:
|
|
56
|
-
return next(marker[2].value for marker in req.marker._markers if getattr(marker[0], "value", None) == "extra") #
|
|
68
|
+
return next(marker[2].value for marker in req.marker._markers if getattr(marker[0], "value", None) == "extra") # ty:ignore[unresolved-attribute]
|
|
57
69
|
except StopIteration:
|
|
58
70
|
return None
|
|
59
71
|
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# SPDX-License-Identifier: ISC
|
|
2
|
+
#
|
|
3
|
+
# ISC License
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2022, Timothée Mazzucotelli and contributors
|
|
6
|
+
#
|
|
7
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
# purpose with or without fee is hereby granted, provided that the above
|
|
9
|
+
# copyright notice and this permission notice appear in all copies.
|
|
10
|
+
#
|
|
11
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
17
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
|
|
1
19
|
# Get current project version from Git tags or changelog.
|
|
2
20
|
|
|
3
21
|
import re
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-License-Identifier: ISC
|
|
3
|
+
#
|
|
4
|
+
# ISC License
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2022, Timothée Mazzucotelli and contributors
|
|
7
|
+
#
|
|
8
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
# purpose with or without fee is hereby granted, provided that the above
|
|
10
|
+
# copyright notice and this permission notice appear in all copies.
|
|
11
|
+
#
|
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
13
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
14
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
15
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
16
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
17
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
18
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
+
|
|
2
20
|
from __future__ import annotations
|
|
3
21
|
|
|
4
22
|
import os
|
|
@@ -14,8 +32,8 @@ if TYPE_CHECKING:
|
|
|
14
32
|
from collections.abc import Iterator
|
|
15
33
|
|
|
16
34
|
|
|
17
|
-
PYTHON_VERSIONS = os.getenv("PYTHON_VERSIONS", "3.
|
|
18
|
-
PYTHON_DEV = "3.
|
|
35
|
+
PYTHON_VERSIONS = os.getenv("PYTHON_VERSIONS", "3.11 3.12 3.13 3.14 3.15").split()
|
|
36
|
+
PYTHON_DEV = "3.16"
|
|
19
37
|
|
|
20
38
|
|
|
21
39
|
def shell(cmd: str, *, capture_output: bool = False, **kwargs: Any) -> str | None:
|
|
@@ -128,6 +146,11 @@ def vscode() -> None:
|
|
|
128
146
|
shutil.copytree("config/vscode", ".vscode", dirs_exist_ok=True)
|
|
129
147
|
|
|
130
148
|
|
|
149
|
+
def zed() -> None:
|
|
150
|
+
"""Configure Zed to work on this project."""
|
|
151
|
+
shutil.copytree("config/zed", ".zed", dirs_exist_ok=True)
|
|
152
|
+
|
|
153
|
+
|
|
131
154
|
def main() -> int:
|
|
132
155
|
"""Main entry point."""
|
|
133
156
|
args = list(sys.argv[1:])
|
|
@@ -147,6 +170,7 @@ def main() -> int:
|
|
|
147
170
|
3.x Run a command in the virtual environment for Python 3.x.
|
|
148
171
|
clean Delete build artifacts and cache files.
|
|
149
172
|
vscode Configure VSCode to work on this project.
|
|
173
|
+
zed Configure Zed to work on this project.
|
|
150
174
|
""",
|
|
151
175
|
),
|
|
152
176
|
flush=True,
|
|
@@ -197,9 +221,11 @@ def main() -> int:
|
|
|
197
221
|
setup()
|
|
198
222
|
elif cmd == "vscode":
|
|
199
223
|
vscode()
|
|
224
|
+
elif cmd == "zed":
|
|
225
|
+
zed()
|
|
200
226
|
elif cmd == "check":
|
|
201
227
|
multirun("duty", "check-quality", "check-types", "check-docs")
|
|
202
|
-
run("default", "duty", "check-api")
|
|
228
|
+
run("default", "duty", "check-security", "check-api")
|
|
203
229
|
elif cmd in {"check-quality", "check-docs", "check-types", "test"}:
|
|
204
230
|
multirun("duty", cmd, *opts)
|
|
205
231
|
else:
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# SPDX-License-Identifier: ISC
|
|
2
|
+
#
|
|
3
|
+
# ISC License
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2022, Timothée Mazzucotelli and contributors
|
|
6
|
+
#
|
|
7
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
# purpose with or without fee is hereby granted, provided that the above
|
|
9
|
+
# copyright notice and this permission notice appear in all copies.
|
|
10
|
+
#
|
|
11
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
17
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
|
|
1
19
|
"""Markdown Exec package.
|
|
2
20
|
|
|
3
21
|
Utilities to execute code blocks in Markdown files.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# SPDX-License-Identifier: ISC
|
|
2
|
+
#
|
|
3
|
+
# ISC License
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2022, Timothée Mazzucotelli and contributors
|
|
6
|
+
#
|
|
7
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
# purpose with or without fee is hereby granted, provided that the above
|
|
9
|
+
# copyright notice and this permission notice appear in all copies.
|
|
10
|
+
#
|
|
11
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
17
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|