mkdocstrings-matlab 0.2.0__tar.gz → 0.2.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/PKG-INFO +1 -1
  2. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/mkdocs.yml +1 -1
  3. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/pyproject.toml +1 -1
  4. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/handler.py +7 -2
  5. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/models.py +1 -1
  6. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023a/pyproject.toml +2 -2
  7. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023b/pyproject.toml +2 -2
  8. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2024a/pyproject.toml +2 -2
  9. mkdocstrings_matlab-0.2.1/submodules/mkdocstrings-matlab-r2024b/.gitignore +10 -0
  10. mkdocstrings_matlab-0.2.1/submodules/mkdocstrings-matlab-r2024b/LICENSE +21 -0
  11. mkdocstrings_matlab-0.2.1/submodules/mkdocstrings-matlab-r2024b/README.md +4 -0
  12. mkdocstrings_matlab-0.2.1/submodules/mkdocstrings-matlab-r2024b/pyproject.toml +54 -0
  13. mkdocstrings_matlab-0.2.1/submodules/mkdocstrings-matlab-r2024b/src/mkdocstrings_handlers/matlab_engine/__init__.py +8 -0
  14. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/.gitignore +0 -0
  15. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/LICENSE +0 -0
  16. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/README.md +0 -0
  17. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/docs/index.md +0 -0
  18. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/__init__.py +0 -0
  19. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/collections.py +0 -0
  20. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/builtin.m +0 -0
  21. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/class.m +0 -0
  22. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/func.m +0 -0
  23. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/method.m +0 -0
  24. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/namespace.m +0 -0
  25. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/argument.m +0 -0
  26. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/class.m +0 -0
  27. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/func.m +0 -0
  28. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/namespace.m +0 -0
  29. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/property.m +0 -0
  30. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/script.m +0 -0
  31. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/dedent.m +0 -0
  32. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/get_namespace_path.m +0 -0
  33. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/parse_doc.m +0 -0
  34. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/exception.m +0 -0
  35. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/+docstring/resolve.m +0 -0
  36. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/matlab/matlab_startup.m +0 -0
  37. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/parser.py +0 -0
  38. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/py.typed +0 -0
  39. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/src/mkdocstrings_handlers/matlab/resources/grammar.yml +0 -0
  40. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023a/.gitignore +0 -0
  41. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023a/LICENSE +0 -0
  42. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023a/README.md +0 -0
  43. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023a/src/mkdocstrings_handlers/matlab_engine/__init__.py +0 -0
  44. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023b/.gitignore +0 -0
  45. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023b/LICENSE +0 -0
  46. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023b/README.md +0 -0
  47. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2023b/src/mkdocstrings_handlers/matlab_engine/__init__.py +0 -0
  48. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2024a/.gitignore +0 -0
  49. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2024a/LICENSE +0 -0
  50. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2024a/README.md +0 -0
  51. {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.1}/submodules/mkdocstrings-matlab-r2024a/src/mkdocstrings_handlers/matlab_engine/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mkdocstrings-matlab
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Add your description here
5
5
  Author-email: Mark Hu <watermarkhu@gmail.com>
6
6
  License-File: LICENSE
@@ -23,6 +23,6 @@ plugins:
23
23
  # show_root_heading: true
24
24
  # show_docstring_attributes: false
25
25
  matlab:
26
- paths: ["/home/mahu/repositories/github-matlab-test-action/src"]
26
+ paths: ["/home/mahu/repositories/matlab-test-action/src"]
27
27
  options:
28
28
  show_root_heading: true
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mkdocstrings-matlab"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Add your description here"
5
5
  authors = [
6
6
  { name = "Mark Hu", email = "watermarkhu@gmail.com" }
@@ -167,6 +167,10 @@ class MatlabHandler(BaseHandler):
167
167
 
168
168
  if isinstance(ast["superclasses"], str):
169
169
  ast["superclasses"] = [ast["superclasses"]]
170
+ if isinstance(ast["properties"], dict):
171
+ ast["properties"] = [ast["properties"]]
172
+ if isinstance(ast["methods"], dict):
173
+ ast["methods"] = [ast["methods"]]
170
174
 
171
175
  if config["show_inheritance_diagram"]:
172
176
  # Check if class is builtin and skip superclasses if option is not set
@@ -341,7 +345,7 @@ class MatlabHandler(BaseHandler):
341
345
  elif ast["docstring"]:
342
346
  docstring = Docstring(ast["docstring"], parser=config["docstring_style"])
343
347
  else:
344
- docstring
348
+ docstring = None
345
349
 
346
350
  model.docstring = docstring
347
351
 
@@ -390,7 +394,8 @@ class MatlabHandler(BaseHandler):
390
394
  if config["merge_init_into_class"] and model.name in model.members:
391
395
  constructor = model.members.pop(model.name)
392
396
  model.members["__init__"] = constructor
393
- if constructor.docstring.value == model.docstring.value:
397
+
398
+ if getattr(constructor.docstring, 'value', '') == getattr(model.docstring, 'value', ''):
394
399
  model.docstring = None
395
400
 
396
401
  self.models[model.canonical_path] = model
@@ -62,7 +62,7 @@ class Class(CanonicalPathMixin, PathMixin, GriffeClass):
62
62
  for block in self._textmate.children
63
63
  if block.token == "meta.methods.matlab"
64
64
  ]:
