mkdocstrings-matlab 0.9.7__py3-none-any.whl → 1.0.0__py3-none-any.whl

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 (45) hide show
  1. mkdocstrings_handlers/matlab/__init__.py +26 -3
  2. mkdocstrings_handlers/matlab/config.py +885 -0
  3. mkdocstrings_handlers/matlab/handler.py +155 -296
  4. mkdocstrings_handlers/matlab/logger.py +111 -0
  5. mkdocstrings_handlers/matlab/rendering.py +818 -0
  6. mkdocstrings_handlers/matlab/templates/material/attributes.html.jinja +25 -0
  7. mkdocstrings_handlers/matlab/templates/material/backlinks.html.jinja +17 -0
  8. mkdocstrings_handlers/matlab/templates/material/children.html.jinja +70 -62
  9. mkdocstrings_handlers/matlab/templates/material/class.html.jinja +236 -0
  10. mkdocstrings_handlers/matlab/templates/material/docstring/admonition.html.jinja +20 -0
  11. mkdocstrings_handlers/matlab/templates/material/docstring/classes.html.jinja +85 -0
  12. mkdocstrings_handlers/matlab/templates/material/docstring/examples.html.jinja +27 -0
  13. mkdocstrings_handlers/matlab/templates/material/docstring/functions.html.jinja +91 -0
  14. mkdocstrings_handlers/matlab/templates/material/docstring/input_arguments.html.jinja +171 -0
  15. mkdocstrings_handlers/matlab/templates/material/docstring/name_value_arguments.html.jinja +166 -0
  16. mkdocstrings_handlers/matlab/templates/material/docstring/namespaces.html.jinja +5 -6
  17. mkdocstrings_handlers/matlab/templates/material/docstring/output_arguments.html.jinja +152 -0
  18. mkdocstrings_handlers/matlab/templates/material/docstring/properties.html.jinja +25 -26
  19. mkdocstrings_handlers/matlab/templates/material/docstring.html.jinja +53 -0
  20. mkdocstrings_handlers/matlab/templates/material/expression.html.jinja +55 -0
  21. mkdocstrings_handlers/matlab/templates/material/folder.html.jinja +31 -39
  22. mkdocstrings_handlers/matlab/templates/material/function.html.jinja +148 -0
  23. mkdocstrings_handlers/matlab/templates/material/language.html.jinja +18 -0
  24. mkdocstrings_handlers/matlab/templates/material/languages/en.html.jinja +38 -0
  25. mkdocstrings_handlers/matlab/templates/material/languages/ja.html.jinja +38 -0
  26. mkdocstrings_handlers/matlab/templates/material/languages/zh.html.jinja +38 -0
  27. mkdocstrings_handlers/matlab/templates/material/namespace.html.jinja +32 -38
  28. mkdocstrings_handlers/matlab/templates/material/property.html.jinja +39 -35
  29. mkdocstrings_handlers/matlab/templates/material/script.html.jinja +3 -25
  30. mkdocstrings_handlers/matlab/templates/material/signature.html.jinja +105 -0
  31. mkdocstrings_handlers/matlab/templates/material/style.css +179 -4
  32. mkdocstrings_handlers/matlab/templates/material/summary/classes.html.jinja +25 -0
  33. mkdocstrings_handlers/matlab/templates/material/summary/functions.html.jinja +25 -0
  34. mkdocstrings_handlers/matlab/templates/material/summary/namespaces.html.jinja +17 -13
  35. mkdocstrings_handlers/matlab/templates/material/summary/properties.html.jinja +17 -13
  36. mkdocstrings_handlers/matlab/templates/material/summary.html.jinja +6 -6
  37. {mkdocstrings_matlab-0.9.7.dist-info → mkdocstrings_matlab-1.0.0.dist-info}/METADATA +17 -19
  38. mkdocstrings_matlab-1.0.0.dist-info/RECORD +41 -0
  39. mkdocstrings_handlers/matlab/collect.py +0 -783
  40. mkdocstrings_handlers/matlab/enums.py +0 -54
  41. mkdocstrings_handlers/matlab/models.py +0 -633
  42. mkdocstrings_handlers/matlab/treesitter.py +0 -707
  43. mkdocstrings_matlab-0.9.7.dist-info/RECORD +0 -22
  44. {mkdocstrings_matlab-0.9.7.dist-info → mkdocstrings_matlab-1.0.0.dist-info}/WHEEL +0 -0
  45. {mkdocstrings_matlab-0.9.7.dist-info → mkdocstrings_matlab-1.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,25 @@
1
+ {#- Summary of functions/methods. -#}
2
+
3
+ {% block logs scoped %}
4
+ {#- Logging block.
5
+
6
+ This block can be used to log debug messages, deprecation messages, warnings, etc.
7
+ -#}
8
+ {% endblock logs %}
9
+
10
+ {% if not obj.docstring.parsed | selectattr("kind.value", "eq", "functions") | list %}
11
+ {% with section = obj.functions
12
+ |filter_objects(
13
+ filters=config.filters,
14
+ members_list=members_list,
15
+ inherited_members=config.inherited_members,
16
+ private_members=config.private_members,
17
+ hidden_members=config.hidden_members,
18
+ keep_no_docstrings=config.show_if_no_docstring,
19
+ )
20
+ |order_members(config.members_order, members_list)
21
+ |as_functions_section(check_public=not members_list)
22
+ %}
23
+ {% if section %}{% include "docstring/functions.html.jinja" with context %}{% endif %}
24
+ {% endwith %}
25
+ {% endif %}
@@ -2,20 +2,24 @@
2
2
 
3
3
  {% block logs scoped %}
4
4
  {#- Logging block.
5
-
5
+
6
6
  This block can be used to log debug messages, deprecation messages, warnings, etc.
7
7
  -#}
8
8
  {% endblock logs %}
9
9
 
10
- {% with section = obj.modules
11
- |filter_objects(
12
- filters=config.filters,
13
- members_list=members_list,
14
- inherited_members=config.inherited_members,
15
- keep_no_docstrings=config.show_if_no_docstring,
16
- )
17
- |order_members(config.members_order.alphabetical, members_list)
18
- |as_modules_section(check_public=not members_list)
19
- %}
20
- {% if section %}{% include "docstring/namespaces"|get_template with context %}{% endif %}
21
- {% endwith %}
10
+ {% if not obj.docstring.parsed | selectattr("kind.value", "eq", "modules") | list %}
11
+ {% with section = obj.modules
12
+ |filter_objects(
13
+ filters=config.filters,
14
+ members_list=members_list,
15
+ inherited_members=config.inherited_members,
16
+ private_members=config.private_members,
17
+ hidden_members=config.hidden_members,
18
+ keep_no_docstrings=config.show_if_no_docstring,
19
+ )
20
+ |order_members("alphabetical", members_list)
21
+ |as_namespaces_section(check_public=not members_list)
22
+ %}
23
+ {% if section %}{% include "docstring/namespaces.html.jinja" with context %}{% endif %}
24
+ {% endwith %}
25
+ {% endif %}
@@ -2,20 +2,24 @@
2
2
 
3
3
  {% block logs scoped %}
4
4
  {#- Logging block.
5
-
5
+
6
6
  This block can be used to log debug messages, deprecation messages, warnings, etc.
7
7
  -#}
8
8
  {% endblock logs %}
9
9
 
10
- {% with section = obj.attributes
11
- |filter_objects(
12
- filters=config.filters,
13
- members_list=members_list,
14
- inherited_members=config.inherited_members,
15
- keep_no_docstrings=config.show_if_no_docstring,
16
- )
17
- |order_members(config.members_order, members_list)
18
- |as_attributes_section(check_public=not members_list)
19
- %}
20
- {% if section %}{% include "docstring/properties"|get_template with context %}{% endif %}
21
- {% endwith %}
10
+ {% if not obj.docstring.parsed | selectattr("kind.value", "eq", "properties") | list %}
11
+ {% with section = obj.properties
12
+ |filter_objects(
13
+ filters=config.filters,
14
+ members_list=members_list,
15
+ inherited_members=config.inherited_members,
16
+ private_members=config.private_members,
17
+ hidden_members=config.hidden_members,
18
+ keep_no_docstrings=config.show_if_no_docstring,
19
+ )
20
+ |order_members(config.members_order, members_list)
21
+ |as_properties_section(check_public=not members_list)
22
+ %}
23
+ {% if section %}{% include "docstring/properties.html.jinja" with context %}{% endif %}
24
+ {% endwith %}
25
+ {% endif %}
@@ -2,25 +2,25 @@
2
2
 
3
3
  {% block logs scoped %}
4
4
  {#- Logging block.
5
-
5
+
6
6
  This block can be used to log debug messages, deprecation messages, warnings, etc.
7
7
  -#}
8
8
  {% endblock logs %}
9
9
 
10
10
  {% with members_list = config.members if root_members else None %}
11
11
  {% if config.summary.modules %}
12
- {% include "summary/namespaces"|get_template with context %}
12
+ {% include "summary/namespaces.html.jinja" with context %}
13
13
  {% endif %}
14
14
 
15
15
  {% if config.summary.classes %}
16
- {% include "summary/classes"|get_template with context %}
16
+ {% include "summary/classes.html.jinja" with context %}
17
17
  {% endif %}
18
18
 
19
19
  {% if config.summary.functions %}
20
- {% include "summary/functions"|get_template with context %}
20
+ {% include "summary/functions.html.jinja" with context %}
21
21
  {% endif %}
22
22
 
23
- {% if config.summary.attributes %}
24
- {% include "summary/properties"|get_template with context %}
23
+ {% if config.summary.properties %}
24
+ {% include "summary/properties.html.jinja" with context %}
25
25
  {% endif %}
26
26
  {% endwith %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-matlab
3
- Version: 0.9.7
3
+ Version: 1.0.0
4
4
  Summary: A MATLAB handler for mkdocstrings
5
5
  Author-email: Mark Hu <watermarkhu@gmail.com>
6
6
  License: MIT
@@ -14,18 +14,18 @@ Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
- Classifier: Programming Language :: Python :: 3.14
18
17
  Classifier: Topic :: Documentation
19
18
  Classifier: Topic :: Software Development
20
19
  Classifier: Topic :: Software Development :: Documentation
21
20
  Classifier: Topic :: Utilities
22
21
  Classifier: Typing :: Typed
23
- Requires-Python: >=3.10
24
- Requires-Dist: charset-normalizer==3.4.1
25
- Requires-Dist: mkdocstrings-python==1.13.0
26
- Requires-Dist: mkdocstrings==0.28.0
27
- Requires-Dist: tree-sitter-matlab==1.0.4
28
- Requires-Dist: tree-sitter==0.24.0
22
+ Requires-Python: <3.14,>=3.10
23
+ Requires-Dist: charset-normalizer~=3.4
24
+ Requires-Dist: maxx~=0.2.3
25
+ Requires-Dist: mkdocs-autorefs~=1.4
26
+ Requires-Dist: mkdocstrings~=0.29
27
+ Requires-Dist: tree-sitter
28
+ Requires-Dist: typing-extensions>=4.0; python_version < '3.11'
29
29
  Description-Content-Type: text/markdown
30
30
 
31
31
  <!-- --8<-- [start:header] -->
@@ -36,7 +36,7 @@ Description-Content-Type: text/markdown
36
36
 
37
37
  <p align="center"><img width=300px src="logo.svg"></p>
38
38
 
39
- [![qualify](https://github.com/watermarkhu/mkdocstrings-matlab/actions/workflows/qualify.yaml/badge.svg)](https://github.com/watermarkhu/mkdocstrings-matlab/actions/workflows/qualify.yaml)
39
+ [![Qualify](https://github.com/watermarkhu/mkdocstrings-matlab/actions/workflows/qualify.yaml/badge.svg)](https://github.com/watermarkhu/mkdocstrings-matlab/actions/workflows/qualify.yaml)
40
40
  [![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://watermarkhu.nl/mkdocstrings-matlab)
41
41
  [![pypi version](https://img.shields.io/pypi/v/mkdocstrings-matlab.svg)](https://pypi.org/project/mkdocstrings-matlab/)
42
42
 
@@ -59,30 +59,28 @@ dependencies = [
59
59
 
60
60
  ## Features
61
61
 
62
- - **Data collection from source code**: collection of the object-tree and the docstrings is done thanks to
62
+ - 🤖 **Data collection from source code**: collection of the object-tree and the docstrings is done thanks to
63
63
  [Tree-sitter](https://tree-sitter.github.io/tree-sitter/).
64
64
 
65
- - **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)
65
+ - **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)
66
66
  blocks to display input and output argument types and default values.
67
- It is even able to automatically add cross-references to other objects from your API.
67
+ It is even able to automatically add cross-references to other objects from your API, and links to MathWorks documentation are generated for MATLAB builtin classes.
68
68
 
69
- - **Recursive documentation of MATLAB [namespaces](https://mathworks.com/help/matlab/matlab_oop/namespaces.html) and folders:**
69
+ - 🔁 **Recursive documentation of MATLAB [namespaces](https://mathworks.com/help/matlab/matlab_oop/namespaces.html) and folders:**
70
70
  just add `+` to the identifer for namespaces or the relative path for folder, and you get documentation for the entire directory. You don't need to inject documentation for each class, function, and script. Additionaly, the directory documentation will be either extracted from the `Contents.m` or the `readme.md` file at the root of the namespace or folder.
71
71
 
72
- - **Support for documented properties:** properties definitions followed by a docstring will be recognized in classes.
73
-
74
- - **Multiple docstring-styles support:** common support for Google-style, Numpydoc-style,
72
+ - 📄 **Multiple docstring-styles support:** common support for Google-style, Numpydoc-style,
75
73
  and Sphinx-style docstrings. See [Griffe's documentation](https://mkdocstrings.github.io/griffe/docstrings/) on docstrings support.
76
74
 
77
- - **Admonition support in Google docstrings:** blocks like `Note:` or `Warning:` will be transformed
75
+ - ⚠️ **Admonition support in Google docstrings:** blocks like `Note:` or `Warning:` will be transformed
78
76
  to their [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) equivalent.
79
77
  *We do not support nested admonitions in docstrings!*
80
78
 
81
- - **Every object has a TOC entry:** we render a heading for each object, meaning *MkDocs* picks them into the Table
79
+ - 🔗 **Every object has a TOC entry:** we render a heading for each object, meaning *MkDocs* picks them into the Table
82
80
  of Contents, which is nicely displayed by the Material theme. Thanks to *mkdocstrings* cross-reference ability,
83
81
  you can reference other objects within your docstrings, with the classic Markdown syntax:
84
82
  `[this object][namespace.subnamespace.object]` or directly with `[namespace.subnamespace.object][]`
85
83
 
86
- - **Source code display:** *mkdocstrings* can add a collapsible div containing the highlighted source code of the MATLAB object.
84
+ - 📺 **Source code display:** *mkdocstrings* can add a collapsible div containing the highlighted source code of the MATLAB object.
87
85
 
88
86
  <!-- --8<-- [end:footer] -->
@@ -0,0 +1,41 @@
1
+ mkdocstrings_handlers/matlab/__init__.py,sha256=_E7Q8fDJPmdKreDkw57ZNr2jwY7eoGCo6ZequXpXMbc,1703
2
+ mkdocstrings_handlers/matlab/config.py,sha256=yuoB62JOm4vW5uJYd9mqvwIhtfmgSD34CMccc-9aEEc,26724
3
+ mkdocstrings_handlers/matlab/handler.py,sha256=gD0ogRqzOlZAn_iv1E0xFflFj_tUmQcWUeWLPlp1RxI,9803
4
+ mkdocstrings_handlers/matlab/logger.py,sha256=96hRpwOVyvEF0e9f8rvXnNBSBAuHEvM5a6bJNN8hjRo,3298
5
+ mkdocstrings_handlers/matlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ mkdocstrings_handlers/matlab/rendering.py,sha256=G35V7acGZ6Kw6-BnR4nU0k0EJqpmTr6sBVb0h-cet1s,25843
7
+ mkdocstrings_handlers/matlab/templates/material/attributes.html.jinja,sha256=3Wv9tRkBASmxW3NGdAw9V8mc7G6hc1pDIKmVQztlFJk,818
8
+ mkdocstrings_handlers/matlab/templates/material/backlinks.html.jinja,sha256=FFrvIa-KH-DhT1cpc9HL0ecShR2gUVGs3VT9c1q88z8,467
9
+ mkdocstrings_handlers/matlab/templates/material/children.html.jinja,sha256=gWV77R1BSkVlbQdY_VB9wrGSBY30bcm23skPTfOW1Fs,7517
10
+ mkdocstrings_handlers/matlab/templates/material/class.html.jinja,sha256=vcTCQ9Q5WRLiT6t8mMKopGSQCfmJpnI678kCBxNWmak,9706
11
+ mkdocstrings_handlers/matlab/templates/material/docstring.html.jinja,sha256=lpdQelVsBwBi0jpO1xCqX-59SmFZ7N269JCNhiae6Pc,2666
12
+ mkdocstrings_handlers/matlab/templates/material/expression.html.jinja,sha256=3srDE2lRULPYAo7PFvy0tMT-2FKo2r6yE8Dvtui1HMI,1921
13
+ mkdocstrings_handlers/matlab/templates/material/folder.html.jinja,sha256=wdr9Mte9cFy_dKbpCnWN2UPreZEZo5EHG23bEHwMd9M,4004
14
+ mkdocstrings_handlers/matlab/templates/material/function.html.jinja,sha256=xJ6E06q9vxHaOxK2cRzP1DvoWqWOCO1NIME7j64dsf8,5659
15
+ mkdocstrings_handlers/matlab/templates/material/language.html.jinja,sha256=7gyknTiapqCM8TjUHdXkQgZMmYwcuy6Ze0pkntE7g8s,617
16
+ mkdocstrings_handlers/matlab/templates/material/namespace.html.jinja,sha256=oS8Hiy_BWRRw-Xf-r3Mvi7H3egR7YlKms8bIHk_ocw0,4107
17
+ mkdocstrings_handlers/matlab/templates/material/property.html.jinja,sha256=qS3WyTyhMH5c40TukESjVRirYybGoyhNys4kECegR3I,4579
18
+ mkdocstrings_handlers/matlab/templates/material/script.html.jinja,sha256=doIFI-HiOAqBmSP3RhUsHlE-Djk2xE-MrModxWLM-VQ,4040
19
+ mkdocstrings_handlers/matlab/templates/material/signature.html.jinja,sha256=2J0XcBlTEGbC-UKCqoMbVmstAKMgszzGyZAIovhDSW0,3946
20
+ mkdocstrings_handlers/matlab/templates/material/style.css,sha256=UgaVpWNzrTNzt_19wH0ryVAhs1GJ5eYK4JKJMHT4h2k,5083
21
+ mkdocstrings_handlers/matlab/templates/material/summary.html.jinja,sha256=NgPQG1FeujVPJc6ePB1lRx7ovMuHqPkkSDVYPXoDWmA,725
22
+ mkdocstrings_handlers/matlab/templates/material/docstring/admonition.html.jinja,sha256=VFwImgb1toxkjWqyhTNFQbyYE3d11yXI___3vpIu2u0,687
23
+ mkdocstrings_handlers/matlab/templates/material/docstring/classes.html.jinja,sha256=ZpIs-E6_GsmeLO4KQrZCMRlvvxMBTsAxV-Yvv2n6Ess,3152
24
+ mkdocstrings_handlers/matlab/templates/material/docstring/examples.html.jinja,sha256=Va6SCByxXE2KhJGSoUiPxkP-FF9tkoec5DA7ztudscY,967
25
+ mkdocstrings_handlers/matlab/templates/material/docstring/functions.html.jinja,sha256=0juza6YJrZo6PA1OUrVedpS8M2FyLzkiwnofQp0gJxo,3691
26
+ mkdocstrings_handlers/matlab/templates/material/docstring/input_arguments.html.jinja,sha256=UhN8_KJN5dqYTwEUUuWpIGhMAafLTtf97w-fPcVecWc,7008
27
+ mkdocstrings_handlers/matlab/templates/material/docstring/name_value_arguments.html.jinja,sha256=Sz3UmyEwtSMI6BTCBlRWMk0rOKtGuPiSvNgjq_xISYg,6745
28
+ mkdocstrings_handlers/matlab/templates/material/docstring/namespaces.html.jinja,sha256=82Xl1k3ktbONDX1ueMb9TZcKMVBV1S3Vl20ggcBtF2M,3184
29
+ mkdocstrings_handlers/matlab/templates/material/docstring/output_arguments.html.jinja,sha256=VNY2dxduUQHYERWJoHUC3UjwsRAQ5NgL59DSNJg_lOY,6103
30
+ mkdocstrings_handlers/matlab/templates/material/docstring/properties.html.jinja,sha256=72Lt32w58-NsbhwmwGxIOP7nuflXf2pYD052UW0LfQE,4157
31
+ mkdocstrings_handlers/matlab/templates/material/languages/en.html.jinja,sha256=Oen9OTX26S-RfcGYkRQr-FVoIYo1jWpK47UB_47l6S0,1042
32
+ mkdocstrings_handlers/matlab/templates/material/languages/ja.html.jinja,sha256=Urtwz_zgo4ij3SkThxuaCS3x0eLqD0ScejocX-wgWVs,1131
33
+ mkdocstrings_handlers/matlab/templates/material/languages/zh.html.jinja,sha256=qV2S8ikiE1C3TBqwRvKGvAnNtWGqDLn9j_NCOmFi95E,999
34
+ mkdocstrings_handlers/matlab/templates/material/summary/classes.html.jinja,sha256=JuPeZVFHUF398Dw_E-HWoDKlCGFgj52B4W2YJosU4pA,842
35
+ mkdocstrings_handlers/matlab/templates/material/summary/functions.html.jinja,sha256=f19-RvEkHZO4VegiQApq71nAEA27RKwQW3S2NMmKrW4,860
36
+ mkdocstrings_handlers/matlab/templates/material/summary/namespaces.html.jinja,sha256=J0aPYlktc5RY3Gax6GCZDxT5qgFDB5b3eqZZXfZOHxU,845
37
+ mkdocstrings_handlers/matlab/templates/material/summary/properties.html.jinja,sha256=0wQeDtZzfLSZPHJzLG_MVzre1NSyoSHowTwYzk0JX1c,857
38
+ mkdocstrings_matlab-1.0.0.dist-info/METADATA,sha256=bMgRu5xGL1zoOsJJyOBLzIYA7FpROlPmcO0jV8SF2dU,4716
39
+ mkdocstrings_matlab-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
40
+ mkdocstrings_matlab-1.0.0.dist-info/licenses/LICENSE,sha256=TZQpwBuA3KLH56--XDAY2Qwo9gGdxeTITYhMOylmYhg,743
41
+ mkdocstrings_matlab-1.0.0.dist-info/RECORD,,