mkdocstrings-matlab 0.7.0__py3-none-any.whl → 0.8.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.
- mkdocstrings_handlers/matlab/handler.py +29 -7
- mkdocstrings_handlers/matlab/models.py +33 -3
- mkdocstrings_handlers/matlab/templates/material/children.html.jinja +172 -0
- mkdocstrings_handlers/matlab/templates/material/docstring/namespaces.html.jinja +86 -0
- mkdocstrings_handlers/matlab/templates/material/docstring/properties.html.jinja +109 -0
- mkdocstrings_handlers/matlab/templates/material/folder.html.jinja +121 -0
- mkdocstrings_handlers/matlab/templates/material/namespace.html.jinja +121 -0
- mkdocstrings_handlers/matlab/templates/material/property.html.jinja +120 -0
- mkdocstrings_handlers/matlab/templates/material/style.css +26 -0
- mkdocstrings_handlers/matlab/templates/material/summary/namespaces.html.jinja +21 -0
- mkdocstrings_handlers/matlab/templates/material/summary/properties.html.jinja +21 -0
- mkdocstrings_handlers/matlab/templates/material/summary.html.jinja +26 -0
- {mkdocstrings_matlab-0.7.0.dist-info → mkdocstrings_matlab-0.8.0.dist-info}/METADATA +4 -4
- mkdocstrings_matlab-0.8.0.dist-info/RECORD +21 -0
- mkdocs_material_matlab/__init__.py +0 -4
- mkdocs_material_matlab/css/style.css +0 -7
- mkdocs_material_matlab/mkdocs_material_matlab.py +0 -20
- mkdocstrings_matlab-0.7.0.dist-info/RECORD +0 -15
- mkdocstrings_matlab-0.7.0.dist-info/entry_points.txt +0 -2
- {mkdocstrings_matlab-0.7.0.dist-info → mkdocstrings_matlab-0.8.0.dist-info}/WHEEL +0 -0
- {mkdocstrings_matlab-0.7.0.dist-info → mkdocstrings_matlab-0.8.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,8 +2,9 @@
|
|
2
2
|
|
3
3
|
from pathlib import Path
|
4
4
|
from collections import ChainMap
|
5
|
+
from jinja2.loaders import FileSystemLoader
|
5
6
|
from markdown import Markdown
|
6
|
-
from
|
7
|
+
from mkdocs.exceptions import PluginError
|
7
8
|
from mkdocstrings.handlers.base import BaseHandler, CollectorItem, CollectionError
|
8
9
|
from mkdocstrings_handlers.python import rendering
|
9
10
|
from typing import Any, ClassVar, Mapping
|
@@ -152,7 +153,9 @@ class MatlabHandler(BaseHandler):
|
|
152
153
|
|
153
154
|
def __init__(
|
154
155
|
self,
|
155
|
-
|
156
|
+
handler: str,
|
157
|
+
theme: str,
|
158
|
+
custom_templates: str | None = None,
|
156
159
|
config_file_path: str | None = None,
|
157
160
|
paths: list[str] | None = None,
|
158
161
|
paths_recursive: bool = False,
|
@@ -163,7 +166,9 @@ class MatlabHandler(BaseHandler):
|
|
163
166
|
Initialize the handler with the given configuration.
|
164
167
|
|
165
168
|
Args:
|
166
|
-
|
169
|
+
handler: The name of the handler.
|
170
|
+
theme: The name of theme to use.
|
171
|
+
custom_templates: Directory containing custom templates.
|
167
172
|
config_file_path (str | None, optional): Path to the configuration file. Defaults to None.
|
168
173
|
paths (list[str] | None, optional): List of paths to include. Defaults to None.
|
169
174
|
paths_recursive (bool, optional): Whether to include paths recursively. Defaults to False.
|
@@ -173,7 +178,16 @@ class MatlabHandler(BaseHandler):
|
|
173
178
|
Returns:
|
174
179
|
None
|
175
180
|
"""
|
176
|
-
|
181
|
+
|
182
|
+
super().__init__(handler, theme, custom_templates=custom_templates)
|
183
|
+
|
184
|
+
theme_path = Path(__file__).resolve().parent / "templates" / theme
|
185
|
+
if theme_path.exists() and isinstance(self.env.loader, FileSystemLoader):
|
186
|
+
# Insert our templates directory at the beginning of the search path to overload the Python templates
|
187
|
+
self.env.loader.searchpath.insert(0, str(theme_path))
|
188
|
+
css_path = theme_path / "style.css"
|
189
|
+
if css_path.exists():
|
190
|
+
self.extra_css += "\n" + css_path.read_text(encoding="utf-8")
|
177
191
|
|
178
192
|
if paths is None or config_file_path is None:
|
179
193
|
config_path = None
|
@@ -182,13 +196,19 @@ class MatlabHandler(BaseHandler):
|
|
182
196
|
config_path = Path(config_file_path).parent
|
183
197
|
full_paths = [(config_path / path).resolve() for path in paths]
|
184
198
|
|
199
|
+
if pathIds := [str(path) for path in full_paths if not path.is_dir()]:
|
200
|
+
raise PluginError(
|
201
|
+
"The following paths do not exist or are not directories: "
|
202
|
+
+ ", ".join(pathIds)
|
203
|
+
)
|
204
|
+
|
185
205
|
self.paths: PathCollection = PathCollection(
|
186
206
|
full_paths, recursive=paths_recursive, config_path=config_path
|
187
207
|
)
|
188
208
|
self.lines: LinesCollection = self.paths.lines_collection
|
189
209
|
self._locale: str = locale
|
190
210
|
|
191
|
-
def get_templates_dir(self,
|
211
|
+
def get_templates_dir(self, *args, **kwargs) -> Path:
|
192
212
|
# use the python handler templates
|
193
213
|
# (it assumes the python handler is installed)
|
194
214
|
return super().get_templates_dir("python")
|
@@ -254,7 +274,6 @@ class MatlabHandler(BaseHandler):
|
|
254
274
|
}
|
255
275
|
|
256
276
|
# Map docstring options
|
257
|
-
final_config["show_submodules"] = config.get("show_subnamespaces", False)
|
258
277
|
final_config["show_docstring_attributes"] = config.get(
|
259
278
|
"show_docstring_properties", True
|
260
279
|
)
|
@@ -339,7 +358,10 @@ class MatlabHandler(BaseHandler):
|
|
339
358
|
raise CollectionError("Empty identifier")
|
340
359
|
|
341
360
|
final_config = ChainMap(config, self.default_config) # type: ignore[arg-type]
|
342
|
-
|
361
|
+
model = self.paths.resolve(identifier, config=final_config)
|
362
|
+
if model is None:
|
363
|
+
raise CollectionError(f"Identifier '{identifier}' not found")
|
364
|
+
return model
|
343
365
|
|
344
366
|
|
345
367
|
def get_handler(
|
@@ -141,13 +141,24 @@ class MatlabObject(Object):
|
|
141
141
|
path_collection (PathCollection | None): The collection of paths related to the object.
|
142
142
|
**kwargs: Arbitrary keyword arguments.
|
143
143
|
"""
|
144
|
-
|
145
144
|
self.path_collection: "PathCollection | None" = path_collection
|
146
145
|
lines_collection = (
|
147
146
|
path_collection.lines_collection if path_collection is not None else None
|
148
147
|
)
|
149
148
|
super().__init__(*args, lines_collection=lines_collection, **kwargs)
|
150
149
|
|
150
|
+
@property
|
151
|
+
def namespaces(self) -> dict[str, "Namespace"]:
|
152
|
+
return {}
|
153
|
+
|
154
|
+
@property
|
155
|
+
def is_namespace(self) -> bool:
|
156
|
+
return False
|
157
|
+
|
158
|
+
@property
|
159
|
+
def is_folder(self) -> bool:
|
160
|
+
return False
|
161
|
+
|
151
162
|
@property
|
152
163
|
def canonical_path(self) -> str:
|
153
164
|
"""
|
@@ -426,6 +437,8 @@ class Property(MatlabMixin, Attribute, MatlabObject):
|
|
426
437
|
self.SetAccess: AccessEnum = SetAccess
|
427
438
|
self.getter: Function | None = None
|
428
439
|
|
440
|
+
self.extra["mkdocstrings"] = {"template": "property.html.jinja"}
|
441
|
+
|
429
442
|
@property
|
430
443
|
def Private(self) -> bool:
|
431
444
|
private = self.Access != AccessEnum.public
|
@@ -554,10 +567,22 @@ class Folder(MatlabMixin, PathMixin, Module, MatlabObject):
|
|
554
567
|
|
555
568
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
556
569
|
super().__init__(*args, **kwargs)
|
557
|
-
self.
|
570
|
+
self.extra["mkdocstrings"] = {"template": "folder.html.jinja"}
|
558
571
|
|
559
572
|
def __repr__(self) -> str:
|
560
|
-
return f"Folder({self.
|
573
|
+
return f"Folder({self.filepath!r})"
|
574
|
+
|
575
|
+
@property
|
576
|
+
def namespaces(self) -> dict[str, "Namespace"]:
|
577
|
+
return {
|
578
|
+
name: member
|
579
|
+
for name, member in self.members.items()
|
580
|
+
if isinstance(member, Namespace)
|
581
|
+
}
|
582
|
+
|
583
|
+
@property
|
584
|
+
def is_folder(self) -> bool:
|
585
|
+
return True
|
561
586
|
|
562
587
|
|
563
588
|
class Namespace(MatlabMixin, PathMixin, Module, MatlabObject):
|
@@ -574,6 +599,7 @@ class Namespace(MatlabMixin, PathMixin, Module, MatlabObject):
|
|
574
599
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
575
600
|
super().__init__(*args, **kwargs)
|
576
601
|
self._access: AccessEnum = AccessEnum.public
|
602
|
+
self.extra["mkdocstrings"] = {"template": "namespace.html.jinja"}
|
577
603
|
|
578
604
|
def __repr__(self) -> str:
|
579
605
|
return f"Namespace({self.path!r})"
|
@@ -585,3 +611,7 @@ class Namespace(MatlabMixin, PathMixin, Module, MatlabObject):
|
|
585
611
|
if self.filepath
|
586
612
|
else False
|
587
613
|
)
|
614
|
+
|
615
|
+
@property
|
616
|
+
def is_namespace(self) -> bool:
|
617
|
+
return True
|
@@ -0,0 +1,172 @@
|
|
1
|
+
{#- Template for members (children) of an object.
|
2
|
+
|
3
|
+
This template iterates on members of a given object and renders them.
|
4
|
+
It can group members by category (attributes, classes, functions, modules) or render them in a flat list.
|
5
|
+
|
6
|
+
Context:
|
7
|
+
obj (griffe.Object): The object to render.
|
8
|
+
config (dict): The configuration options.
|
9
|
+
root_members (bool): Whether the object is the root object.
|
10
|
+
heading_level (int): The HTML heading level to use.
|
11
|
+
-#}
|
12
|
+
|
13
|
+
{% if obj.all_members %}
|
14
|
+
{% block logs scoped %}
|
15
|
+
{#- Logging block.
|
16
|
+
|
17
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
18
|
+
-#}
|
19
|
+
{{ log.debug("Rendering children of " + obj.path) }}
|
20
|
+
{% endblock logs %}
|
21
|
+
|
22
|
+
<div class="doc doc-children">
|
23
|
+
|
24
|
+
{% if root_members %}
|
25
|
+
{% set members_list = config.members %}
|
26
|
+
{% else %}
|
27
|
+
{% set members_list = none %}
|
28
|
+
{% endif %}
|
29
|
+
|
30
|
+
{% if config.group_by_category %}
|
31
|
+
|
32
|
+
{% with %}
|
33
|
+
|
34
|
+
{% if config.show_category_heading %}
|
35
|
+
{% set extra_level = 1 %}
|
36
|
+
{% else %}
|
37
|
+
{% set extra_level = 0 %}
|
38
|
+
{% endif %}
|
39
|
+
|
40
|
+
{% with attributes = obj.attributes|filter_objects(
|
41
|
+
filters=config.filters,
|
42
|
+
members_list=members_list,
|
43
|
+
inherited_members=config.inherited_members,
|
44
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
45
|
+
) %}
|
46
|
+
{% if attributes %}
|
47
|
+
{% if config.show_category_heading %}
|
48
|
+
{% filter heading(heading_level, id=html_id ~ "-properties") %}Properties{% endfilter %}
|
49
|
+
{% endif %}
|
50
|
+
{% with heading_level = heading_level + extra_level %}
|
51
|
+
{% for attribute in attributes|order_members(config.members_order, members_list) %}
|
52
|
+
{% if members_list is not none or (not attribute.is_imported or attribute.is_public) %}
|
53
|
+
{% include attribute|get_template with context %}
|
54
|
+
{% endif %}
|
55
|
+
{% endfor %}
|
56
|
+
{% endwith %}
|
57
|
+
{% endif %}
|
58
|
+
{% endwith %}
|
59
|
+
|
60
|
+
{% with classes = obj.classes|filter_objects(
|
61
|
+
filters=config.filters,
|
62
|
+
members_list=members_list,
|
63
|
+
inherited_members=config.inherited_members,
|
64
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
65
|
+
) %}
|
66
|
+
{% if classes %}
|
67
|
+
{% if config.show_category_heading %}
|
68
|
+
{% filter heading(heading_level, id=html_id ~ "-classes") %}Classes{% endfilter %}
|
69
|
+
{% endif %}
|
70
|
+
{% with heading_level = heading_level + extra_level %}
|
71
|
+
{% for class in classes|order_members(config.members_order, members_list) %}
|
72
|
+
{% if members_list is not none or (not class.is_imported or class.is_public) %}
|
73
|
+
{% include class|get_template with context %}
|
74
|
+
{% endif %}
|
75
|
+
{% endfor %}
|
76
|
+
{% endwith %}
|
77
|
+
{% endif %}
|
78
|
+
{% endwith %}
|
79
|
+
|
80
|
+
{% with functions = obj.functions|filter_objects(
|
81
|
+
filters=config.filters,
|
82
|
+
members_list=members_list,
|
83
|
+
inherited_members=config.inherited_members,
|
84
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
85
|
+
) %}
|
86
|
+
{% if functions %}
|
87
|
+
{% if config.show_category_heading %}
|
88
|
+
{% filter heading(heading_level, id=html_id ~ "-functions") %}Functions{% endfilter %}
|
89
|
+
{% endif %}
|
90
|
+
{% with heading_level = heading_level + extra_level %}
|
91
|
+
{% for function in functions|order_members(config.members_order, members_list) %}
|
92
|
+
{% if not (obj.kind.value == "class" and function.name == "__init__" and config.merge_init_into_class) %}
|
93
|
+
{% if members_list is not none or (not function.is_imported or function.is_public) %}
|
94
|
+
{% include function|get_template with context %}
|
95
|
+
{% endif %}
|
96
|
+
{% endif %}
|
97
|
+
{% endfor %}
|
98
|
+
{% endwith %}
|
99
|
+
{% endif %}
|
100
|
+
{% endwith %}
|
101
|
+
|
102
|
+
{% if config.show_submodules or obj.is_folder %}
|
103
|
+
{% with modules = obj.modules|filter_objects(
|
104
|
+
filters=config.filters,
|
105
|
+
members_list=members_list,
|
106
|
+
inherited_members=config.inherited_members,
|
107
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
108
|
+
) %}
|
109
|
+
{% if modules %}
|
110
|
+
{% if config.show_category_heading %}
|
111
|
+
{% filter heading(heading_level, id=html_id ~ "-namespaces") %}Modules{% endfilter %}
|
112
|
+
{% endif %}
|
113
|
+
{% with heading_level = heading_level + extra_level %}
|
114
|
+
{% for module in modules|order_members(config.members_order.alphabetical, members_list) %}
|
115
|
+
{% if members_list is not none or (not module.is_alias or module.is_public) %}
|
116
|
+
{% include module|get_template with context %}
|
117
|
+
{% endif %}
|
118
|
+
{% endfor %}
|
119
|
+
{% endwith %}
|
120
|
+
{% endif %}
|
121
|
+
{% endwith %}
|
122
|
+
{% endif %}
|
123
|
+
|
124
|
+
{% endwith %}
|
125
|
+
|
126
|
+
{% else %}
|
127
|
+
|
128
|
+
{% for child in obj.all_members
|
129
|
+
|filter_objects(
|
130
|
+
filters=config.filters,
|
131
|
+
members_list=members_list,
|
132
|
+
inherited_members=config.inherited_members,
|
133
|
+
keep_no_docstrings=config.show_if_no_docstring,
|
134
|
+
)
|
135
|
+
|order_members(config.members_order, members_list)
|
136
|
+
%}
|
137
|
+
|
138
|
+
{% if not (obj.is_class and child.name == "__init__" and config.merge_init_into_class) %}
|
139
|
+
|
140
|
+
{% if members_list is not none or child.is_public %}
|
141
|
+
{% if child.is_attribute %}
|
142
|
+
{% with attribute = child %}
|
143
|
+
{% include attribute|get_template with context %}
|
144
|
+
{% endwith %}
|
145
|
+
|
146
|
+
{% elif child.is_class %}
|
147
|
+
{% with class = child %}
|
148
|
+
{% include class|get_template with context %}
|
149
|
+
{% endwith %}
|
150
|
+
|
151
|
+
{% elif child.is_function %}
|
152
|
+
{% with function = child %}
|
153
|
+
{% include function|get_template with context %}
|
154
|
+
{% endwith %}
|
155
|
+
|
156
|
+
{% elif (child.is_namespace and config.show_submodules) or obj.is_folder %}
|
157
|
+
{% with module = child %}
|
158
|
+
{% include module|get_template with context %}
|
159
|
+
{% endwith %}
|
160
|
+
|
161
|
+
{% endif %}
|
162
|
+
{% endif %}
|
163
|
+
|
164
|
+
{% endif %}
|
165
|
+
|
166
|
+
{% endfor %}
|
167
|
+
|
168
|
+
{% endif %}
|
169
|
+
|
170
|
+
</div>
|
171
|
+
|
172
|
+
{% endif %}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
{#- Template for "Namespaces" sections in docstrings.
|
2
|
+
|
3
|
+
This template renders a list of documented namespaces in the format
|
4
|
+
specified with the [`docstring_section_style`][] configuration option.
|
5
|
+
|
6
|
+
Context:
|
7
|
+
section (griffe.DocstringSectionAttributes): The section to render.
|
8
|
+
-#}
|
9
|
+
|
10
|
+
{% block logs scoped %}
|
11
|
+
{#- Logging block.
|
12
|
+
|
13
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
14
|
+
-#}
|
15
|
+
{{ log.debug("Rendering namespaces section") }}
|
16
|
+
{% endblock logs %}
|
17
|
+
|
18
|
+
{% import "language"|get_template as lang with context %}
|
19
|
+
{#- Language module providing the `t` translation method. -#}
|
20
|
+
|
21
|
+
{% if config.docstring_section_style == "table" %}
|
22
|
+
{% block table_style scoped %}
|
23
|
+
{#- Block for the `table` section style. -#}
|
24
|
+
<p><span class="doc-section-title">{{ section.title or "Namespaces:" }}</span></p>
|
25
|
+
<table>
|
26
|
+
<thead>
|
27
|
+
<tr>
|
28
|
+
<th>{{ lang.t("Name") }}</th>
|
29
|
+
<th>{{ lang.t("Description") }}</th>
|
30
|
+
</tr>
|
31
|
+
</thead>
|
32
|
+
<tbody>
|
33
|
+
{% for module in section.value %}
|
34
|
+
<tr class="doc-section-item">
|
35
|
+
<td><code><autoref identifier="{{ obj.path }}.{{ module.name }}" optional hover>{{ module.name }}</autoref></code></td>
|
36
|
+
<td>
|
37
|
+
<div class="doc-md-description">
|
38
|
+
{{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
|
39
|
+
</div>
|
40
|
+
</td>
|
41
|
+
</tr>
|
42
|
+
{% endfor %}
|
43
|
+
</tbody>
|
44
|
+
</table>
|
45
|
+
{% endblock table_style %}
|
46
|
+
{% elif config.docstring_section_style == "list" %}
|
47
|
+
{% block list_style scoped %}
|
48
|
+
{#- Block for the `list` section style. -#}
|
49
|
+
<p><span class="doc-section-title">{{ section.title or "Namespaces:" }}</span></p>
|
50
|
+
<ul>
|
51
|
+
{% for module in section.value %}
|
52
|
+
<li class="doc-section-item field-body">
|
53
|
+
<b><code><autoref identifier="{{ obj.path }}.{{ module.name }}" optional hover>{{ module.name }}</autoref></code></b>
|
54
|
+
–
|
55
|
+
<div class="doc-md-description">
|
56
|
+
{{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
|
57
|
+
</div>
|
58
|
+
</li>
|
59
|
+
{% endfor %}
|
60
|
+
</ul>
|
61
|
+
{% endblock list_style %}
|
62
|
+
{% elif config.docstring_section_style == "spacy" %}
|
63
|
+
{% block spacy_style scoped %}
|
64
|
+
{#- Block for the `spacy` section style. -#}
|
65
|
+
<table>
|
66
|
+
<thead>
|
67
|
+
<tr>
|
68
|
+
<th><span class="doc-section-title">{{ (section.title or "NAMESPACE:").rstrip(":").upper() }}</span></th>
|
69
|
+
<th><span>{{ lang.t("DESCRIPTION") }}</span></th>
|
70
|
+
</tr>
|
71
|
+
</thead>
|
72
|
+
<tbody>
|
73
|
+
{% for module in section.value %}
|
74
|
+
<tr class="doc-section-item">
|
75
|
+
<td><code><autoref identifier="{{ obj.path }}.{{ module.name }}" optional hover>{{ module.name }}</autoref></code></td>
|
76
|
+
<td class="doc-module-details">
|
77
|
+
<div class="doc-md-description">
|
78
|
+
{{ module.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
|
79
|
+
</div>
|
80
|
+
</td>
|
81
|
+
</tr>
|
82
|
+
{% endfor %}
|
83
|
+
</tbody>
|
84
|
+
</table>
|
85
|
+
{% endblock spacy_style %}
|
86
|
+
{% endif %}
|
@@ -0,0 +1,109 @@
|
|
1
|
+
{#- Template for "Properties" sections in docstrings.
|
2
|
+
|
3
|
+
This template renders a list of documented properties in the format
|
4
|
+
specified with the [`docstring_section_style`][] configuration option.
|
5
|
+
|
6
|
+
Context:
|
7
|
+
section (griffe.DocstringSectionAttributes): The section to render.
|
8
|
+
-#}
|
9
|
+
|
10
|
+
{% block logs scoped %}
|
11
|
+
{#- Logging block.
|
12
|
+
|
13
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
14
|
+
-#}
|
15
|
+
{{ log.debug("Rendering properties section") }}
|
16
|
+
{% endblock logs %}
|
17
|
+
|
18
|
+
{% import "language"|get_template as lang with context %}
|
19
|
+
{#- Language module providing the `t` translation method. -#}
|
20
|
+
|
21
|
+
{% if config.docstring_section_style == "table" %}
|
22
|
+
{% block table_style scoped %}
|
23
|
+
{#- Block for the `table` section style. -#}
|
24
|
+
<p><span class="doc-section-title">{{ section.title or "Properties:" }}</span></p>
|
25
|
+
<table>
|
26
|
+
<thead>
|
27
|
+
<tr>
|
28
|
+
<th>{{ lang.t("Name") }}</th>
|
29
|
+
<th>{{ lang.t("Type") }}</th>
|
30
|
+
<th>{{ lang.t("Description") }}</th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
{% for attribute in section.value %}
|
35
|
+
<tr class="doc-section-item">
|
36
|
+
<td><code><autoref identifier="{{ obj.path }}.{{ attribute.name }}" optional hover>{{ attribute.name }}</autoref></code></td>
|
37
|
+
<td>
|
38
|
+
{% if attribute.annotation %}
|
39
|
+
{% with expression = attribute.annotation %}
|
40
|
+
<code>{% include "expression"|get_template with context %}</code>
|
41
|
+
{% endwith %}
|
42
|
+
{% endif %}
|
43
|
+
</td>
|
44
|
+
<td>
|
45
|
+
<div class="doc-md-description">
|
46
|
+
{{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
|
47
|
+
</div>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
{% endfor %}
|
51
|
+
</tbody>
|
52
|
+
</table>
|
53
|
+
{% endblock table_style %}
|
54
|
+
{% elif config.docstring_section_style == "list" %}
|
55
|
+
{% block list_style scoped %}
|
56
|
+
{#- Block for the `list` section style. -#}
|
57
|
+
<p><span class="doc-section-title">{{ section.title or "Properties:" }}</span></p>
|
58
|
+
<ul>
|
59
|
+
{% for attribute in section.value %}
|
60
|
+
<li class="doc-section-item field-body">
|
61
|
+
<b><code><autoref identifier="{{ obj.path }}.{{ attribute.name }}" optional hover>{{ attribute.name }}</autoref></code></b>
|
62
|
+
{% if attribute.annotation %}
|
63
|
+
{% with expression = attribute.annotation %}
|
64
|
+
(<code>{% include "expression"|get_template with context %}</code>)
|
65
|
+
{% endwith %}
|
66
|
+
{% endif %}
|
67
|
+
–
|
68
|
+
<div class="doc-md-description">
|
69
|
+
{{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
|
70
|
+
</div>
|
71
|
+
</li>
|
72
|
+
{% endfor %}
|
73
|
+
</ul>
|
74
|
+
{% endblock list_style %}
|
75
|
+
{% elif config.docstring_section_style == "spacy" %}
|
76
|
+
{% block spacy_style scoped %}
|
77
|
+
{#- Block for the `spacy` section style. -#}
|
78
|
+
<table>
|
79
|
+
<thead>
|
80
|
+
<tr>
|
81
|
+
<th><span class="doc-section-title">{{ (section.title or "PROPERTY:").rstrip(":").upper() }}</span></th>
|
82
|
+
<th><span>{{ lang.t("DESCRIPTION") }}</span></th>
|
83
|
+
</tr>
|
84
|
+
</thead>
|
85
|
+
<tbody>
|
86
|
+
{% for attribute in section.value %}
|
87
|
+
<tr class="doc-section-item">
|
88
|
+
<td><code><autoref identifier="{{ obj.path }}.{{ attribute.name }}" optional hover>{{ attribute.name }}</autoref></code></td>
|
89
|
+
<td class="doc-attribute-details">
|
90
|
+
<div class="doc-md-description">
|
91
|
+
{{ attribute.description|convert_markdown(heading_level, html_id, autoref_hook=autoref_hook) }}
|
92
|
+
</div>
|
93
|
+
<p>
|
94
|
+
{% if attribute.annotation %}
|
95
|
+
<span class="doc-attribute-annotation">
|
96
|
+
<b>TYPE:</b>
|
97
|
+
{% with expression = attribute.annotation %}
|
98
|
+
<code>{% include "expression"|get_template with context %}</code>
|
99
|
+
{% endwith %}
|
100
|
+
</span>
|
101
|
+
{% endif %}
|
102
|
+
</p>
|
103
|
+
</td>
|
104
|
+
</tr>
|
105
|
+
{% endfor %}
|
106
|
+
</tbody>
|
107
|
+
</table>
|
108
|
+
{% endblock spacy_style %}
|
109
|
+
{% endif %}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
{#- Template for Python modules.
|
2
|
+
|
3
|
+
This template renders a Python module.
|
4
|
+
|
5
|
+
Context:
|
6
|
+
module (griffe.Module): The module to render.
|
7
|
+
root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
|
8
|
+
heading_level (int): The HTML heading level to use.
|
9
|
+
config (dict): The configuration options.
|
10
|
+
-#}
|
11
|
+
|
12
|
+
{% block logs scoped %}
|
13
|
+
{#- Logging block.
|
14
|
+
|
15
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
16
|
+
-#}
|
17
|
+
{{ log.debug("Rendering " + module.path) }}
|
18
|
+
{% endblock logs %}
|
19
|
+
|
20
|
+
<div class="doc doc-object doc-module">
|
21
|
+
{% with obj = module, html_id = module.path %}
|
22
|
+
|
23
|
+
{% if root %}
|
24
|
+
{% set show_full_path = config.show_root_full_path %}
|
25
|
+
{% set root_members = True %}
|
26
|
+
{% elif root_members %}
|
27
|
+
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
|
28
|
+
{% set root_members = False %}
|
29
|
+
{% else %}
|
30
|
+
{% set show_full_path = config.show_object_full_path %}
|
31
|
+
{% endif %}
|
32
|
+
|
33
|
+
{% set module_name = module.path if show_full_path else module.name %}
|
34
|
+
|
35
|
+
{% if not root or config.show_root_heading %}
|
36
|
+
{% filter heading(
|
37
|
+
heading_level,
|
38
|
+
role="module",
|
39
|
+
id=html_id,
|
40
|
+
class="doc doc-heading",
|
41
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-folder"></code> '|safe if config.show_symbol_type_toc else '') + module.name,
|
42
|
+
) %}
|
43
|
+
|
44
|
+
{% block heading scoped %}
|
45
|
+
{#- Heading block.
|
46
|
+
|
47
|
+
This block renders the heading for the module.
|
48
|
+
-#}
|
49
|
+
{% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-folder"></code>{% endif %}
|
50
|
+
{% if config.separate_signature %}
|
51
|
+
<span class="doc doc-object-name doc-module-name">{{ module_name }}</span>
|
52
|
+
{% else %}
|
53
|
+
<code>{{ module_name }}</code>
|
54
|
+
{% endif %}
|
55
|
+
{% endblock heading %}
|
56
|
+
|
57
|
+
{% block labels scoped %}
|
58
|
+
{#- Labels block.
|
59
|
+
|
60
|
+
This block renders the labels for the module.
|
61
|
+
-#}
|
62
|
+
{% with labels = module.labels %}
|
63
|
+
{% include "labels"|get_template with context %}
|
64
|
+
{% endwith %}
|
65
|
+
{% endblock labels %}
|
66
|
+
|
67
|
+
{% endfilter %}
|
68
|
+
|
69
|
+
{% else %}
|
70
|
+
{% if config.show_root_toc_entry %}
|
71
|
+
{% filter heading(heading_level,
|
72
|
+
role="module",
|
73
|
+
id=html_id,
|
74
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-folder"></code> '|safe if config.show_symbol_type_toc else '') + module.name,
|
75
|
+
hidden=True,
|
76
|
+
) %}
|
77
|
+
{% endfilter %}
|
78
|
+
{% endif %}
|
79
|
+
{% set heading_level = heading_level - 1 %}
|
80
|
+
{% endif %}
|
81
|
+
|
82
|
+
<div class="doc doc-contents {% if root %}first{% endif %}">
|
83
|
+
{% block contents scoped %}
|
84
|
+
{#- Contents block.
|
85
|
+
|
86
|
+
This block renders the contents of the module.
|
87
|
+
It contains other blocks that users can override.
|
88
|
+
Overriding the contents block allows to rearrange the order of the blocks.
|
89
|
+
-#}
|
90
|
+
{% block docstring scoped %}
|
91
|
+
{#- Docstring block.
|
92
|
+
|
93
|
+
This block renders the docstring for the module.
|
94
|
+
-#}
|
95
|
+
{% with docstring_sections = module.docstring.parsed %}
|
96
|
+
{% include "docstring"|get_template with context %}
|
97
|
+
{% endwith %}
|
98
|
+
{% endblock docstring %}
|
99
|
+
|
100
|
+
{% block summary scoped %}
|
101
|
+
{#- Summary block.
|
102
|
+
|
103
|
+
This block renders auto-summaries for classes, methods, and attributes.
|
104
|
+
-#}
|
105
|
+
{% include "summary"|get_template with context %}
|
106
|
+
{% endblock summary %}
|
107
|
+
|
108
|
+
{% block children scoped %}
|
109
|
+
{#- Children block.
|
110
|
+
|
111
|
+
This block renders the children (members) of the module.
|
112
|
+
-#}
|
113
|
+
{% set root = False %}
|
114
|
+
{% set heading_level = heading_level + 1 %}
|
115
|
+
{% include "children"|get_template with context %}
|
116
|
+
{% endblock children %}
|
117
|
+
{% endblock contents %}
|
118
|
+
</div>
|
119
|
+
|
120
|
+
{% endwith %}
|
121
|
+
</div>
|
@@ -0,0 +1,121 @@
|
|
1
|
+
{#- Template for Python modules.
|
2
|
+
|
3
|
+
This template renders a Python module.
|
4
|
+
|
5
|
+
Context:
|
6
|
+
module (griffe.Module): The module to render.
|
7
|
+
root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
|
8
|
+
heading_level (int): The HTML heading level to use.
|
9
|
+
config (dict): The configuration options.
|
10
|
+
-#}
|
11
|
+
|
12
|
+
{% block logs scoped %}
|
13
|
+
{#- Logging block.
|
14
|
+
|
15
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
16
|
+
-#}
|
17
|
+
{{ log.debug("Rendering " + module.path) }}
|
18
|
+
{% endblock logs %}
|
19
|
+
|
20
|
+
<div class="doc doc-object doc-module">
|
21
|
+
{% with obj = module, html_id = module.path %}
|
22
|
+
|
23
|
+
{% if root %}
|
24
|
+
{% set show_full_path = config.show_root_full_path %}
|
25
|
+
{% set root_members = True %}
|
26
|
+
{% elif root_members %}
|
27
|
+
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
|
28
|
+
{% set root_members = False %}
|
29
|
+
{% else %}
|
30
|
+
{% set show_full_path = config.show_object_full_path %}
|
31
|
+
{% endif %}
|
32
|
+
|
33
|
+
{% set module_name = module.path if show_full_path else module.name %}
|
34
|
+
|
35
|
+
{% if not root or config.show_root_heading %}
|
36
|
+
{% filter heading(
|
37
|
+
heading_level,
|
38
|
+
role="module",
|
39
|
+
id=html_id,
|
40
|
+
class="doc doc-heading",
|
41
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-namespace"></code> '|safe if config.show_symbol_type_toc else '') + module.name,
|
42
|
+
) %}
|
43
|
+
|
44
|
+
{% block heading scoped %}
|
45
|
+
{#- Heading block.
|
46
|
+
|
47
|
+
This block renders the heading for the module.
|
48
|
+
-#}
|
49
|
+
{% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-namespace"></code>{% endif %}
|
50
|
+
{% if config.separate_signature %}
|
51
|
+
<span class="doc doc-object-name doc-module-name">{{ module_name }}</span>
|
52
|
+
{% else %}
|
53
|
+
<code>{{ module_name }}</code>
|
54
|
+
{% endif %}
|
55
|
+
{% endblock heading %}
|
56
|
+
|
57
|
+
{% block labels scoped %}
|
58
|
+
{#- Labels block.
|
59
|
+
|
60
|
+
This block renders the labels for the module.
|
61
|
+
-#}
|
62
|
+
{% with labels = module.labels %}
|
63
|
+
{% include "labels"|get_template with context %}
|
64
|
+
{% endwith %}
|
65
|
+
{% endblock labels %}
|
66
|
+
|
67
|
+
{% endfilter %}
|
68
|
+
|
69
|
+
{% else %}
|
70
|
+
{% if config.show_root_toc_entry %}
|
71
|
+
{% filter heading(heading_level,
|
72
|
+
role="module",
|
73
|
+
id=html_id,
|
74
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-namespace"></code> '|safe if config.show_symbol_type_toc else '') + module.name,
|
75
|
+
hidden=True,
|
76
|
+
) %}
|
77
|
+
{% endfilter %}
|
78
|
+
{% endif %}
|
79
|
+
{% set heading_level = heading_level - 1 %}
|
80
|
+
{% endif %}
|
81
|
+
|
82
|
+
<div class="doc doc-contents {% if root %}first{% endif %}">
|
83
|
+
{% block contents scoped %}
|
84
|
+
{#- Contents block.
|
85
|
+
|
86
|
+
This block renders the contents of the module.
|
87
|
+
It contains other blocks that users can override.
|
88
|
+
Overriding the contents block allows to rearrange the order of the blocks.
|
89
|
+
-#}
|
90
|
+
{% block docstring scoped %}
|
91
|
+
{#- Docstring block.
|
92
|
+
|
93
|
+
This block renders the docstring for the module.
|
94
|
+
-#}
|
95
|
+
{% with docstring_sections = module.docstring.parsed %}
|
96
|
+
{% include "docstring"|get_template with context %}
|
97
|
+
{% endwith %}
|
98
|
+
{% endblock docstring %}
|
99
|
+
|
100
|
+
{% block summary scoped %}
|
101
|
+
{#- Summary block.
|
102
|
+
|
103
|
+
This block renders auto-summaries for classes, methods, and attributes.
|
104
|
+
-#}
|
105
|
+
{% include "summary"|get_template with context %}
|
106
|
+
{% endblock summary %}
|
107
|
+
|
108
|
+
{% block children scoped %}
|
109
|
+
{#- Children block.
|
110
|
+
|
111
|
+
This block renders the children (members) of the module.
|
112
|
+
-#}
|
113
|
+
{% set root = False %}
|
114
|
+
{% set heading_level = heading_level + 1 %}
|
115
|
+
{% include "children"|get_template with context %}
|
116
|
+
{% endblock children %}
|
117
|
+
{% endblock contents %}
|
118
|
+
</div>
|
119
|
+
|
120
|
+
{% endwith %}
|
121
|
+
</div>
|
@@ -0,0 +1,120 @@
|
|
1
|
+
{#- Template for Python attributes.
|
2
|
+
|
3
|
+
This template renders a Python attribute (or variable).
|
4
|
+
This can be a module attribute or a class attribute.
|
5
|
+
|
6
|
+
Context:
|
7
|
+
attribute (griffe.Attribute): The attribute to render.
|
8
|
+
root (bool): Whether this is the root object, injected with `:::` in a Markdown page.
|
9
|
+
heading_level (int): The HTML heading level to use.
|
10
|
+
config (dict): The configuration options.
|
11
|
+
-#}
|
12
|
+
|
13
|
+
{% block logs scoped %}
|
14
|
+
{#- Logging block.
|
15
|
+
|
16
|
+
This block can be used to log debug messages, deprecation messages, warnings, etc.
|
17
|
+
-#}
|
18
|
+
{{ log.debug("Rendering " + attribute.path) }}
|
19
|
+
{% endblock logs %}
|
20
|
+
|
21
|
+
<div class="doc doc-object doc-attribute">
|
22
|
+
{% with obj = attribute, html_id = attribute.path %}
|
23
|
+
|
24
|
+
{% if root %}
|
25
|
+
{% set show_full_path = config.show_root_full_path %}
|
26
|
+
{% set root_members = True %}
|
27
|
+
{% elif root_members %}
|
28
|
+
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
|
29
|
+
{% set root_members = False %}
|
30
|
+
{% else %}
|
31
|
+
{% set show_full_path = config.show_object_full_path %}
|
32
|
+
{% endif %}
|
33
|
+
|
34
|
+
{% set attribute_name = attribute.path if show_full_path else attribute.name %}
|
35
|
+
|
36
|
+
{% if not root or config.show_root_heading %}
|
37
|
+
{% filter heading(
|
38
|
+
heading_level,
|
39
|
+
role="data" if attribute.parent.kind.value == "module" else "attr",
|
40
|
+
id=html_id,
|
41
|
+
class="doc doc-heading",
|
42
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-property"></code> '|safe if config.show_symbol_type_toc else '') + attribute.name,
|
43
|
+
) %}
|
44
|
+
|
45
|
+
{% block heading scoped %}
|
46
|
+
{#- Heading block.
|
47
|
+
|
48
|
+
This block renders the heading for the attribute.
|
49
|
+
-#}
|
50
|
+
{% if config.show_symbol_type_heading %}<code class="doc-symbol doc-symbol-heading doc-symbol-property"></code>{% endif %}
|
51
|
+
{% if config.separate_signature %}
|
52
|
+
<span class="doc doc-object-name doc-attribute-name">{{ attribute_name }}</span>
|
53
|
+
{% else %}
|
54
|
+
{%+ filter highlight(language="python", inline=True) %}
|
55
|
+
{{ attribute_name }}{% if attribute.annotation and config.show_signature_annotations %}: {{ attribute.annotation }}{% endif %}
|
56
|
+
{% if attribute.value %} = {{ attribute.value }}{% endif %}
|
57
|
+
{% endfilter %}
|
58
|
+
{% endif %}
|
59
|
+
{% endblock heading %}
|
60
|
+
|
61
|
+
{% block labels scoped %}
|
62
|
+
{#- Labels block.
|
63
|
+
|
64
|
+
This block renders the labels for the attribute.
|
65
|
+
-#}
|
66
|
+
{% with labels = attribute.labels %}
|
67
|
+
{% include "labels"|get_template with context %}
|
68
|
+
{% endwith %}
|
69
|
+
{% endblock labels %}
|
70
|
+
|
71
|
+
{% endfilter %}
|
72
|
+
|
73
|
+
{% block signature scoped %}
|
74
|
+
{#- Signature block.
|
75
|
+
|
76
|
+
This block renders the signature for the attribute.
|
77
|
+
-#}
|
78
|
+
{% if config.separate_signature %}
|
79
|
+
{% filter format_attribute(attribute, config.line_length, crossrefs=config.signature_crossrefs) %}
|
80
|
+
{{ attribute.name }}
|
81
|
+
{% endfilter %}
|
82
|
+
{% endif %}
|
83
|
+
{% endblock signature %}
|
84
|
+
|
85
|
+
{% else %}
|
86
|
+
|
87
|
+
{% if config.show_root_toc_entry %}
|
88
|
+
{% filter heading(heading_level,
|
89
|
+
role="data" if attribute.parent.kind.value == "module" else "attr",
|
90
|
+
id=html_id,
|
91
|
+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-property"></code> '|safe if config.show_symbol_type_toc else '') + attribute.name,
|
92
|
+
hidden=True,
|
93
|
+
) %}
|
94
|
+
{% endfilter %}
|
95
|
+
{% endif %}
|
96
|
+
{% set heading_level = heading_level - 1 %}
|
97
|
+
{% endif %}
|
98
|
+
|
99
|
+
<div class="doc doc-contents {% if root %}first{% endif %}">
|
100
|
+
{% block contents scoped %}
|
101
|
+
{#- Contents block.
|
102
|
+
|
103
|
+
This block renders the contents of the attribute.
|
104
|
+
It contains other blocks that users can override.
|
105
|
+
Overriding the contents block allows to rearrange the order of the blocks.
|
106
|
+
-#}
|
107
|
+
{% block docstring scoped %}
|
108
|
+
{#- Docstring block.
|
109
|
+
|
110
|
+
This block renders the docstring for the attribute.
|
111
|
+
-#}
|
112
|
+
{% with docstring_sections = attribute.docstring.parsed %}
|
113
|
+
{% include "docstring"|get_template with context %}
|
114
|
+
{% endwith %}
|
115
|
+
{% endblock docstring %}
|
116
|
+
{% endblock contents %}
|
117
|
+
</div>
|
118
|
+
|
119
|
+
{% endwith %}
|
120
|
+
</div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
code.doc-symbol-namespace {
|
2
|
+
color: var(--doc-symbol-module-fg-color);
|
3
|
+
background-color: var(--doc-symbol-module-bg-color);
|
4
|
+
}
|
5
|
+
|
6
|
+
code.doc-symbol-namespace::after {
|
7
|
+
content: "name";
|
8
|
+
}
|
9
|
+
|
10
|
+
code.doc-symbol-folder {
|
11
|
+
color: var(--doc-symbol-module-fg-color);
|
12
|
+
background-color: var(--doc-symbol-module-bg-color);
|
13
|
+
}
|
14
|
+
|
15
|
+
code.doc-symbol-folder::after {
|
16
|
+
content: "dir";
|
17
|
+
}
|
18
|
+
|
19
|
+
code.doc-symbol-property {
|
20
|
+
color: var(--doc-symbol-attribute-fg-color);
|
21
|
+
background-color: var(--doc-symbol-attribute-bg-color);
|
22
|
+
}
|
23
|
+
|
24
|
+
code.doc-symbol-property::after {
|
25
|
+
content: "prop";
|
26
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{#- Summary of namespaces. -#}
|
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
|
+
{% 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 %}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{#- Summary of properties. -#}
|
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
|
+
{% 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 %}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{#- Template for auto-summaries. -#}
|
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
|
+
{% with members_list = config.members if root_members else None %}
|
11
|
+
{% if config.summary.modules %}
|
12
|
+
{% include "summary/namespaces"|get_template with context %}
|
13
|
+
{% endif %}
|
14
|
+
|
15
|
+
{% if config.summary.classes %}
|
16
|
+
{% include "summary/classes"|get_template with context %}
|
17
|
+
{% endif %}
|
18
|
+
|
19
|
+
{% if config.summary.functions %}
|
20
|
+
{% include "summary/functions"|get_template with context %}
|
21
|
+
{% endif %}
|
22
|
+
|
23
|
+
{% if config.summary.attributes %}
|
24
|
+
{% include "summary/properties"|get_template with context %}
|
25
|
+
{% endif %}
|
26
|
+
{% endwith %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mkdocstrings-matlab
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.0
|
4
4
|
Summary: A MATLAB handler for mkdocstrings
|
5
5
|
Author-email: Mark Hu <watermarkhu@gmail.com>
|
6
6
|
License: MIT
|
@@ -21,11 +21,11 @@ Classifier: Topic :: Software Development :: Documentation
|
|
21
21
|
Classifier: Topic :: Utilities
|
22
22
|
Classifier: Typing :: Typed
|
23
23
|
Requires-Python: >=3.10
|
24
|
-
Requires-Dist: charset-normalizer
|
24
|
+
Requires-Dist: charset-normalizer==3.4.1
|
25
25
|
Requires-Dist: mkdocstrings-python==1.13.0
|
26
26
|
Requires-Dist: mkdocstrings==0.27.0
|
27
|
-
Requires-Dist: tree-sitter-matlab
|
28
|
-
Requires-Dist: tree-sitter
|
27
|
+
Requires-Dist: tree-sitter-matlab==1.0.3
|
28
|
+
Requires-Dist: tree-sitter==0.23.2
|
29
29
|
Description-Content-Type: text/markdown
|
30
30
|
|
31
31
|
<!-- --8<-- [start:header] -->
|
@@ -0,0 +1,21 @@
|
|
1
|
+
mkdocstrings_handlers/matlab/__init__.py,sha256=w5R9cGtqeJF0GUP_Jc_ad8FnS4FpbutnmHvzVRlohPM,1124
|
2
|
+
mkdocstrings_handlers/matlab/collect.py,sha256=WXuRIDYL0T1fKv1MwwOC6uWAB80PxRCs4uYDgOHiQcg,29749
|
3
|
+
mkdocstrings_handlers/matlab/enums.py,sha256=lr3wLlhPxyBym3O7Rt0cLUZYqPCz6wQ2PYBibLKLTek,982
|
4
|
+
mkdocstrings_handlers/matlab/handler.py,sha256=kHyBrHTvZJBXVgondNcbjyeRna0pMmfCnIDVk7ru3oQ,19708
|
5
|
+
mkdocstrings_handlers/matlab/models.py,sha256=L3x17w9sqFBNMEJ-3rlEbPQpHRGHl2WY_xHE26NLHsQ,19232
|
6
|
+
mkdocstrings_handlers/matlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
+
mkdocstrings_handlers/matlab/treesitter.py,sha256=FkWGuH7EmE_aO2qub5-_NnOVacYeXW353SkB7cNMlRo,21820
|
8
|
+
mkdocstrings_handlers/matlab/templates/material/children.html.jinja,sha256=BydWtrB7KR27tzjbzSOZZvv1srEDUHox-vTy4RRE9zk,6456
|
9
|
+
mkdocstrings_handlers/matlab/templates/material/folder.html.jinja,sha256=cWgaQH4EDFgL3eEIv0NRwRXYvtn9pp4tW7ntv3X2nM8,4076
|
10
|
+
mkdocstrings_handlers/matlab/templates/material/namespace.html.jinja,sha256=NNqL14Z01Lhx6WwK2NxusY-cwcY7HHie07L_VEt8dws,4085
|
11
|
+
mkdocstrings_handlers/matlab/templates/material/property.html.jinja,sha256=anYCQM6AcyGgEApDC97TqzWlgVNtc1I_Ys1xyvUXye0,4396
|
12
|
+
mkdocstrings_handlers/matlab/templates/material/style.css,sha256=0_Bs5_0fHM3X9l-IU1VHbZfhNA7nUw4SKEH_3zRhCDw,557
|
13
|
+
mkdocstrings_handlers/matlab/templates/material/summary.html.jinja,sha256=hVbQGxbMWd6fl01afbg0LhfYCJD1IRPmmCdcDBxU650,735
|
14
|
+
mkdocstrings_handlers/matlab/templates/material/docstring/namespaces.html.jinja,sha256=jLtPxNNfZFO3-Ozy0eHqxHvKmlPCODML_5xt8SJr8UE,3165
|
15
|
+
mkdocstrings_handlers/matlab/templates/material/docstring/properties.html.jinja,sha256=9ckdYymLlB5sflwYEaEPAQLJuVWF8nezMCV5JnanXVA,4165
|
16
|
+
mkdocstrings_handlers/matlab/templates/material/summary/namespaces.html.jinja,sha256=0vVlUB6oh-A7cpXbuDLOQLxTubyb_DisdOKm062WNMs,650
|
17
|
+
mkdocstrings_handlers/matlab/templates/material/summary/properties.html.jinja,sha256=nyPaELf9qPCxJQFxK1MWYK4fPwsk5VESh9xKHLtd-XE,643
|
18
|
+
mkdocstrings_matlab-0.8.0.dist-info/METADATA,sha256=Y3FVSH3Jx3tgfzfh8bmcoTQLgdtmbn70lyLzprHO9Es,4736
|
19
|
+
mkdocstrings_matlab-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
20
|
+
mkdocstrings_matlab-0.8.0.dist-info/licenses/LICENSE,sha256=TZQpwBuA3KLH56--XDAY2Qwo9gGdxeTITYhMOylmYhg,743
|
21
|
+
mkdocstrings_matlab-0.8.0.dist-info/RECORD,,
|
@@ -1,20 +0,0 @@
|
|
1
|
-
from mkdocs.plugins import BasePlugin
|
2
|
-
import os
|
3
|
-
|
4
|
-
|
5
|
-
class MkdocsMaterialMatlabPlugin(BasePlugin):
|
6
|
-
def on_config(self, config):
|
7
|
-
# Ensure the custom CSS file is included in the extra_css list
|
8
|
-
css_path = "css/style.css"
|
9
|
-
if css_path not in config["extra_css"]:
|
10
|
-
config["extra_css"].append(css_path)
|
11
|
-
return config
|
12
|
-
|
13
|
-
def on_post_build(self, *, config):
|
14
|
-
# Ensure the custom CSS file is copied to the output directory
|
15
|
-
css_src_path = os.path.join(os.path.dirname(__file__), "css", "style.css")
|
16
|
-
css_dest_path = os.path.join(config["site_dir"], "css", "style.css")
|
17
|
-
os.makedirs(os.path.dirname(css_dest_path), exist_ok=True)
|
18
|
-
with open(css_src_path, "rb") as src_file:
|
19
|
-
with open(css_dest_path, "wb") as dest_file:
|
20
|
-
dest_file.write(src_file.read())
|
@@ -1,15 +0,0 @@
|
|
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=w5R9cGtqeJF0GUP_Jc_ad8FnS4FpbutnmHvzVRlohPM,1124
|
5
|
-
mkdocstrings_handlers/matlab/collect.py,sha256=WXuRIDYL0T1fKv1MwwOC6uWAB80PxRCs4uYDgOHiQcg,29749
|
6
|
-
mkdocstrings_handlers/matlab/enums.py,sha256=lr3wLlhPxyBym3O7Rt0cLUZYqPCz6wQ2PYBibLKLTek,982
|
7
|
-
mkdocstrings_handlers/matlab/handler.py,sha256=-KA6kj8L55T9jxgKzNM_k59AXsyTSQJqFd8ltN00LQI,18710
|
8
|
-
mkdocstrings_handlers/matlab/models.py,sha256=0qGk6UrGHB4fC49I2cjCgqLFAIozqtmLAxl9PPN6Blc,18461
|
9
|
-
mkdocstrings_handlers/matlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
|
-
mkdocstrings_handlers/matlab/treesitter.py,sha256=FkWGuH7EmE_aO2qub5-_NnOVacYeXW353SkB7cNMlRo,21820
|
11
|
-
mkdocstrings_matlab-0.7.0.dist-info/METADATA,sha256=5jzSXQm4dSLd9GBaJWSAvJm1JGBcuAGUaLWLpMoiGu0,4736
|
12
|
-
mkdocstrings_matlab-0.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
13
|
-
mkdocstrings_matlab-0.7.0.dist-info/entry_points.txt,sha256=qUZFuB2TKh7KPlg4dR2npfbNgNExw6O6j1vF276PtPw,92
|
14
|
-
mkdocstrings_matlab-0.7.0.dist-info/licenses/LICENSE,sha256=TZQpwBuA3KLH56--XDAY2Qwo9gGdxeTITYhMOylmYhg,743
|
15
|
-
mkdocstrings_matlab-0.7.0.dist-info/RECORD,,
|
File without changes
|
{mkdocstrings_matlab-0.7.0.dist-info → mkdocstrings_matlab-0.8.0.dist-info}/licenses/LICENSE
RENAMED
File without changes
|