mkdocstrings-matlab 0.3.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- mkdocs_material_matlab/__init__.py +4 -0
- mkdocs_material_matlab/css/style.css +7 -0
- mkdocs_material_matlab/mkdocs_material_matlab.py +20 -0
- mkdocstrings_handlers/matlab/__init__.py +5 -0
- mkdocstrings_handlers/matlab/collect.py +597 -0
- mkdocstrings_handlers/matlab/enums.py +35 -0
- mkdocstrings_handlers/matlab/handler.py +294 -0
- mkdocstrings_handlers/matlab/models.py +560 -0
- mkdocstrings_handlers/matlab/py.typed +0 -0
- mkdocstrings_handlers/matlab/treesitter.py +654 -0
- mkdocstrings_matlab-0.3.0.dist-info/METADATA +82 -0
- mkdocstrings_matlab-0.3.0.dist-info/RECORD +15 -0
- mkdocstrings_matlab-0.3.0.dist-info/WHEEL +4 -0
- mkdocstrings_matlab-0.3.0.dist-info/entry_points.txt +2 -0
- mkdocstrings_matlab-0.3.0.dist-info/licenses/LICENSE +15 -0
@@ -0,0 +1,82 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: mkdocstrings-matlab
|
3
|
+
Version: 0.3.0
|
4
|
+
Summary: A MATLAB handler for mkdocstrings
|
5
|
+
Author-email: Mark Hu <watermarkhu@gmail.com>
|
6
|
+
License: ISC
|
7
|
+
License-File: LICENSE
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
9
|
+
Classifier: Intended Audience :: Developers
|
10
|
+
Classifier: Programming Language :: Python
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
18
|
+
Classifier: Topic :: Documentation
|
19
|
+
Classifier: Topic :: Software Development
|
20
|
+
Classifier: Topic :: Software Development :: Documentation
|
21
|
+
Classifier: Topic :: Utilities
|
22
|
+
Classifier: Typing :: Typed
|
23
|
+
Requires-Python: >=3.10
|
24
|
+
Requires-Dist: charset-normalizer>=3.3.2
|
25
|
+
Requires-Dist: griffe>=1.5.1
|
26
|
+
Requires-Dist: mkdocs>=1.6.0
|
27
|
+
Requires-Dist: mkdocstrings[python]>=0.18
|
28
|
+
Requires-Dist: tree-sitter-matlab>=1.0.2
|
29
|
+
Requires-Dist: tree-sitter>=0.23.2
|
30
|
+
Description-Content-Type: text/markdown
|
31
|
+
|
32
|
+
<h1 align="center">mkdocstrings-matlab</h1>
|
33
|
+
|
34
|
+
<p align="center">A MATLAB handler for <a href="https://github.com/mkdocstrings/mkdocstrings"><i>mkdocstrings</i></a>.</p>
|
35
|
+
|
36
|
+
|
37
|
+
---
|
38
|
+
|
39
|
+
<p align="center"><img src="logo.png"></p>
|
40
|
+
|
41
|
+
The MATLAB handler uses [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) and its [MATLAB parser](https://github.com/acristoffers/tree-sitter-matlab) to collect documentation from MATLAB source code. Via the python bindings the Abstract Syntax Tree (AST) of the source code is traversed to extract useful information. The imported objected are imported as custom [Griffe](https://mkdocstrings.github.io/griffe/) objects and mocked for the [python handler](https://mkdocstrings.github.io/python/).
|
42
|
+
|
43
|
+
## Installation
|
44
|
+
|
45
|
+
You can install this handler by specifying it as a dependency:
|
46
|
+
|
47
|
+
```toml title="pyproject.toml"
|
48
|
+
# PEP 621 dependencies declaration
|
49
|
+
# adapt to your dependencies manager
|
50
|
+
[project]
|
51
|
+
dependencies = [
|
52
|
+
"mkdocstrings-matlab>=0.3",
|
53
|
+
]
|
54
|
+
```
|
55
|
+
|
56
|
+
## Features
|
57
|
+
|
58
|
+
- **Data collection from source code**: collection of the object-tree and the docstrings is done thanks to
|
59
|
+
[Tree-sitter](https://tree-sitter.github.io/tree-sitter/).
|
60
|
+
|
61
|
+
- **Support for argument validation blocks:** Tree-sitter collects your [function and method argument validation](https://mathworks.com/help/matlab/matlab_prog/function-argument-validation-1.html)
|
62
|
+
blocks to display input and output argument types and default values.
|
63
|
+
It is even able to automatically add cross-references o other objects from your API.
|
64
|
+
|
65
|
+
- **Recursive documentation of MATLAB [namespaces](https://mathworks.com/help/matlab/matlab_oop/namespaces.html):**
|
66
|
+
just add `+` to the identifer, and you get the full namespace docs. You don't need to inject documentation for each class, function, and script.
|
67
|
+
|
68
|
+
- **Support for documented properties:** properties definitions followed by a docstring will be recognized in classes.
|
69
|
+
|
70
|
+
- **Multiple docstring-styles support:** common support for Google-style, Numpydoc-style,
|
71
|
+
and Sphinx-style docstrings. See [Griffe's documentation](https://mkdocstrings.github.io/griffe/docstrings/) on docstrings support.
|
72
|
+
|
73
|
+
- **Admonition support in Google docstrings:** blocks like `Note:` or `Warning:` will be transformed
|
74
|
+
to their [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) equivalent.
|
75
|
+
*We do not support nested admonitions in docstrings!*
|
76
|
+
|
77
|
+
- **Every object has a TOC entry:** we render a heading for each object, meaning *MkDocs* picks them into the Table
|
78
|
+
of Contents, which is nicely displayed by the Material theme. Thanks to *mkdocstrings* cross-reference ability,
|
79
|
+
you can reference other objects within your docstrings, with the classic Markdown syntax:
|
80
|
+
`[this object][namespace.subnamespace.object]` or directly with `[namespace.subnamespace.object][]`
|
81
|
+
|
82
|
+
- **Source code display:** *mkdocstrings* can add a collapsible div containing the highlighted source code of the MATLAB object.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
mkdocs_material_matlab/__init__.py,sha256=9pmrwWbkIyr0T7qvADbsz3OR5bB3rWb231e6JSnwA7o,106
|
2
|
+
mkdocs_material_matlab/mkdocs_material_matlab.py,sha256=s7vI1lv6hD8s7kDHWBfYKgN6EcldyUstGYJ45sA-VWY,850
|
3
|
+
mkdocs_material_matlab/css/style.css,sha256=iVTPIKljgvK899jEQylD7yu9yjKfrVE_4GLaITjhk4g,132
|
4
|
+
mkdocstrings_handlers/matlab/__init__.py,sha256=laA2bEP5rxdIWBLmfLiKKu7ChZ_HzCe-VeRvxmUTqww,128
|
5
|
+
mkdocstrings_handlers/matlab/collect.py,sha256=bPQ8e7ENzGA6b_0PGOeZSRoQozwvT7dQLZI_CoglTuk,21815
|
6
|
+
mkdocstrings_handlers/matlab/enums.py,sha256=lr3wLlhPxyBym3O7Rt0cLUZYqPCz6wQ2PYBibLKLTek,982
|
7
|
+
mkdocstrings_handlers/matlab/handler.py,sha256=w_k3jBaBwv3CYxGOg6cELHE1Z8p-nmxPEk-201tjLtE,15367
|
8
|
+
mkdocstrings_handlers/matlab/models.py,sha256=fMDdzrANnsnkYl-Q8QYFgM3OxtnbJwKcKtVFFBKio_c,17363
|
9
|
+
mkdocstrings_handlers/matlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
+
mkdocstrings_handlers/matlab/treesitter.py,sha256=dW4RcSep4A0L505WbAE9PGL2sTqizX7nhXLwQqbJh8Y,21726
|
11
|
+
mkdocstrings_matlab-0.3.0.dist-info/METADATA,sha256=qctHYlZnFKUY3j4C4_JTBO-G-qcG2foYWHpwLFtxUYA,4097
|
12
|
+
mkdocstrings_matlab-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
13
|
+
mkdocstrings_matlab-0.3.0.dist-info/entry_points.txt,sha256=qUZFuB2TKh7KPlg4dR2npfbNgNExw6O6j1vF276PtPw,92
|
14
|
+
mkdocstrings_matlab-0.3.0.dist-info/licenses/LICENSE,sha256=z5Ee0lckFL6K9LhLKftDu0JDl2Uie24Po20IclVk2SI,743
|
15
|
+
mkdocstrings_matlab-0.3.0.dist-info/RECORD,,
|
@@ -0,0 +1,15 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Mark Shui Hu
|
4
|
+
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|