mkdocstrings-matlab 0.1.0__tar.gz → 0.1.2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/PKG-INFO +1 -1
  2. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/pyproject.toml +1 -1
  3. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/handler.py +114 -76
  4. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/argument.m +13 -4
  5. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/class.m +6 -2
  6. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/property.m +12 -3
  7. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/parse_doc.m +2 -2
  8. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/models.py +37 -13
  9. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2023b/.gitignore +10 -0
  10. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2023b/README.md +3 -0
  11. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2023b/pyproject.toml +27 -0
  12. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2023b/src/mkdocstrings_handlers/matlab_engine/__init__.py +8 -0
  13. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2024a/.gitignore +10 -0
  14. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2024a/README.md +3 -0
  15. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2024a/pyproject.toml +26 -0
  16. mkdocstrings_matlab-0.1.2/submodules/mkdocstrings-matlab-r2024a/src/mkdocstrings_handlers/matlab_engine/__init__.py +8 -0
  17. mkdocstrings_matlab-0.1.0/debug.py +0 -17
  18. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/.gitignore +0 -0
  19. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/LICENSE +0 -0
  20. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/README.md +0 -0
  21. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/docs/index.md +0 -0
  22. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/mkdocs.yml +0 -0
  23. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/__init__.py +0 -0
  24. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/builtin.m +0 -0
  25. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/class.m +0 -0
  26. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/func.m +0 -0
  27. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/method.m +0 -0
  28. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+case/namespace.m +0 -0
  29. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/func.m +0 -0
  30. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/namespace.m +0 -0
  31. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+metadata/script.m +0 -0
  32. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/dedent.m +0 -0
  33. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/+utils/get_namespace_path.m +0 -0
  34. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/exception.m +0 -0
  35. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/+docstring/resolve.m +0 -0
  36. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/matlab/matlab_startup.m +0 -0
  37. {mkdocstrings_matlab-0.1.0 → mkdocstrings_matlab-0.1.2}/src/mkdocstrings_handlers/matlab/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mkdocstrings-matlab
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Add your description here
5
5
  Author-email: Mark Hu <mark.hu@asml.com>
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mkdocstrings-matlab"
3
- version = "0.1.0"
3
+ version = "0.1.2"
4
4
  description = "Add your description here"
5
5
  authors = [
6
6
  { name = "Mark Hu", email = "mark.hu@asml.com" }
@@ -12,11 +12,29 @@ import json
12
12
 
13
13
 
14
14
  from mkdocstrings_handlers.matlab_engine import MatlabEngine, MatlabExecutionError
15
- from mkdocstrings_handlers.matlab.models import Function, Class, Classfolder, Namespace, Property
15
+ from mkdocstrings_handlers.matlab.models import (
16
+ Function,
17
+ Class,
18
+ Classfolder,
19
+ Namespace,
20
+ Property,
21
+ ROOT
22
+ )
16
23
 
17
24
 
18
- ROOT_NAMESPACE = Namespace("", filepath="")
19
- MODELS = {}
25
+ class _ModelsStorage:
26
+ def __init__(self):
27
+ self._namespace = ""
28
+ self._models = {}
29
+
30
+ def __getitem__(self, key):
31
+ return self._models[key]
32
+
33
+ def __setitem__(self, key, value):
34
+ self._models[key] = value
35
+
36
+ def __contains__(self, key):
37
+ return key in self._models
20
38
 
21
39
 
22
40
  class MatlabHandler(BaseHandler):
@@ -71,8 +89,8 @@ class MatlabHandler(BaseHandler):
71
89
  # Member options
72
90
  "inherited_members": False,
73
91
  "members": None,
74
- "members_order": rendering.Order.alphabetical.value,
75
- "filters": ["!^_[^_]"],
92
+ "members_order": rendering.Order.alphabetical,
93
+ "filters": [],
76
94
  "group_by_category": True,
77
95
  "show_submodules": False,
78
96
  "summary": False,
@@ -102,7 +120,7 @@ class MatlabHandler(BaseHandler):
102
120
  "show_signature": True,
103
121
  "show_signature_annotations": False,
104
122
  "signature_crossrefs": False,
105
- "separate_signature": True,
123
+ "separate_signature": False,
106
124
  "unwrap_annotated": False,
107
125
  "modernize_annotations": False,
108
126
  }
@@ -124,6 +142,7 @@ class MatlabHandler(BaseHandler):
124
142
  self.engine = MatlabEngine()
125
143
  self.engine.addpath(str(Path(__file__).parent / "matlab"))
