mkdocs-mknodes 0.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 (61) hide show
  1. mkdocs_mknodes-0.0.2/.editorconfig +11 -0
  2. mkdocs_mknodes-0.0.2/.github/README.md +217 -0
  3. mkdocs_mknodes-0.0.2/.github/workflows/build.yml +67 -0
  4. mkdocs_mknodes-0.0.2/.github/workflows/documentation.yml +60 -0
  5. mkdocs_mknodes-0.0.2/.gitignore +114 -0
  6. mkdocs_mknodes-0.0.2/.pre-commit-config.yaml +52 -0
  7. mkdocs_mknodes-0.0.2/LICENSE +22 -0
  8. mkdocs_mknodes-0.0.2/Makefile +34 -0
  9. mkdocs_mknodes-0.0.2/PKG-INFO +96 -0
  10. mkdocs_mknodes-0.0.2/README.md +58 -0
  11. mkdocs_mknodes-0.0.2/configs/mkdocs_basic.yml +26 -0
  12. mkdocs_mknodes-0.0.2/configs/mkdocs_mkdocs.yml +40 -0
  13. mkdocs_mknodes-0.0.2/configs/mkdocs_mkdocstrings.yml +39 -0
  14. mkdocs_mknodes-0.0.2/configs/mkdocs_multipage.yml +7 -0
  15. mkdocs_mknodes-0.0.2/docs/assets/cli.gif +0 -0
  16. mkdocs_mknodes-0.0.2/docs/overrides/Development/Redirect.html +13 -0
  17. mkdocs_mknodes-0.0.2/docs/overrides/_dummy.txt +1 -0
  18. mkdocs_mknodes-0.0.2/docs/overrides/home.html +106 -0
  19. mkdocs_mknodes-0.0.2/docs/overrides/partials/actions.html +65 -0
  20. mkdocs_mknodes-0.0.2/mkdocs.yml +101 -0
  21. mkdocs_mknodes-0.0.2/mkdocs_mknodes/__init__.py +1 -0
  22. mkdocs_mknodes-0.0.2/mkdocs_mknodes/buildcollector.py +167 -0
  23. mkdocs_mknodes-0.0.2/mkdocs_mknodes/cli/__init__.py +194 -0
  24. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/__init__.py +13 -0
  25. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/cli_section.py +37 -0
  26. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/dev_section.py +70 -0
  27. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/github_index.py +17 -0
  28. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/internals_section.py +74 -0
  29. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/multi_project.py +19 -0
  30. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/root.py +77 -0
  31. mkdocs_mknodes-0.0.2/mkdocs_mknodes/manual/use_cases_section.py +34 -0
  32. mkdocs_mknodes-0.0.2/mkdocs_mknodes/mkdocsconfig.py +141 -0
  33. mkdocs_mknodes-0.0.2/mkdocs_mknodes/paths.py +11 -0
  34. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/__init__.py +179 -0
  35. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/build_page.py +165 -0
  36. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/buildbackend.py +45 -0
  37. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/linkreplacer.py +49 -0
  38. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/markdownbackend.py +37 -0
  39. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/mkdocsbackend.py +184 -0
  40. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/mkdocsbuilder.py +127 -0
  41. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/mkdocshelpers.py +24 -0
  42. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/pluginconfig.py +45 -0
  43. mkdocs_mknodes-0.0.2/mkdocs_mknodes/plugin/serve.py +228 -0
  44. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/build_process.jinja +55 -0
  45. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/cli_index.jinja +15 -0
  46. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/material_css.jinja +88 -0
  47. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/material_css_extra.jinja +223 -0
  48. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/mkclasspage.jinja +11 -0
  49. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/mkdocs_css.jinja +7 -0
  50. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/modulepage.md +11 -0
  51. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/python_objects.inv +0 -0
  52. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/requirements.md +31 -0
  53. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/use_case_by_config.jinja +10 -0
  54. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/use_case_default_website.jinja +10 -0
  55. mkdocs_mknodes-0.0.2/mkdocs_mknodes/resources/use_cases_index.jinja +46 -0
  56. mkdocs_mknodes-0.0.2/mkdocs_mknodes.sublime-project +8 -0
  57. mkdocs_mknodes-0.0.2/pyproject.toml +301 -0
  58. mkdocs_mknodes-0.0.2/tests/__init__.py +0 -0
  59. mkdocs_mknodes-0.0.2/tests/conftest.py +11 -0
  60. mkdocs_mknodes-0.0.2/tests/data/objects.inv +0 -0
  61. mkdocs_mknodes-0.0.2/tests/test_build.py +2 -0
