mkdocstrings-matlab 0.2.0__tar.gz → 0.2.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/PKG-INFO +1 -1
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/mkdocs.yml +1 -1
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/pyproject.toml +1 -1
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/handler.py +7 -2
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/class.m +1 -3
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/models.py +1 -1
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023a/pyproject.toml +2 -2
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023b/pyproject.toml +2 -2
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2024a/pyproject.toml +2 -2
- mkdocstrings_matlab-0.2.2/submodules/mkdocstrings-matlab-r2024b/.gitignore +10 -0
- mkdocstrings_matlab-0.2.2/submodules/mkdocstrings-matlab-r2024b/LICENSE +21 -0
- mkdocstrings_matlab-0.2.2/submodules/mkdocstrings-matlab-r2024b/README.md +4 -0
- mkdocstrings_matlab-0.2.2/submodules/mkdocstrings-matlab-r2024b/pyproject.toml +54 -0
- mkdocstrings_matlab-0.2.2/submodules/mkdocstrings-matlab-r2024b/src/mkdocstrings_handlers/matlab_engine/__init__.py +8 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/.gitignore +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/LICENSE +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/README.md +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/docs/index.md +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/__init__.py +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/collections.py +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/builtin.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/class.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/func.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/method.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/namespace.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/argument.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/func.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/namespace.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/property.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/script.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/dedent.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/get_namespace_path.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/parse_doc.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/exception.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/resolve.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/matlab/matlab_startup.m +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/parser.py +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/py.typed +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/resources/grammar.yml +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023a/.gitignore +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023a/LICENSE +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023a/README.md +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023a/src/mkdocstrings_handlers/matlab_engine/__init__.py +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023b/.gitignore +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023b/LICENSE +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023b/README.md +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2023b/src/mkdocstrings_handlers/matlab_engine/__init__.py +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2024a/.gitignore +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2024a/LICENSE +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2024a/README.md +0 -0
- {mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/submodules/mkdocstrings-matlab-r2024a/src/mkdocstrings_handlers/matlab_engine/__init__.py +0 -0
{mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/handler.py
RENAMED
@@ -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
|
-
|
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
|
@@ -13,6 +13,7 @@ function data = class(object, opts)
|
|
13
13
|
data.sealed = object.Sealed;
|
14
14
|
data.abstract = object.Abstract;
|
15
15
|
data.enumeration = object.Enumeration;
|
16
|
+
data.properties = arrayfun(@(prop) docstring.metadata.property(prop), object.PropertyList);
|
16
17
|
data.superclasses = arrayfun(@(o) string(o.Name), object.SuperclassList);
|
17
18
|
data.handle = object.HandleCompatible;
|
18
19
|
data.aliases = object.Aliases;
|
@@ -43,9 +44,6 @@ function data = class(object, opts)
|
|
43
44
|
end
|
44
45
|
|
45
46
|
numProp = numel(object.PropertyList);
|
46
|
-
for iProp = numProp:-1:1
|
47
|
-
data.properties(iProp) = docstring.metadata.property(object.PropertyList(iProp));
|
48
|
-
end
|
49
47
|
|
50
48
|
nameparts = split(object.Name, '.');
|
51
49
|
data.constructor = any(strcmp(nameparts(end), [data.methods.name]));
|
{mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/models.py
RENAMED
@@ -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
|
39
|
-
Issues = "https://github.com/watermarkhu/mkdocstrings-
|
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
|
39
|
-
Issues = "https://github.com/watermarkhu/mkdocstrings-
|
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
|
39
|
-
Issues = "https://github.com/watermarkhu/mkdocstrings-
|
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,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,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"]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/parser.py
RENAMED
File without changes
|
{mkdocstrings_matlab-0.2.0 → mkdocstrings_matlab-0.2.2}/src/mkdocstrings_handlers/matlab/py.typed
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|