65
- for method in block.children:
65
+ for method in [c for c in block.children if c.token == "meta.function.matlab"]:
66
66
  declaration = next(
67
67
  item
68
68
  for item in method.children
@@ -35,8 +35,8 @@ classifiers = [
35
35
 
36
36
  [project.urls]
37
37
  Documentation = "http://watermarkhu.nl/mkdocstrings-matlab/"
38
- Repository = "https://github.com/watermarkhu/mkdocstrings-matlab-r2023a"
39
- Issues = "https://github.com/watermarkhu/mkdocstrings-matla-r2023a/issues"
38
+ Repository = "https://github.com/watermarkhu/mkdocstrings-matlab"
39
+ Issues = "https://github.com/watermarkhu/mkdocstrings-matlab/issues"
40
40
 
41
41
 
42
42
  [build-system]
@@ -35,8 +35,8 @@ classifiers = [
35
35
 
36
36
  [project.urls]
37
37
  Documentation = "http://watermarkhu.nl/mkdocstrings-matlab/"
38
- Repository = "https://github.com/watermarkhu/mkdocstrings-matlab-r2023b"
39
- Issues = "https://github.com/watermarkhu/mkdocstrings-matla-r2023b/issues"
38
+ Repository = "https://github.com/watermarkhu/mkdocstrings-matlab"
39
+ Issues = "https://github.com/watermarkhu/mkdocstrings-matlab/issues"
40
40
 
41
41
  [build-system]
42
42
  requires = ["hatchling"]
@@ -35,8 +35,8 @@ classifiers = [
35
35
 
36
36
  [project.urls]
37
37
  Documentation = "http://watermarkhu.nl/mkdocstrings-matlab/"
38
- Repository = "https://github.com/watermarkhu/mkdocstrings-matlab-r2024a"
39
- Issues = "https://github.com/watermarkhu/mkdocstrings-matla-r2024a/issues"
38
+ Repository = "https://github.com/watermarkhu/mkdocstrings-matlab"
39
+ Issues = "https://github.com/watermarkhu/mkdocstrings-matlab/issues"
40
40
 
41
41
  [build-system]
42
42
  requires = ["hatchling"]
@@ -0,0 +1,10 @@
1
+ # python generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # venv
10
+ .venv
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Mark Shui Hu
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.
@@ -0,0 +1,4 @@
1
+ # mkdocstrings-matlab-r2024b
2
+
3
+ Submodule for [mkdocstrings-matlab](https://pypi.org/project/mkdocstrings-matlab/) required for compatiblity with MATLAB R2024b.
4
+
@@ -0,0 +1,54 @@
1
+ [project]
2
+ name = "mkdocstrings-matlab-r2024b"
3
+ version = "0.1.2"
4
+ description = "Add your description here"
5
+ authors = [
6
+ { name = "Mark Shui Hu", email = "watermarkhu@gmail.com" }
7
+ ]
8
+ dependencies = [
9
+ "matlabengine==24.2.1",
10
+ ]
11
+ readme = "README.md"
12
+ requires-python = ">=3.9,<3.13"
13
+ keywords = ["mkdocs", "mkdocstrings", "documentation", "docstring", "matlab"]
14
+ license = {file = "LICENSE"}
15
+ classifiers = [
16
+ # How mature is this project? Common values are
17
+ # 3 - Alpha
18
+ # 4 - Beta
19
+ # 5 - Production/Stable
20
+ "Development Status :: 3 - Alpha",
21
+
22
+ # Indicate who your project is intended for
23
+ "Intended Audience :: Developers",
24
+ "Topic :: Software Development :: Documentation",
25
+
26
+ # Pick your license as you wish (see also "license" above)
27
+ "License :: OSI Approved :: MIT License",
28
+
29
+ # Specify the Python versions you support here.
30
+ "Programming Language :: Python :: 3",
31
+ "Programming Language :: Python :: 3.9",
32
+ "Programming Language :: Python :: 3.10",
33
+ "Programming Language :: Python :: 3.11",
34
+ "Programming Language :: Python :: 3.12",
35
+ ]
36
+
37
+ [project.urls]
38
+ Documentation = "http://watermarkhu.nl/mkdocstrings-matlab/"
39
+ Repository = "https://github.com/watermarkhu/mkdocstrings-matlab"
40
+ Issues = "https://github.com/watermarkhu/mkdocstrings-matlab/issues"
41
+
42
+ [build-system]
43
+ requires = ["hatchling"]
44
+ build-backend = "hatchling.build"
45
+
46
+ [tool.rye]
47
+ managed = true
48
+ dev-dependencies = []
49
+
50
+ [tool.hatch.metadata]
51
+ allow-direct-references = true
52
+
53
+ [tool.hatch.build.targets.wheel]
54
+ packages = ["src/mkdocstrings_handlers"]
@@ -0,0 +1,8 @@
1
+ import matlab.engine
2
+ from matlab.engine import MatlabExecutionError
3
+
4
+
5
+ __all__ = ["MatlabEngine", "MatlabExecutionError"]
6
+
7
+
8
+ MatlabEngine = matlab.engine.start_matlab