shellman 1.0.1__tar.gz → 1.0.2__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 (82) hide show
  1. {shellman-1.0.1 → shellman-1.0.2}/CHANGELOG.md +17 -0
  2. shellman-1.0.2/CODE_OF_CONDUCT.md +84 -0
  3. {shellman-1.0.1 → shellman-1.0.2}/CONTRIBUTING.md +13 -41
  4. {shellman-1.0.1 → shellman-1.0.2}/PKG-INFO +5 -3
  5. {shellman-1.0.1 → shellman-1.0.2}/config/ruff.toml +9 -2
  6. {shellman-1.0.1 → shellman-1.0.2}/config/vscode/launch.json +11 -1
  7. {shellman-1.0.1 → shellman-1.0.2}/docs/.overrides/partials/comments.html +1 -1
  8. shellman-1.0.2/docs/.overrides/partials/path-item.html +22 -0
  9. shellman-1.0.2/docs/changelog.md +5 -0
  10. shellman-1.0.2/docs/code_of_conduct.md +5 -0
  11. shellman-1.0.2/docs/contributing.md +5 -0
  12. {shellman-1.0.1 → shellman-1.0.2}/docs/credits.md +1 -2
  13. shellman-1.0.2/docs/css/mkdocstrings.css +72 -0
  14. {shellman-1.0.1 → shellman-1.0.2}/docs/index.md +1 -0
  15. {shellman-1.0.1 → shellman-1.0.2}/docs/license.md +1 -0
  16. shellman-1.0.2/docs/reference/api.md +9 -0
  17. {shellman-1.0.1 → shellman-1.0.2}/duties.py +11 -2
  18. {shellman-1.0.1 → shellman-1.0.2}/mkdocs.yml +17 -12
  19. {shellman-1.0.1 → shellman-1.0.2}/pyproject.toml +28 -15
  20. {shellman-1.0.1 → shellman-1.0.2}/scripts/gen_credits.py +2 -2
  21. shellman-1.0.2/scripts/get_version.py +26 -0
  22. shellman-1.0.2/scripts/make +1 -0
  23. {shellman-1.0.1 → shellman-1.0.2}/scripts/make.py +3 -7
  24. shellman-1.0.2/src/shellman/__init__.py +145 -0
  25. {shellman-1.0.1 → shellman-1.0.2}/src/shellman/__main__.py +1 -1
  26. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/cli.py +7 -9
  27. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/context.py +3 -1
  28. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/debug.py +13 -15
  29. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/reader.py +27 -13
  30. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/tags.py +62 -42
  31. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/__init__.py +15 -2
  32. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/filters.py +2 -1
  33. shellman-1.0.2/src/shellman/cli.py +17 -0
  34. shellman-1.0.2/src/shellman/context.py +17 -0
  35. shellman-1.0.2/src/shellman/py.typed +0 -0
  36. shellman-1.0.2/src/shellman/reader.py +17 -0
  37. shellman-1.0.2/src/shellman/tags.py +17 -0
  38. shellman-1.0.2/src/shellman/templates/__init__.py +17 -0
  39. shellman-1.0.2/src/shellman/templates/filters.py +17 -0
  40. shellman-1.0.2/tests/test_api.py +195 -0
  41. {shellman-1.0.1 → shellman-1.0.2}/tests/test_cli.py +14 -15
  42. {shellman-1.0.1 → shellman-1.0.2}/tests/test_context.py +1 -1
  43. {shellman-1.0.1 → shellman-1.0.2}/tests/test_reader.py +1 -1
  44. shellman-1.0.2/tests/test_tags.py +255 -0
  45. shellman-1.0.1/CODE_OF_CONDUCT.md +0 -133
  46. shellman-1.0.1/docs/changelog.md +0 -1
  47. shellman-1.0.1/docs/code_of_conduct.md +0 -1
  48. shellman-1.0.1/docs/contributing.md +0 -1
  49. shellman-1.0.1/docs/css/mkdocstrings.css +0 -27
  50. shellman-1.0.1/scripts/gen_ref_nav.py +0 -37
  51. shellman-1.0.1/scripts/make +0 -193
  52. shellman-1.0.1/src/shellman/__init__.py +0 -19
  53. {shellman-1.0.1 → shellman-1.0.2}/LICENSE +0 -0
  54. {shellman-1.0.1 → shellman-1.0.2}/README.md +0 -0
  55. {shellman-1.0.1 → shellman-1.0.2}/config/coverage.ini +0 -0
  56. {shellman-1.0.1 → shellman-1.0.2}/config/git-changelog.toml +0 -0
  57. {shellman-1.0.1 → shellman-1.0.2}/config/mypy.ini +0 -0
  58. {shellman-1.0.1 → shellman-1.0.2}/config/pytest.ini +0 -0
  59. {shellman-1.0.1 → shellman-1.0.2}/config/vscode/settings.json +0 -0
  60. {shellman-1.0.1 → shellman-1.0.2}/config/vscode/tasks.json +0 -0
  61. {shellman-1.0.1 → shellman-1.0.2}/docs/.overrides/main.html +0 -0
  62. {shellman-1.0.1 → shellman-1.0.2}/docs/css/material.css +0 -0
  63. {shellman-1.0.1 → shellman-1.0.2}/docs/js/feedback.js +0 -0
  64. {shellman-1.0.1 → shellman-1.0.2}/docs/todo.md +0 -0
  65. {shellman-1.0.1 → shellman-1.0.2}/docs/usage/index.md +0 -0
  66. {shellman-1.0.1 → shellman-1.0.2}/docs/usage/plugins.md +0 -0
  67. {shellman-1.0.1 → shellman-1.0.2}/docs/usage/syntax.md +0 -0
  68. {shellman-1.0.1 → shellman-1.0.2}/docs/usage/tags.md +0 -0
  69. /shellman-1.0.1/src/shellman/py.typed → /shellman-1.0.2/src/shellman/_internal/__init__.py +0 -0
  70. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/helptext +0 -0
  71. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/helptext_function +0 -0
  72. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/manpage.groff +0 -0
  73. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/manpage.md +0 -0
  74. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/manpage_function.groff +0 -0
  75. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/manpage_function.md +0 -0
  76. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/usagetext +0 -0
  77. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/wikipage.md +0 -0
  78. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/wikipage_function.md +0 -0
  79. {shellman-1.0.1/src/shellman → shellman-1.0.2/src/shellman/_internal}/templates/data/wikipage_toc.md +0 -0
  80. {shellman-1.0.1 → shellman-1.0.2}/tests/__init__.py +0 -0
  81. {shellman-1.0.1 → shellman-1.0.2}/tests/conftest.py +0 -0
  82. {shellman-1.0.1 → shellman-1.0.2}/tests/fakescripts/simple.sh +0 -0