126
144
  self.engine.matlab_startup(paths, startup_expression)
145
+ self.models = _ModelsStorage()
127
146
  self._locale = locale
128
147
 
129
148
  def get_templates_dir(self, handler: str | None = None) -> Path:
@@ -145,6 +164,9 @@ class MatlabHandler(BaseHandler):
145
164
  CollectorItem
146
165
  """
147
166
  final_config = ChainMap(config, self.default_config) # type: ignore[arg-type]
167
+ if identifier in self.models:
168
+ return self.models[identifier]
169
+
148
170
  try:
149
171
  ast_json = self.engine.docstring.resolve(identifier)
150
172
  except MatlabExecutionError as error:
@@ -152,10 +174,8 @@ class MatlabHandler(BaseHandler):
152
174
  ast_dict = json.loads(ast_json)
153
175
 
154
176
  match ast_dict["type"]:
155
- case "function":
156
- return collect_function(ast_dict, final_config)
157
- case "method":
158
- return collect_function(ast_dict, final_config)
177
+ case "function" | "method":
178
+ return self.collect_function(ast_dict, final_config)
159
179
  case "class":
160
180
  return self.collect_class(ast_dict, final_config)
161
181
  case _:
@@ -229,25 +249,24 @@ class MatlabHandler(BaseHandler):
229
249
  lambda template_name: template_name in self.env.list_templates()
230
250
  )
231
251
 
232
-
233
252
  def collect_class(self, ast_dict: dict, config: Mapping) -> Class:
234
253
  docstring = (
235
254
  Docstring(ast_dict["docstring"], parser=config["docstring_style"])
236
255
  if ast_dict["docstring"]
237
256
  else None
238
257
  )
239
- object = Class(
258
+ model = Class(
240
259
  ast_dict["name"],
241
260
  docstring=docstring,
242
- parent=get_parent(Path(ast_dict["path"]).parent),
261
+ parent=self.get_parent(Path(ast_dict["path"]).parent),
243
262
  hidden=ast_dict["hidden"],
244
263
  sealed=ast_dict["sealed"],
245
264
  abstract=ast_dict["abstract"],
246
265
  enumeration=ast_dict["enumeration"],
247
266
  handle=ast_dict["handle"],
267
+ filepath=Path(ast_dict["path"]),
248
268
  )
249
269
 
250
-
251
270
  for property_dict in ast_dict["properties"]:
252
271
  name = property_dict.pop("name")
253
272
  defining_class = property_dict.pop("class")
@@ -257,92 +276,111 @@ class MatlabHandler(BaseHandler):
257
276
  if property_doc
258
277
  else None
259
278
  )
260
- if defining_class != object.canonical_path and not config["inherited_members"]:
279
+ if (
280
+ defining_class != model.canonical_path
281
+ and not config["inherited_members"]
282
+ ):
261
283
  continue
262
284
 
263
- object.members[name] = Property(name, docstring=docstring, **property_dict)
285
+ prop = Property(name, docstring=docstring, parent=model, **property_dict)
286
+ model.members[name] = prop
287
+ self.models[prop.canonical_path] = prop
264
288
 
265
289
  for method_dict in ast_dict["methods"]:
266
290
  name = method_dict.pop("name")
267
291
  defining_class = method_dict.pop("class")
268
- if defining_class != object.canonical_path and not config["inherited_members"]:
292
+ if (
293
+ defining_class != model.canonical_path
294
+ and not config["inherited_members"]
295
+ ):
269
296
  continue
270
-
297
+
271
298
  method = self.collect(f"{defining_class}.{name}", config)
299
+ method.parent = model
272
300
  method._access = method_dict["access"]
273
301
  method._static = method_dict["static"]
274
302
  method._abstract = method_dict["abstract"]
275
303
  method._sealed = method_dict["sealed"]
276
304
  method._hidden = method_dict["hidden"]
305
+ model.members[name] = method
306
+ self.models[method.canonical_path] = method
277
307
 
278
- object.members[name] = method
308
+ if config["merge_init_into_class"] and model.name in model.members:
309
+ constructor = model.members.pop(model.name)
310
+ model.members["__init__"] = constructor
311
+ if constructor.docstring.value == model.docstring.value:
312
+ model.docstring = None
279
313
 
280
- return object
281
-
282
- def get_parent(path: Path) -> Namespace | Classfolder:
283
- if path.stem[0] == "+":
284
- if path in MODELS:
285
- parent = MODELS[path]
286
- else:
287
- parent = Namespace(
288
- path.stem[1:], filepath=str(path), parent=get_parent(path.parent)
289
- )
290
- MODELS[path] = parent
291
- elif path.stem[0] == "@":
292
- if path in MODELS:
293
- parent = MODELS[path]
294
- else:
295
- parent = Classfolder(
296
- path.stem[1:], filepath=str(path), parent=get_parent(path.parent)
297
- )
298
- MODELS[path] = parent
299
- else:
300
- parent = ROOT_NAMESPACE
301
- return parent
314
+ self.models[model.canonical_path] = model
302
315
 
316
+ return model
303
317
 
318
+ def collect_function(self, ast_dict: dict, config: Mapping) -> Function:
319
+ parameters = []
304
320
 
321
+ inputs = (
322
+ ast_dict["inputs"]
323
+ if isinstance(ast_dict["inputs"], list)
324
+ else [ast_dict["inputs"]]
325
+ )
326
+ for input_dict in inputs:
327
+ if input_dict["name"] == "varargin":
328
+ parameter_kind = ParameterKind.var_positional
329
+ elif input_dict["kind"] == "positional":
330
+ parameter_kind = ParameterKind.positional_only
331
+ else:
332
+ parameter_kind = ParameterKind.keyword_only
333
+
334
+ parameters.append(
335
+ Parameter(
336
+ input_dict["name"],
337
+ kind=parameter_kind,
338
+ annotation=input_dict["class"],
339
+ default=input_dict["default"] if input_dict["default"] else None,
340
+ )
341
+ )
305
342
 
343
+ model = Function(
344
+ ast_dict["name"],
345
+ parameters=Parameters(*parameters),
346
+ docstring=Docstring(
347
+ ast_dict["docstring"],
348
+ parser=config["docstring_style"],
349
+ parser_options=config["docstring_options"],
350
+ )
351
+ if ast_dict["docstring"]
352
+ else None,
353
+ parent=self.get_parent(Path(ast_dict["path"]).parent),
354
+ filepath=Path(ast_dict["path"]),
355
+ )
306
356
 
307
- def collect_function(ast_dict: dict, config: Mapping) -> Function:
308
- parameters = []
357
+ self.models[model.canonical_path] = model
358
+ return model
309
359
 
310
- inputs = (
311
- ast_dict["inputs"]
312
- if isinstance(ast_dict["inputs"], list)
313
- else [ast_dict["inputs"]]
314
- )
315
- for input_dict in inputs:
316
- if input_dict["name"] == "varargin":
317
- parameter_kind = ParameterKind.var_positional
318
- elif input_dict["kind"] == "positional":
319
- parameter_kind = ParameterKind.positional_only
320
- else:
321
- parameter_kind = ParameterKind.keyword_only
322
-
323
- parameters.append(
324
- Parameter(
325
- input_dict["name"],
326
- kind=parameter_kind,
327
- annotation=input_dict["class"],
328
- default=input_dict["default"] if input_dict["default"] else None,
360
+ def get_parent(self, path: Path) -> Namespace | Classfolder:
361
+ if path.stem[0] == "+":
362
+ parent = Namespace(
363
+ path.stem[1:], filepath=path, parent=self.get_parent(path.parent)
329
364
  )
330
- )
365
+ identifier = parent.canonical_path
366
+ if identifier in self.models:
367
+ parent = self.models[identifier]
368
+ else:
369
+ self.models[identifier] = parent
331
370
 
332
- func = Function(
333
- ast_dict["name"],
334
- parameters=Parameters(*parameters),
335
- docstring=Docstring(
336
- ast_dict["docstring"],
337
- parser=config["docstring_style"],
338
- parser_options=config["docstring_options"],
339
- )
340
- if ast_dict["docstring"]
341
- else None,
342
- parent=get_parent(Path(ast_dict["path"]).parent),
343
- )
371
+ elif path.stem[0] == "@":
372
+ parent = Classfolder(
373
+ path.stem[1:], filepath=path, parent=self.get_parent(path.parent)
374
+ )
375
+ identifier = parent.canonical_path
376
+ if identifier in self.models:
377
+ parent = self.models[identifier]
378
+ else:
379
+ self.models[identifier] = parent
344
380
 
345
- return func
381
+ else:
382
+ parent = ROOT
383
+ return parent
346
384
 
347
385
 
348
386
  def get_handler(
@@ -17,12 +17,21 @@ function data = argument(object)
17
17
  data.kind = string(object.Kind);
18
18
  data.presence = string(object.Presence);
19
19
 
20
- if isempty(object.DefaultValue)
20
+ if contains(data.presence, ["required", "unspecified"])
21
21
  data.default = "";
22
- elseif object.DefaultValue.IsConstant
23
- data.default = string(object.DefaultValue.Value);
24
22
  else
25
- data.default = "*expression*";
23
+ if ~isempty(object.DefaultValue) && object.DefaultValue.IsConstant
24
+ value = object.DefaultValue.Value;
25
+ if isstring(value)
26
+ data.default = sprintf("""%s""", value);
27
+ elseif ischar(value)
28
+ data.default = sprintf("'%s'", value);
29
+ else
30
+ data.default = string(value);
31
+ end
32
+ else
33
+ data.default = "...";
34
+ end
26
35
  end
27
36
 
28
37
  if ~isempty(object.Validation)
@@ -7,7 +7,7 @@ function data = class(object)
7
7
  namespaces = split(object.Name, '.');
8
8
  data.name = namespaces{end};
9
9
 
10
- data.docstring = docstring.utils.parse_doc(object, true);
10
+ data.docstring = docstring.utils.parse_doc(object);
11
11
  data.path = matlab.internal.metafunction(object.Name).Location;
12
12
  data.hidden = object.Hidden;
13
13
  data.sealed = object.Sealed;
@@ -24,7 +24,11 @@ function data = class(object)
24
24
  else
25
25
  method.name = string(methodObject.Name);
26
26
  method.class = string(methodObject.DefiningClass.Name);
27
- method.access = methodObject.Access;
27
+ if iscell(methodObject.Access)
28
+ method.access = "private";
29
+ else
30
+ method.access = methodObject.Access;
31
+ end
28
32
  method.static = methodObject.Static;
29
33
  method.abstract = methodObject.Abstract;
30
34
  method.sealed = methodObject.Sealed;
@@ -1,4 +1,4 @@
1
- function data = argument(object)
1
+ function data = property(object)
2
2
  arguments
3
3
  object (1,:) meta.property
4
4
  end
@@ -6,8 +6,17 @@ function data = argument(object)
6
6
  data.name = string(object.Name);
7
7
  data.class = string(object.DefiningClass.Name);
8
8
  data.docstring = docstring.utils.parse_doc(object);
9
- data.get_access = object.GetAccess;
10
- data.set_access = object.SetAccess;
9
+
10
+ if iscell(object.GetAccess)
11
+ data.get_access = 'private';
12
+ else
13
+ data.get_access = object.GetAccess;
14
+ end
15
+ if iscell(object.SetAccess)
16
+ data.set_access = 'private';
17
+ else
18
+ data.set_access = object.SetAccess;
19
+ end
11
20
  data.dependent = object.Dependent;
12
21
  data.constant = object.Constant;
13
22
  data.abstract = object.Abstract;
@@ -2,10 +2,10 @@ function doc = parse_doc(object, combine)
2
2
 
3
3
  arguments
4
4
  object (1,1) matlab.metadata.MetaData
5
- combine (1,1) logical = false
5
+ combine (1,1) logical = true
6
6
  end
7
7
 
8
- if isempty(object.DetailedDescription)
8
+ if isempty(object.DetailedDescription) || strcmp(object.DetailedDescription, "")
9
9
  doc = object.Description;
10
10
  else
11
11
  if combine
@@ -2,6 +2,7 @@ from enum import Enum
2
2
  from typing import Any
3
3
  from griffe import Function as GriffeFunction, Class as GriffeClass, Module, Attribute
4
4
  from _griffe.exceptions import BuiltinModuleError
5
+ from pathlib import Path
5
6
 
6
7
 
7
8
  class Access(Enum):
@@ -18,12 +19,22 @@ class CanonicalPathMixin:
18
19
 
19
20
  The canonical path is the path where the object was defined (not imported).
20
21
  """