@@ -0,0 +1,11 @@
1
+ # http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ indent_style = space
7
+ indent_size = 4
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+ charset = utf-8
11
+ end_of_line = lf
@@ -0,0 +1,217 @@
1
+ ``` py title='__main__.create_github_index_md' linenums="86" hl_lines="3"
2
+ def create_github_index_md() -> mknodes.MkPage:
3
+ page = mknodes.MkPage("Github index")
4
+ page += mknodes.MkCode.for_object(create_github_index_md)
5
+ page += mknodes.MkHeader("MkNodes", level=1)
6
+ page += mknodes.MkHeader("Don't write docs. Code them.", level=4)
7
+ page += mknodes.MkShields()
8
+ page += mknodes.MkLink(DOC_URL, "Read the completely coded documentation!")
9
+ page += mknodes.MkInstallGuide(header="How to install")
10
+ page += mknodes.MkHeader("All the nodes!")
11
+ page += mknodes.MkClassDiagram(mknodes.MkNode, mode="subclasses", direction="LR")
12
+ return page
13
+
14
+ ```
15
+
16
+ # MkNodes
17
+
18
+ #### Don't write docs. Code them.
19
+
20
+ [![PyPI License](https://img.shields.io/pypi/l/mknodes.svg)](https://pypi.org/project/mknodes/)
21
+ [![Package status](https://img.shields.io/pypi/status/mknodes.svg)](https://pypi.org/project/mknodes/)
22
+ [![Daily downloads](https://img.shields.io/pypi/dd/mknodes.svg)](https://pypi.org/project/mknodes/)
23
+ [![Weekly downloads](https://img.shields.io/pypi/dw/mknodes.svg)](https://pypi.org/project/mknodes/)
24
+ [![Monthly downloads](https://img.shields.io/pypi/dm/mknodes.svg)](https://pypi.org/project/mknodes/)
25
+ [![Distribution format](https://img.shields.io/pypi/format/mknodes.svg)](https://pypi.org/project/mknodes/)
26
+ [![Wheel availability](https://img.shields.io/pypi/wheel/mknodes.svg)](https://pypi.org/project/mknodes/)
27
+ [![Python version](https://img.shields.io/pypi/pyversions/mknodes.svg)](https://pypi.org/project/mknodes/)
28
+ [![Implementation](https://img.shields.io/pypi/implementation/mknodes.svg)](https://pypi.org/project/mknodes/)
29
+ [![Releases](https://img.shields.io/github/downloads/phil65/mknodes/total.svg)](https://github.com/phil65/mknodes/releases)
30
+ [![Github Contributors](https://img.shields.io/github/contributors/phil65/mknodes)](https://github.com/phil65/mknodes/graphs/contributors)
31
+ [![Github Discussions](https://img.shields.io/github/discussions/phil65/mknodes)](https://github.com/phil65/mknodes/discussions)
32
+ [![Github Forks](https://img.shields.io/github/forks/phil65/mknodes)](https://github.com/phil65/mknodes/forks)
33
+ [![Github Issues](https://img.shields.io/github/issues/phil65/mknodes)](https://github.com/phil65/mknodes/issues)
34
+ [![Github Issues](https://img.shields.io/github/issues-pr/phil65/mknodes)](https://github.com/phil65/mknodes/pulls)
35
+ [![Github Watchers](https://img.shields.io/github/watchers/phil65/mknodes)](https://github.com/phil65/mknodes/watchers)
36
+ [![Github Stars](https://img.shields.io/github/stars/phil65/mknodes)](https://github.com/phil65/mknodes/stars)
37
+ [![Github Repository size](https://img.shields.io/github/repo-size/phil65/mknodes)](https://github.com/phil65/mknodes)
38
+ [![Github last commit](https://img.shields.io/github/last-commit/phil65/mknodes)](https://github.com/phil65/mknodes/commits)
39
+ [![Github release date](https://img.shields.io/github/release-date/phil65/mknodes)](https://github.com/phil65/mknodes/releases)
40
+ [![Github language count](https://img.shields.io/github/languages/count/phil65/mknodes)](https://github.com/phil65/mknodes)
41
+ [![Github commits this week](https://img.shields.io/github/commit-activity/w/phil65/mknodes)](https://github.com/phil65/mknodes)
42
+ [![Github commits this month](https://img.shields.io/github/commit-activity/m/phil65/mknodes)](https://github.com/phil65/mknodes)
43
+ [![Github commits this year](https://img.shields.io/github/commit-activity/y/phil65/mknodes)](https://github.com/phil65/mknodes)
44
+ [![Package status](https://codecov.io/gh/phil65/mknodes/branch/main/graph/badge.svg)](https://codecov.io/gh/phil65/mknodes/)
45
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
46
+ [![PyUp](https://pyup.io/repos/github/phil65/mknodes/shield.svg)](https://pyup.io/repos/github/phil65/mknodes/)
47
+
48
+ [Read the completely coded documentation!](https://phil65.github.io/mknodes/)
49
+
50
+ ## How to install
51
+
52
+ ### pip
53
+
54
+ The latest released version is available at the [Python package index](https://pypi.org/project/mknodes).
55
+
56
+ ``` py
57
+ pip install mknodes
58
+ ```
59
+
60
+ ## All the nodes!
61
+
62
+ ``` mermaid
63
+ graph LR
64
+ 2257944740368["mknode.MkNode"]
65
+ 2257944738416["mkheader.MkHeader"]
66
+ 2257955065920["mktext.MkText"]
67
+ 2257991175136["mkchangelog.MkChangelog"]
68
+ 2257991176112["mkcodeofconduct.MkCodeOfConduct"]
69
+ 2257952121424["mklicense.MkLicense"]
70
+ 2257955088368["mkcontainer.MkContainer"]
71
+ 2257955064944["mkblock.MkBlock"]
72
+ 2257955089344["mkhtmlblock.MkHtmlBlock"]
73
+ 2257955078608["mkadmonitionblock.MkAdmonitionBlock"]
74
+ 2257955077632["mkdetailsblock.MkDetailsBlock"]
75
+ 2257955160592["mktabs.MkTabBlock"]
76
+ 2257955071776["mkadmonition.MkAdmonition"]
77
+ 2257955084464["mkblockquote.MkBlockQuote"]
78
+ 2257955086416["mkcode.MkCode"]
79
+ 2257955158640["mkdiagram.MkDiagram"]
80
+ 2257954958560["mkclassdiagram.MkClassDiagram"]
81
+ 2257952071648["mktreeview.MkTreeView"]
82
+ 2257952109712["mkmoduleoverview.MkModuleOverview"]
83
+ 2257952072624["mkprettyprint.MkPrettyPrint"]
84
+ 2257952105808["mklog.MkLog"]
85
+ 2257955091296["mkfootnotes.MkFootNote"]
86
+ 2257955082512["mkfootnotes.MkFootNotes"]
87
+ 2257955101056["mkpage.MkPage"]
88
+ 2257954988816["mktemplatepage.MkTemplatePage"]
89
+ 2257954999552["mkclasspage.MkClassPage"]
90
+ 2257954994672["mkmodulepage.MkModulePage"]
91
+ 2257955157664["mkgrid.MkGridCard"]
92
+ 2257955147904["mkgrid.MkGrid"]
93
+ 2257955154736["mklist.MkList"]
94
+ 2257955175232["mkbasetable.MkBaseTable"]
95
+ 2257955144976["mktable.MkTable"]
96
+ 2257954973200["mkclasstable.MkClassTable"]
97
+ 2257954940992["mkmoduletable.MkModuleTable"]
98
+ 2257952107760["mkdependencytable.MkDependencyTable"]
99
+ 2257955159616["mkhtmltable.MkHtmlTable"]
100
+ 2257955161568["mktabs.MkTab"]
101
+ 2257955162544["mktabcontainer.MkTabContainer"]
102
+ 2257955163520["mktabcontainer.MkTabbed"]
103
+ 2257952104832["mkreprrawrendered.MkReprRawRendered"]
104
+ 2257955164496["mktabcontainer.MkTabbedBlocks"]
105
+ 2257955171328["mkcritic.MkCritic"]
106
+ 2257955166448["mkannotations.MkAnnotation"]
107
+ 2257955168400["mkannotations.MkAnnotations"]
108
+ 2257955172304["mkdefinitionlist.MkDefinition"]
109
+ 2257952113616["mkconfigsetting.MkConfigSetting"]
110
+ 2257955173280["mkdefinitionlist.MkDefinitionList"]
111
+ 2257954969296["mkshowcase.MkShowcase"]
112
+ 2257954957584["mkspeechbubble.MkSpeechBubble"]
113
+ 2257954949776["mktasklist.MkTask"]
114
+ 2257954941968["mktasklist.MkTaskList"]
115
+ 2257954944896["mkmetadatabadges.MkMetadataBadges"]
116
+ 2257954981984["mkshields.MkShields"]
117
+ 2257954992720["mkinstallguide.MkInstallGuide"]
118
+ 2257991178064["mkcommitconventions.MkCommitConventions"]
119
+ 2257991156592["mkpullrequestguidelines.MkPullRequestGuidelines"]
120
+ 2257952053104["mkdevenvsetup.MkDevEnvSetup"]
121
+ 2257952110688["mkcommentedcode.MkCommentedCode"]
122
+ 2257952114592["mkpluginflow.MkPluginFlow"]
123
+ 2257952116544["mkargparsehelp.MkArgParseHelp"]
124
+ 2257955097152["mknav.MkNav"]
125
+ 2257954996624["mkdoc.MkDoc"]
126
+ 2257994953952["mkblog.MkBlog"]
127
+ 2257955149856["mklink.MkLink"]
128
+ 2257955129360["mkkeys.MkKeys"]
129
+ 2257955139120["_mkdocstrings.MkDocStrings"]
130
+ 2257955131312["mkimage.MkImage"]
131
+ 2257955150832["mkbinaryimage.MkBinaryImage"]
132
+ 2257954964416["mkbadge.MkBadge"]
133
+ 2257955165472["mksnippet.MkSnippet"]
134
+ 2257955169376["mkiframe.MkIFrame"]
135
+ 2257955170352["mkprogressbar.MkProgressBar"]
136
+ 2257954960512["mkcard.MkCard"]
137
+ 2257954976128["mkinclude.MkInclude"]
138
+ 2257952115568["mkcallable.MkCallable"]
139
+ 2257952108736["mkcommandoutput.MkCommandOutput"]
140
+ 2257952117520["mkjinjatemplate.MkJinjaTemplate"]
141
+ 2257944740368 --> 2257944738416
142
+ 2257944740368 --> 2257955065920
143
+ 2257955065920 --> 2257991175136
144
+ 2257955065920 --> 2257991176112
145
+ 2257955065920 --> 2257952121424
146
+ 2257944740368 --> 2257955088368
147
+ 2257955088368 --> 2257955064944
148
+ 2257955064944 --> 2257955089344
149
+ 2257955064944 --> 2257955078608
150
+ 2257955064944 --> 2257955077632
151
+ 2257955064944 --> 2257955160592
152
+ 2257955088368 --> 2257955071776
153
+ 2257955088368 --> 2257955084464
154
+ 2257955088368 --> 2257955086416
155
+ 2257955086416 --> 2257955158640
156
+ 2257955158640 --> 2257954958560
157
+ 2257955086416 --> 2257952071648
158
+ 2257952071648 --> 2257952109712
159
+ 2257955086416 --> 2257952072624
160
+ 2257955086416 --> 2257952105808
161
+ 2257955088368 --> 2257955091296
162
+ 2257955088368 --> 2257955082512
163
+ 2257955088368 --> 2257955101056
164
+ 2257955101056 --> 2257954988816
165
+ 2257954988816 --> 2257954999552
166
+ 2257954988816 --> 2257954994672
167
+ 2257955088368 --> 2257955157664
168
+ 2257955088368 --> 2257955147904
169
+ 2257955088368 --> 2257955154736
170
+ 2257955088368 --> 2257955175232
171
+ 2257955175232 --> 2257955144976
172
+ 2257955144976 --> 2257954973200
173
+ 2257955144976 --> 2257954940992
174
+ 2257955144976 --> 2257952107760
175
+ 2257955175232 --> 2257955159616
176
+ 2257955088368 --> 2257955161568
177
+ 2257955088368 --> 2257955162544
178
+ 2257955162544 --> 2257955163520
179
+ 2257955163520 --> 2257952104832
180
+ 2257955162544 --> 2257955164496
181
+ 2257955088368 --> 2257955171328
182
+ 2257955088368 --> 2257955166448
183
+ 2257955088368 --> 2257955168400
184
+ 2257955088368 --> 2257955172304
185
+ 2257955172304 --> 2257952113616
186
+ 2257955088368 --> 2257955173280
187
+ 2257955088368 --> 2257954969296
188
+ 2257955088368 --> 2257954957584
189
+ 2257955088368 --> 2257954949776
190
+ 2257955088368 --> 2257954941968
191
+ 2257955088368 --> 2257954944896
192
+ 2257955088368 --> 2257954981984
193
+ 2257955088368 --> 2257954992720
194
+ 2257955088368 --> 2257991178064
195
+ 2257955088368 --> 2257991156592
196
+ 2257955088368 --> 2257952053104
197
+ 2257955088368 --> 2257952110688
198
+ 2257955088368 --> 2257952114592
199
+ 2257955088368 --> 2257952116544
200
+ 2257944740368 --> 2257955097152
201
+ 2257955097152 --> 2257954996624
202
+ 2257955097152 --> 2257994953952
203
+ 2257944740368 --> 2257955149856
204
+ 2257944740368 --> 2257955129360
205
+ 2257944740368 --> 2257955139120
206
+ 2257944740368 --> 2257955131312
207
+ 2257955131312 --> 2257955150832
208
+ 2257955131312 --> 2257954964416
209
+ 2257944740368 --> 2257955165472
210
+ 2257944740368 --> 2257955169376
211
+ 2257944740368 --> 2257955170352
212
+ 2257944740368 --> 2257954960512
213
+ 2257944740368 --> 2257954976128
214
+ 2257944740368 --> 2257952115568
215
+ 2257944740368 --> 2257952108736
216
+ 2257944740368 --> 2257952117520
217
+ ```
@@ -0,0 +1,67 @@
1
+ name: Build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ python_version: ['3.11'] # '3.12.0-beta.4'
12
+
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: ${{ matrix.python_version }}
19
+ - name: Setup Graphviz
20
+ uses: ts-graphviz/setup-graphviz@v1
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install hatch
25
+ hatch env create
26
+ - name: Lint and typecheck
27
+ run: |
28
+ hatch run lint-check
29
+ - name: Test
30
+ run: |
31
+ hatch run test-cov-xml
32
+ - uses: codecov/codecov-action@v3
33
+ with:
34
+ token: ${{ secrets.CODECOV_TOKEN }}
35
+ fail_ci_if_error: false
36
+ verbose: true
37
+
38
+ release:
39
+ runs-on: ubuntu-latest
40
+ needs: test
41
+ if: startsWith(github.ref, 'refs/tags/')
42
+
43
+ steps:
44
+ - uses: actions/checkout@v3
45
+ - name: Set up Python
46
+ uses: actions/setup-python@v4
47
+ with:
48
+ python-version: '3.11'
49
+ - name: Install dependencies
50
+ shell: bash
51
+ run: |
52
+ python -m pip install --upgrade pip
53
+ pip install hatch
54
+ - name: Build and publish on PyPI
55
+ env:
56
+ HATCH_INDEX_USER: ${{ secrets.HATCH_INDEX_USER }}
57
+ HATCH_INDEX_AUTH: ${{ secrets.HATCH_INDEX_AUTH }}
58
+ run: |
59
+ hatch build
60
+ hatch publish
61
+ - name: Create release
62
+ uses: ncipollo/release-action@v1
63
+ with:
64
+ draft: true
65
+ body: ${{ github.event.head_commit.message }}
66
+ artifacts: dist/*.whl,dist/*.tar.gz
67
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,60 @@
1
+ name: Build documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ # Allow one concurrent deployment
15
+ concurrency:
16
+ group: "pages"
17
+ cancel-in-progress: true
18
+
19
+ # Default to bash
20
+ defaults:
21
+ run:
22
+ shell: bash
23
+
24
+ jobs:
25
+ build:
26
+
27
+ runs-on: ubuntu-latest
28
+
29
+ steps:
30
+ - uses: actions/checkout@v3
31
+ with:
32
+ fetch-depth: 0
33
+ - name: Set up Python
34
+ uses: actions/setup-python@v4
35
+ with:
36
+ python-version: '3.11'
37
+ - name: Setup Graphviz
38
+ uses: ts-graphviz/setup-graphviz@v1
39
+ - name: Install dependencies
40
+ run: |
41
+ python -m pip install --upgrade pip
42
+ pip install hatch
43
+ hatch env create
44
+ - name: Build
45
+ run: hatch run docs-build-test
46
+ - name: Upload artifact
47
+ uses: actions/upload-pages-artifact@v1
48
+ with:
49
+ path: ./site
50
+
51
+ deploy:
52
+ environment:
53
+ name: github-pages
54
+ url: ${{ steps.deployment.outputs.page_url }}
55
+ runs-on: ubuntu-latest
56
+ needs: build
57
+ steps:
58
+ - name: Deploy to GitHub Pages
59
+ id: deployment
60
+ uses: actions/deploy-pages@v1
@@ -0,0 +1,114 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ .markdown/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ *.sublime-workspace
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ .hatch
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ junit/
53
+ junit.xml
54
+ test.db
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # pyenv
81
+ .python-version
82
+
83
+ # celery beat schedule file
84
+ celerybeat-schedule
85
+
86
+ # SageMath parsed files
87
+ *.sage.py
88
+
89
+ # dotenv
90
+ .env
91
+
92
+ # virtualenv
93
+ .venv
94
+ venv/
95
+ ENV/
96
+
97
+ # Spyder project settings
98
+ .spyderproject
99
+ .spyproject
100
+
101
+ # Rope project settings
102
+ .ropeproject
103
+
104
+ # mkdocs documentation
105
+ /site
106
+
107
+ # mypy
108
+ .mypy_cache/
109
+
110
+ # .vscode
111
+ .vscode/
112
+
113
+ # OS files
114
+ .DS_Store
@@ -0,0 +1,52 @@
1
+ default_language_version:
2
+ python: python3.11
3
+ default_stages: [commit]
4
+ repos:
5
+ - repo: local
6
+ hooks:
7
+ - id: pytest-check
8
+ name: pytest-check
9
+ entry: hatch run test
10
+ language: system
11
+ # stages: [push]
12
+ types: [python]
13
+ pass_filenames: false
14
+ always_run: true
15
+ - repo: https://github.com/pre-commit/pre-commit-hooks
16
+ rev: v4.4.0
17
+ hooks:
18
+ # - id: trailing-whitespace
19
+ # - id: check-ast
20
+ - id: check-case-conflict
21
+ - id: check-docstring-first
22
+ - id: check-merge-conflict
23
+ # - id: check-yaml
24
+ - id: check-toml
25
+ - id: check-json
26
+ - id: detect-private-key
27
+ - id: forbid-new-submodules
28
+ # - id: check-added-large-files
29
+ # https://pre-commit.com/hooks.html
30
+ - repo: https://github.com/psf/black-pre-commit-mirror
31
+ rev: 23.9.1
32
+ hooks:
33
+ - id: black
34
+
35
+ - repo: https://github.com/pre-commit/mirrors-mypy
36
+ rev: v1.5.1
37
+ hooks:
38
+ - id: mypy
39
+ # args: [--ignore-missing-imports]
40
+ additional_dependencies: []
41
+
42
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
43
+ rev: v0.0.291
44
+ hooks:
45
+ - id: ruff
46
+
47
+ - repo: https://github.com/commitizen-tools/commitizen
48
+ rev: 3.10.0
49
+ hooks:
50
+ - id: commitizen
51
+ stages: [commit-msg]
52
+ additional_dependencies: [typing-extensions]
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023, Philipp Temminghoff
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,34 @@
1
+ .PHONY: help clean lint test docs serve release bump
2
+ .DEFAULT_GOAL := help
3
+
4
+ define PRINT_HELP_PYSCRIPT
5
+ import re, sys
6
+
7
+ for line in sys.stdin:
8
+ match = re.match(r"^([a-zA-Z_-]+):.*?## (.*)$$", line)
9
+ if match:
10
+ target, help = match.groups()
11
+ print("%-20s %s" % (target, help))
12
+ endef
13
+ export PRINT_HELP_PYSCRIPT
14
+
15
+ help:
16
+ @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
17
+
18
+ clean: ## remove all build, test, coverage and Python artifacts
19
+ git clean -dfX
20
+
21
+ test: ## run tests
22
+ hatch run test
23
+
24
+ mypy: ## run mypy type checking
25
+ hatch run lint-check
26
+
27
+ docs: ## builds the documentation
28
+ hatch run mkdocs build
29
+
30
+ serve: ## run html server watching file changes in realtime
31
+ hatch run mkdocs serve
32
+
33
+ update: ## update all packages
34
+ hatch run python -m pip --disable-pip-version-check list --outdated --format=json | python -c "import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))" | xargs -n1 hatch run python -m pip install -U
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.1
2
+ Name: mkdocs_mknodes
3
+ Version: 0.0.2
4
+ Summary: Don't write docs. Code them.
5
+ Project-URL: Documentation, https://phil65.github.io/mkdocs_mknodes/
6
+ Project-URL: Source, https://github.com/phil65/mkdocs_mknodes
7
+ Project-URL: Gitter, https://app.gitter.im/#/room/#mknodes:gitter.im
8
+ Author-email: Philipp Temminghoff <philipptemminghoff@gmail.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: docs,docstrings,documentation,framework,internet,markdown
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: Implementation :: CPython
20
+ Classifier: Topic :: Documentation
21
+ Classifier: Topic :: Internet
22
+ Classifier: Topic :: Software Development :: Documentation
23
+ Classifier: Topic :: Software Development :: User Interfaces
24
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
25
+ Requires-Python: >=3.11
26
+ Requires-Dist: coloraide
27
+ Requires-Dist: deepmerge
28
+ Requires-Dist: fsspec
29
+ Requires-Dist: jinja2
30
+ Requires-Dist: mkdocs-literate-nav
31
+ Requires-Dist: mkdocs-material>=9.4
32
+ Requires-Dist: mkdocs>=1.5
33
+ Requires-Dist: mkdocstrings[python]
34
+ Requires-Dist: mknodes
35
+ Requires-Dist: rich
36
+ Requires-Dist: typer
37
+ Description-Content-Type: text/markdown
38
+
39
+ ``` py title='__main__.create_github_index_md' linenums="86" hl_lines="3"
40
+ def create_github_index_md() -> mknodes.MkPage:
41
+ page = mknodes.MkPage("Github index")
42
+ page += mknodes.MkCode.for_object(create_github_index_md)
43
+ page += mknodes.MkHeader("MkNodes", level=1)
44
+ page += mknodes.MkHeader("Don't write docs. Code them.", level=4)
45
+ page += mknodes.MkShields()
46
+ page += mknodes.MkLink(DOC_URL, "Read the completely coded documentation!")
47
+ page += mknodes.MkInstallGuide(header="How to install")
48
+ page += mknodes.MkHeader("All the nodes!")
49
+ page += mknodes.MkClassDiagram(mknodes.MkNode, mode="subclasses", direction="LR")
50
+ return page
51
+
52
+ ```
53
+
54
+ # MkNodes (Mkdocs Plugin)
55
+
56
+ #### Don't write docs. Code them.
57
+
58
+ [![PyPI License](https://img.shields.io/pypi/l/mknodes.svg)](https://pypi.org/project/mknodes/)
59
+ [![Package status](https://img.shields.io/pypi/status/mknodes.svg)](https://pypi.org/project/mknodes/)
60
+ [![Daily downloads](https://img.shields.io/pypi/dd/mknodes.svg)](https://pypi.org/project/mknodes/)
61
+ [![Weekly downloads](https://img.shields.io/pypi/dw/mknodes.svg)](https://pypi.org/project/mknodes/)
62
+ [![Monthly downloads](https://img.shields.io/pypi/dm/mknodes.svg)](https://pypi.org/project/mknodes/)
63
+ [![Distribution format](https://img.shields.io/pypi/format/mknodes.svg)](https://pypi.org/project/mknodes/)
64
+ [![Wheel availability](https://img.shields.io/pypi/wheel/mknodes.svg)](https://pypi.org/project/mknodes/)
65
+ [![Python version](https://img.shields.io/pypi/pyversions/mknodes.svg)](https://pypi.org/project/mknodes/)
66
+ [![Implementation](https://img.shields.io/pypi/implementation/mknodes.svg)](https://pypi.org/project/mknodes/)
67
+ [![Releases](https://img.shields.io/github/downloads/phil65/mknodes/total.svg)](https://github.com/phil65/mknodes/releases)
68
+ [![Github Contributors](https://img.shields.io/github/contributors/phil65/mknodes)](https://github.com/phil65/mknodes/graphs/contributors)
69
+ [![Github Discussions](https://img.shields.io/github/discussions/phil65/mknodes)](https://github.com/phil65/mknodes/discussions)
70
+ [![Github Forks](https://img.shields.io/github/forks/phil65/mknodes)](https://github.com/phil65/mknodes/forks)
71
+ [![Github Issues](https://img.shields.io/github/issues/phil65/mknodes)](https://github.com/phil65/mknodes/issues)
72
+ [![Github Issues](https://img.shields.io/github/issues-pr/phil65/mknodes)](https://github.com/phil65/mknodes/pulls)
73
+ [![Github Watchers](https://img.shields.io/github/watchers/phil65/mknodes)](https://github.com/phil65/mknodes/watchers)
74
+ [![Github Stars](https://img.shields.io/github/stars/phil65/mknodes)](https://github.com/phil65/mknodes/stars)
75
+ [![Github Repository size](https://img.shields.io/github/repo-size/phil65/mknodes)](https://github.com/phil65/mknodes)
76
+ [![Github last commit](https://img.shields.io/github/last-commit/phil65/mknodes)](https://github.com/phil65/mknodes/commits)
77
+ [![Github release date](https://img.shields.io/github/release-date/phil65/mknodes)](https://github.com/phil65/mknodes/releases)
78
+ [![Github language count](https://img.shields.io/github/languages/count/phil65/mknodes)](https://github.com/phil65/mknodes)
79
+ [![Github commits this week](https://img.shields.io/github/commit-activity/w/phil65/mknodes)](https://github.com/phil65/mknodes)
80
+ [![Github commits this month](https://img.shields.io/github/commit-activity/m/phil65/mknodes)](https://github.com/phil65/mknodes)
81
+ [![Github commits this year](https://img.shields.io/github/commit-activity/y/phil65/mknodes)](https://github.com/phil65/mknodes)
82
+ [![Package status](https://codecov.io/gh/phil65/mknodes/branch/main/graph/badge.svg)](https://codecov.io/gh/phil65/mknodes/)
83
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
84
+ [![PyUp](https://pyup.io/repos/github/phil65/mknodes/shield.svg)](https://pyup.io/repos/github/phil65/mknodes/)
85
+
86
+ [Read the completely coded documentation!](https://phil65.github.io/mknodes/)
87
+
88
+ ## How to install
89
+
90
+ ### pip
91
+
92
+ The latest released version is available at the [Python package index](https://pypi.org/project/mknodes).
93
+
94
+ ``` py
95
+ pip install mknodes
96
+ ```