@@ -6,6 +6,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  <!-- insertion marker -->
9
+ ## [1.0.2](https://github.com/pawamoy/shellman/releases/tag/1.0.2) - 2025-03-27
10
+
11
+ <small>[Compare with 1.0.1](https://github.com/pawamoy/shellman/compare/1.0.1...1.0.2)</small>
12
+
13
+ ### Deprecations
14
+
15
+ Submodules are deprecated, import from the top-level `shellman` module instead.
16
+
17
+ ### Bug Fixes
18
+
19
+ - Return correct tag instances from `from_lines`, fixing parsing of `file` tags (value and description) ([e597d9d](https://github.com/pawamoy/shellman/commit/e597d9d33bc6767fb653db37b910607f1d3f476d) by Timothée Mazzucotelli). [Issue-mkdocstrings-shell-3](https://github.com/mkdocstrings/shell/issues/3)
20
+
21
+ ### Code Refactoring
22
+
23
+ - Re-expose submodules as deprecated ([c8f6676](https://github.com/pawamoy/shellman/commit/c8f66760ceb1428a94543ddbdab2e2c8111c3784) by Timothée Mazzucotelli).
24
+ - Move submodules under internal folder, sync API and docs ([60de99f](https://github.com/pawamoy/shellman/commit/60de99f3df4e13e2321a84797a4e3aaa103efdd0) by Timothée Mazzucotelli).
25
+
9
26
  ## [1.0.1](https://github.com/pawamoy/shellman/releases/tag/1.0.1) - 2024-11-25
10
27
 
11
28
  <small>[Compare with 1.0.0](https://github.com/pawamoy/shellman/compare/1.0.0...1.0.1)</small>
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
+ * Trolling, insulting or derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at dev@pawamoy.fr. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
+
47
+ ### 1. Correction
48
+
49
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
+
51
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
+
53
+ ### 2. Warning
54
+
55
+ **Community Impact**: A violation through a single incident or series of actions.
56
+
57
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
+
59
+ ### 3. Temporary Ban
60
+
61
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
+
63
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
+
65
+ ### 4. Permanent Ban
66
+
67
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
+
69
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
70
+
71
+ ## Attribution
72
+
73
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
+
75
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
+
77
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
+
79
+ [homepage]: https://www.contributor-covenant.org
80
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
+ [Mozilla CoC]: https://github.com/mozilla/diversity
82
+ [FAQ]: https://www.contributor-covenant.org/faq
83
+ [translations]: https://www.contributor-covenant.org/translations
84
+
@@ -1,7 +1,6 @@
1
1
  # Contributing
2
2
 
3
- Contributions are welcome, and they are greatly appreciated!
4
- Every little bit helps, and credit will always be given.
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
5
4
 
6
5
  ## Environment setup
7
6
 
@@ -14,11 +13,7 @@ cd shellman
14
13
  make setup
15
14
  ```
16
15
 
17
- > NOTE:
18
- > If it fails for some reason,
19
- > you'll need to install
20
- > [uv](https://github.com/astral-sh/uv)
21
- > manually.
16
+ > NOTE: If it fails for some reason, you'll need to install [uv](https://github.com/astral-sh/uv) manually.
22
17
  >
23
18
  > You can install it with:
24
19
  >
@@ -26,8 +21,7 @@ make setup
26
21
  > curl -LsSf https://astral.sh/uv/install.sh | sh
27
22
  > ```
28
23
  >
29
- > Now you can try running `make setup` again,
30
- > or simply `uv sync`.
24
+ > Now you can try running `make setup` again, or simply `uv sync`.
31
25
 
32
26
  You now have the dependencies installed.
33
27
 
@@ -37,15 +31,10 @@ Run `make help` to see all the available actions!
37
31
 
38
32
  ## Tasks
39
33
 
40
- The entry-point to run commands and tasks is the `make` Python script,
41
- located in the `scripts` directory. Try running `make` to show the available commands and tasks.
42
- The *commands* do not need the Python dependencies to be installed,
43
- while the *tasks* do.
44
- The cross-platform tasks are written in Python, thanks to [duty](https://github.com/pawamoy/duty).
34
+ The entry-point to run commands and tasks is the `make` Python script, located in the `scripts` directory. Try running `make` to show the available commands and tasks. The *commands* do not need the Python dependencies to be installed,
35
+ while the *tasks* do. The cross-platform tasks are written in Python, thanks to [duty](https://github.com/pawamoy/duty).
45
36
 
46
- If you work in VSCode, we provide
47
- [an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup)
48
- for the project.
37
+ If you work in VSCode, we provide [an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup) for the project.
49
38
 
50
39
  ## Development
51
40
 
@@ -64,17 +53,13 @@ As usual:
64
53
  1. go to http://localhost:8000 and check that everything looks good
65
54
  1. follow our [commit message convention](#commit-message-convention)
66
55
 
67
- If you are unsure about how to fix or ignore a warning,
68
- just let the continuous integration fail,
69
- and we will help you during review.
56
+ If you are unsure about how to fix or ignore a warning, just let the continuous integration fail, and we will help you during review.
70
57
 
71
58
  Don't bother updating the changelog, we will take care of this.
72
59
 
73
60
  ## Commit message convention
74
61
 
75
- Commit messages must follow our convention based on the
76
- [Angular style](https://gist.github.com/stephenparish/9941e89d80e2bc58a153#format-of-the-commit-message)
77
- or the [Karma convention](https://karma-runner.github.io/4.0/dev/git-commit-msg.html):
62
+ Commit messages must follow our convention based on the [Angular style](https://gist.github.com/stephenparish/9941e89d80e2bc58a153#format-of-the-commit-message) or the [Karma convention](https://karma-runner.github.io/4.0/dev/git-commit-msg.html):
78
63
 
79
64
  ```
80
65
  <type>[(scope)]: Subject
@@ -82,10 +67,7 @@ or the [Karma convention](https://karma-runner.github.io/4.0/dev/git-commit-msg.
82
67
  [Body]
83
68
  ```
84
69
 
85
- **Subject and body must be valid Markdown.**
86
- Subject must have proper casing (uppercase for first letter
87
- if it makes sense), but no dot at the end, and no punctuation
88
- in general.
70
+ **Subject and body must be valid Markdown.** Subject must have proper casing (uppercase for first letter if it makes sense), but no dot at the end, and no punctuation in general.
89
71
 
90
72
  Scope and body are optional. Type can be:
91
73
 
@@ -101,9 +83,7 @@ Scope and body are optional. Type can be:
101
83
  - `style`: A change in code style/format.
102
84
  - `tests`: About tests.
103
85
 
104
- If you write a body, please add trailers at the end
105
- (for example issues and PR references, or co-authors),
106
- without relying on GitHub's flavored Markdown:
86
+ If you write a body, please add trailers at the end (for example issues and PR references, or co-authors), without relying on GitHub's flavored Markdown:
107
87
 
108
88
  ```
109
89
  Body.
@@ -112,16 +92,9 @@ Issue #10: https://github.com/namespace/project/issues/10
112
92
  Related to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15
113
93
  ```
114
94
 
115
- These "trailers" must appear at the end of the body,
116
- without any blank lines between them. The trailer title
117
- can contain any character except colons `:`.
118
- We expect a full URI for each trailer, not just GitHub autolinks
119
- (for example, full GitHub URLs for commits and issues,
120
- not the hash or the #issue-number).
95
+ These "trailers" must appear at the end of the body, without any blank lines between them. The trailer title can contain any character except colons `:`. We expect a full URI for each trailer, not just GitHub autolinks (for example, full GitHub URLs for commits and issues, not the hash or the #issue-number).
121
96
 
122
- We do not enforce a line length on commit messages summary and body,
123
- but please avoid very long summaries, and very long lines in the body,
124
- unless they are part of code blocks that must not be wrapped.
97
+ We do not enforce a line length on commit messages summary and body, but please avoid very long summaries, and very long lines in the body, unless they are part of code blocks that must not be wrapped.
125
98
 
126
99
  ## Pull requests guidelines
127
100
 
@@ -146,5 +119,4 @@ And force-push:
146
119
  git push -f
147
120
  ```
148
121
 
149
- If this seems all too complicated, you can push or force-push each new commit,
150
- and we will squash them ourselves if needed, before merging.
122
+ If this seems all too complicated, you can push or force-push each new commit, and we will squash them ourselves if needed, before merging.
@@ -1,9 +1,10 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: shellman
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: Write documentation in comments and render it with templates.
5
5
  Author-Email: =?utf-8?q?Timoth=C3=A9e_Mazzucotelli?= <dev@pawamoy.fr>
6
- License: ISC
6
+ License-Expression: ISC
7
+ License-File: LICENSE
7
8
  Classifier: Development Status :: 4 - Beta
8
9
  Classifier: Intended Audience :: Developers
9
10
  Classifier: Programming Language :: Python
@@ -30,6 +31,7 @@ Project-URL: Funding, https://github.com/sponsors/pawamoy
30
31
  Requires-Python: >=3.9
31
32
  Requires-Dist: jinja2>=3
32
33
  Requires-Dist: importlib-metadata>=4.6; python_version < "3.10"
34
+ Requires-Dist: typing-extensions>=4.0; python_version < "3.11"
33
35
  Description-Content-Type: text/markdown
34
36
 
35
37
  <p align="center">
@@ -47,17 +47,24 @@ ignore = [
47
47
  ]
48
48
 
49
49
  [lint.per-file-ignores]
50
- "src/*/cli.py" = [
50
+ "src/**/cli.py" = [
51
51
  "T201", # Print statement
52
52
  ]
53
53
  "src/*/debug.py" = [
54
54
  "T201", # Print statement
55
55
  ]
56
+ "!src/*/*.py" = [
57
+ "D100", # Missing docstring in public module
58
+ ]
59
+ "!src/**.py" = [
60
+ "D101", # Missing docstring in public class
61
+ "D103", # Missing docstring in public function
62
+ ]
56
63
  "scripts/*.py" = [
57
64
  "INP001", # File is part of an implicit namespace package
58
65
  "T201", # Print statement
59
66
  ]
60
- "tests/*.py" = [
67
+ "tests/**.py" = [
61
68
  "ARG005", # Unused lambda argument
62
69
  "FBT001", # Boolean positional arg in function definition
63
70
  "PLR2004", # Magic value used in comparison
@@ -7,7 +7,17 @@
7
7
  "request": "launch",
8
8
  "program": "${file}",
9
9
  "console": "integratedTerminal",
10
- "justMyCode": false
10
+ "justMyCode": false,
11
+ "args": "${command:pickArgs}"
12
+ },
13
+ {
14
+ "name": "run",
15
+ "type": "debugpy",
16
+ "request": "launch",
17
+ "module": "shellman",
18
+ "console": "integratedTerminal",
19
+ "justMyCode": false,
20
+ "args": "${command:pickArgs}"
11
21
  },
12
22
  {
13
23
  "name": "docs",
@@ -31,7 +31,7 @@
31
31
  : "light"
32
32
 
33
33
  // Instruct Giscus to set theme
34
- giscus.setAttribute("data-theme", theme)
34
+ giscus.setAttribute("data-theme", theme)
35
35
  }
36
36
 
37
37
  // Register event handlers after documented loaded
@@ -0,0 +1,22 @@
1
+ {# Fix breadcrumbs for when mkdocs-section-index is used. #}
2
+ {# See https://github.com/squidfunk/mkdocs-material/issues/7614. #}
3
+
4
+ <!-- Render navigation link content -->
5
+ {% macro render_content(nav_item) %}
6
+ <span class="md-ellipsis">
7
+ {{ nav_item.title }}
8
+ </span>
9
+ {% endmacro %}
10
+
11
+ <!-- Render navigation item -->
12
+ {% macro render(nav_item, ref=nav_item) %}
13
+ {% if nav_item.is_page %}
14
+ <li class="md-path__item">
15
+ <a href="{{ nav_item.url | url }}" class="md-path__link">
16
+ {{ render_content(ref) }}
17
+ </a>
18
+ </li>
19
+ {% elif nav_item.children %}
20
+ {{ render(nav_item.children | first, ref) }}
21
+ {% endif %}
22
+ {% endmacro %}
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Changelog
3
+ ---
4
+
5
+ --8<-- "CHANGELOG.md"
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Code of Conduct
3
+ ---
4
+
5
+ --8<-- "CODE_OF_CONDUCT.md"
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Contributing
3
+ ---
4
+
5
+ --8<-- "CONTRIBUTING.md"
@@ -1,10 +1,9 @@
1
1
  ---
2
+ title: Credits
2
3
  hide:
3
4
  - toc
4
5
  ---
5
6
 
6
- <!-- blacken-docs:off -->
7
7
  ```python exec="yes"
8
8
  --8<-- "scripts/gen_credits.py"
9
9
  ```
10
- <!-- blacken-docs:on -->
@@ -0,0 +1,72 @@
1
+ /* Indentation. */
2
+ div.doc-contents:not(.first) {
3
+ padding-left: 25px;
4
+ border-left: .05rem solid var(--md-typeset-table-color);
5
+ }
6
+
7
+ /* Mark external links as such. */
8
+ a.external::after,
9
+ a.autorefs-external::after {
10
+ /* https://primer.style/octicons/arrow-up-right-24 */
11
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
12
+ -webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
13
+ content: ' ';
14
+
15
+ display: inline-block;
16
+ vertical-align: middle;
17
+ position: relative;
18
+
19
+ height: 1em;
20
+ width: 1em;
21
+ background-color: currentColor;
22
+ }
23
+
24
+ a.external:hover::after,
25
+ a.autorefs-external:hover::after {
26
+ background-color: var(--md-accent-fg-color);
27
+ }
28
+
29
+ /* Tree-like output for backlinks. */
30
+ .doc-backlink-list {
31
+ --tree-clr: var(--md-default-fg-color);
32
+ --tree-font-size: 1rem;
33
+ --tree-item-height: 1;
34
+ --tree-offset: 1rem;
35
+ --tree-thickness: 1px;
36
+ --tree-style: solid;
37
+ display: grid;
38
+ list-style: none !important;
39
+ }
40
+
41
+ .doc-backlink-list li > span:first-child {
42
+ text-indent: .3rem;
43
+ }
44
+ .doc-backlink-list li {
45
+ padding-inline-start: var(--tree-offset);
46
+ border-left: var(--tree-thickness) var(--tree-style) var(--tree-clr);
47
+ position: relative;
48
+ margin-left: 0 !important;
49
+
50
+ &:last-child {
51
+ border-color: transparent;
52
+ }
53
+ &::before{
54
+ content: '';
55
+ position: absolute;
56
+ top: calc(var(--tree-item-height) / 2 * -1 * var(--tree-font-size) + var(--tree-thickness));
57
+ left: calc(var(--tree-thickness) * -1);
58
+ width: calc(var(--tree-offset) + var(--tree-thickness) * 2);
59
+ height: calc(var(--tree-item-height) * var(--tree-font-size));
60
+ border-left: var(--tree-thickness) var(--tree-style) var(--tree-clr);
61
+ border-bottom: var(--tree-thickness) var(--tree-style) var(--tree-clr);
62
+ }
63
+ &::after{
64
+ content: '';
65
+ position: absolute;
66
+ border-radius: 50%;
67
+ background-color: var(--tree-clr);
68
+ top: calc(var(--tree-item-height) / 2 * 1rem);
69
+ left: var(--tree-offset) ;
70
+ translate: calc(var(--tree-thickness) * -1) calc(var(--tree-thickness) * -1);
71
+ }
72
+ }
@@ -1,4 +1,5 @@
1
1
  ---
2
+ title: Overview
2
3
  hide:
3
4
  - feedback
4
5
  ---
@@ -1,4 +1,5 @@
1
1
  ---
2
+ title: License
2
3
  hide:
3
4
  - feedback
4
5
  ---
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: API reference
3
+ hide:
4
+ - navigation
5
+ ---
6
+
7
+ # ::: shellman
8
+ options:
9
+ show_submodules: true
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import os
6
+ import re
6
7
  import sys
7
8
  from contextlib import contextmanager
8
9
  from importlib.metadata import version as pkgversion
@@ -26,7 +27,7 @@ PTY = not WINDOWS and not CI
26
27
  MULTIRUN = os.environ.get("MULTIRUN", "0") == "1"
27
28
 
28
29
 
29
- def pyprefix(title: str) -> str: # noqa: D103
30
+ def pyprefix(title: str) -> str:
30
31
  if MULTIRUN:
31
32
  prefix = f"(python{sys.version_info.major}.{sys.version_info.minor})"
32
33
  return f"{prefix:14}{title}"
@@ -34,7 +35,7 @@ def pyprefix(title: str) -> str: # noqa: D103
34
35
 
35
36
 
36
37
  @contextmanager
37
- def material_insiders() -> Iterator[bool]: # noqa: D103
38
+ def material_insiders() -> Iterator[bool]:
38
39
  if "+insiders" in pkgversion("mkdocs-material"):
39
40
  os.environ["MATERIAL_INSIDERS"] = "true"
40
41
  try:
@@ -45,6 +46,12 @@ def material_insiders() -> Iterator[bool]: # noqa: D103
45
46
  yield False
46
47
 
47
48
 
49
+ def _get_changelog_version() -> str:
50
+ changelog_version_re = re.compile(r"^## \[(\d+\.\d+\.\d+)\].*$")
51
+ with Path(__file__).parent.joinpath("CHANGELOG.md").open("r", encoding="utf8") as file:
52
+ return next(filter(bool, map(changelog_version_re.match, file))).group(1) # type: ignore[union-attr]
53
+
54
+
48
55
  @duty
49
56
  def changelog(ctx: Context, bump: str = "") -> None:
50
57
  """Update the changelog in-place with latest commits.
@@ -53,6 +60,7 @@ def changelog(ctx: Context, bump: str = "") -> None:
53
60
  bump: Bump option passed to git-changelog.
54
61
  """
55
62
  ctx.run(tools.git_changelog(bump=bump or None), title="Updating changelog")
63
+ ctx.run(tools.yore.check(bump=bump or _get_changelog_version()), title="Checking legacy code")
56
64
 
57
65
 
58
66
  @duty(pre=["check-quality", "check-types", "check-docs", "check-api"])
@@ -84,6 +92,7 @@ def check_docs(ctx: Context) -> None:
84
92
  @duty
85
93
  def check_types(ctx: Context) -> None:
86
94
  """Check that the code is correctly typed."""
95
+ os.environ["FORCE_COLOR"] = "1"
87
96
  ctx.run(
88
97
  tools.mypy(*PY_SRC_LIST, config_file="config/mypy.ini"),
89
98
  title=pyprefix("Type-checking"),
@@ -20,14 +20,12 @@ nav:
20
20
  - Credits: credits.md
21
21
  - License: license.md
22
22
  - Todo: todo.md
23
- - Usage:
23
+ - Usage:
24
24
  - usage/index.md
25
25
  - Syntax: usage/syntax.md
26
26
  - Tags: usage/tags.md
27
27
  - Plugins: usage/plugins.md
28
- # defer to gen-files + literate-nav
29
- - API reference:
30
- - shellman: reference/
28
+ - API reference: reference/api.md
31
29
  - Development:
32
30
  - Contributing: contributing.md
33
31
  - Code of Conduct: code_of_conduct.md
@@ -47,7 +45,8 @@ theme:
47
45
  - content.code.copy
48
46
  - content.tooltips
49
47
  - navigation.footer
50
- - navigation.indexes
48
+ - navigation.instant.preview
49
+ - navigation.path
51
50
  - navigation.sections
52
51
  - navigation.tabs
53
52
  - navigation.tabs.sticky
@@ -107,24 +106,24 @@ markdown_extensions:
107
106
 
108
107
  plugins:
109
108
  - search
109
+ - autorefs
110
110
  - markdown-exec
111
- - gen-files:
112
- scripts:
113
- - scripts/gen_ref_nav.py
114
- - literate-nav:
115
- nav_file: SUMMARY.md
111
+ - section-index
116
112
  - coverage
117
113
  - mkdocstrings:
118
114
  handlers:
119
115
  python:
120
- import:
116
+ inventories:
121
117
  - https://docs.python.org/3/objects.inv
122
118
  paths: [src]
123
119
  options:
120
+ backlinks: tree
124
121
  docstring_options:
125
122
  ignore_init_summary: true
126
123
  docstring_section_style: list
127
- filters: ["!^_"]
124
+ extensions:
125
+ - griffe_inherited_docstrings
126
+ filters: public
128
127
  heading_level: 1
129
128
  inherited_members: true
130
129
  merge_init_into_class: true
@@ -137,6 +136,12 @@ plugins:
137
136
  show_symbol_type_toc: true
138
137
  signature_crossrefs: true
139
138
  summary: true
139
+ - llmstxt:
140
+ files:
141
+ - output: llms-full.txt
142
+ inputs:
143
+ - index.md
144
+ - reference/**.md
140
145
  - git-revision-date-localized:
141
146
  enabled: !ENV [DEPLOY, false]
142
147
  enable_creation_date: true