21
- if self.parent is None or self.parent.path == "":
22
+ if isinstance(self.parent, _Root):
22
23
  return self.name
23
24
  return f"{self.parent.path}.{self.name}"
24
25
 
25
26
 
26
- class Class(CanonicalPathMixin, GriffeClass):
27
+ class PathMixin:
28
+ def __init__(self, *args: Any, filepath: Path | None = None, **kwargs: Any) -> None:
29
+ self._filepath: Path | None = filepath
30
+ super().__init__(*args, **kwargs)
31
+
32
+ @property
33
+ def filepath(self) -> Path | None:
34
+ return self._filepath
35
+
36
+
37
+ class Class(CanonicalPathMixin, PathMixin, GriffeClass):
27
38
  def __init__(
28
39
  self,
29
40
  *args: Any,
@@ -96,7 +107,7 @@ class Property(CanonicalPathMixin, Attribute):
96
107
  return (set_public or get_public) and not self._hidden
97
108
 
98
109
 
99
- class Function(CanonicalPathMixin, GriffeFunction):
110
+ class Function(CanonicalPathMixin, PathMixin, GriffeFunction):
100
111
  def __init__(self, *args: Any, **kwargs: Any) -> None:
101
112
  super().__init__(*args, **kwargs)
102
113
  self._access: Access = Access.PUBLIC
@@ -111,17 +122,30 @@ class Function(CanonicalPathMixin, GriffeFunction):
111
122
  return public and not self._hidden
112
123
 
113
124
 
114
- class Namespace(CanonicalPathMixin, Module):
125
+ class Namespace(CanonicalPathMixin, PathMixin, Module):
126
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
127
+ super().__init__(*args, **kwargs)
128
+ self._access: Access = Access.PUBLIC
129
+
130
+ def __repr__(self) -> str:
131
+ return f"Namespace({self.path!r})"
132
+
133
+
134
+ class _Root(Namespace):
135
+ def __init__(self) -> None:
136
+ super().__init__("ROOT", parent=None)
137
+
115
138
  def __repr__(self) -> str:
116
- try:
117
- return f"Namespace({self.filepath!r})"
118
- except BuiltinModuleError:
119
- return f"Namespace({self.name!r})"
139
+ return "MATLABROOT"
140
+
141
+
142
+ ROOT = _Root()
120
143
 
121
144
 
122
- class Classfolder(CanonicalPathMixin, Module):
145
+ class Classfolder(Class):
123
146
  def __repr__(self) -> str:
124
- try:
125
- return f"Classfolder({self.filepath!r})"
126
- except BuiltinModuleError:
127
- return f"Classfolder({self.name!r})"
147
+ return f"Classfolder({self.path!r})"
148
+
149
+
150
+
151
+
@@ -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,3 @@
1
+ # mkdocstrings-matlab-r2023b
2
+
3
+ Describe your project here.
@@ -0,0 +1,27 @@
1
+ [project]
2
+ name = "mkdocstrings-matlab-r2023b"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ authors = [
6
+ { name = "Mark Shui Hu", email = "watermarkhu@gmail.com" }
7
+ ]
8
+ dependencies = [
9
+ "matlabengine==23.2.3",
10
+ ]
11
+ readme = "README.md"
12
+ requires-python = ">=3.9,<3.12"
13
+
14
+ [build-system]
15
+ requires = ["hatchling"]
16
+ build-backend = "hatchling.build"
17
+
18
+ [tool.rye]
19
+ managed = true
20
+ dev-dependencies = []
21
+
22
+ [tool.hatch.metadata]
23
+ allow-direct-references = true
24
+
25
+ [tool.hatch.build.targets.wheel]
26
+ packages = ["mkdocstrings_handlers"]
27
+
@@ -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
@@ -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,3 @@
1
+ # mkdocstrings-matlab-r2023b
2
+
3
+ Describe your project here.
@@ -0,0 +1,26 @@
1
+ [project]
2
+ name = "mkdocstrings-matlab-r2024a"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ authors = [
6
+ { name = "Mark Shui Hu", email = "watermarkhu@gmail.com" }
7
+ ]
8
+ dependencies = [
9
+ "matlabengine==24.1.2",
10
+ ]
11
+ readme = "README.md"
12
+ requires-python = ">=3.9,<3.12"
13
+
14
+ [build-system]
15
+ requires = ["hatchling"]
16
+ build-backend = "hatchling.build"
17
+
18
+ [tool.rye]
19
+ managed = true
20
+ dev-dependencies = []
21
+
22
+ [tool.hatch.metadata]
23
+ allow-direct-references = true
24
+
25
+ [tool.hatch.build.targets.wheel]
26
+ 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
@@ -1,17 +0,0 @@
1
- from mkdocs.commands import serve
2
- from pathlib import Path
3
-
4
- config_file = str(Path(__file__).parent / "mkdocs.yml")
5
-
6
- kwargs = {
7
- "dev_addr": None,
8
- "open_in_browser": False,
9
- "livereload": True,
10
- "build_type": None,
11
- "watch_theme": True,
12
- "config_file": config_file,
13
- "strict": None,
14
- "theme": None,
15
- "use_directory_urls": None,
16
- }
17
- serve.serve(**kwargs)