mkdocstrings-matlab 0.8.0__tar.gz → 0.8.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.github/workflows/qualify.yaml +5 -2
  2. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.github/workflows/release.yaml +40 -1
  3. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/CHANGELOG.md +9 -0
  4. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/PKG-INFO +1 -1
  5. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/pyproject.toml +1 -1
  6. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/scripts/copy_and_update_python_templates.py +9 -4
  7. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/collect.py +1 -1
  8. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/models.py +3 -3
  9. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/children.html.jinja +2 -2
  10. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/namespace.html.jinja +1 -1
  11. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.github/CODEOWNERS +0 -0
  12. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.github/workflows/docs.yaml +0 -0
  13. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.github/workflows/update-templates.yaml +0 -0
  14. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.gitignore +0 -0
  15. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.python-version +0 -0
  16. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.vscode/launch.json +0 -0
  17. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/.vscode/settings.json +0 -0
  18. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/LICENSE +0 -0
  19. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/README.md +0 -0
  20. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/api.md +0 -0
  21. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/changelog.md +0 -0
  22. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/credits.md +0 -0
  23. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/debug.py +0 -0
  24. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/img/preview_dark.png +0 -0
  25. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/img/preview_light.png +0 -0
  26. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/index.md +0 -0
  27. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/license.md +0 -0
  28. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/logo.png +0 -0
  29. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/logo.svg +0 -0
  30. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/overrides/main.html +0 -0
  31. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/overrides/partials/toc-item.html +0 -0
  32. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+module/+submodule/Contents.m +0 -0
  33. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+module/+submodule/subfunction.m +0 -0
  34. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+module/aClass.m +0 -0
  35. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+module/do_something.m +0 -0
  36. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+module/module.md +0 -0
  37. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+module/readme.md +0 -0
  38. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mymembers/BaseClass.m +0 -0
  39. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mymembers/Contents.m +0 -0
  40. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mymembers/ThisClass.m +0 -0
  41. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mymembers/mymembers.md +0 -0
  42. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mymembers/this_function.m +0 -0
  43. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mynamespace/classA.m +0 -0
  44. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mynamespace/classB.m +0 -0
  45. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mynamespace/mynamespace.md +0 -0
  46. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mynamespace/readme.md +0 -0
  47. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+mynamespace/typed_function.m +0 -0
  48. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+undocumented/ClassWithoutDocstring.m +0 -0
  49. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+undocumented/function_with_docstring.m +0 -0
  50. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+undocumented/function_without_docstring.m +0 -0
  51. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/+undocumented/undocumented.md +0 -0
  52. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/Class.m +0 -0
  53. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/OtherClass.m +0 -0
  54. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/Thing.m +0 -0
  55. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/do_output.m +0 -0
  56. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/do_something.m +0 -0
  57. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/do_varargin.m +0 -0
  58. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/myClass.m +0 -0
  59. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/myParent.m +0 -0
  60. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/myfunction.m +0 -0
  61. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/snippets/print_hello.m +0 -0
  62. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/stylesheets/extra.css +0 -0
  63. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/configuration/docstrings.md +0 -0
  64. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/configuration/general.md +0 -0
  65. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/configuration/headings.md +0 -0
  66. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/configuration/members.md +0 -0
  67. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/configuration/signatures.md +0 -0
  68. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/docstrings/google.md +0 -0
  69. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/docstrings/numpy.md +0 -0
  70. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/docstrings/sphinx.md +0 -0
  71. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/docs/usage/index.md +0 -0
  72. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/logo.svg +0 -0
  73. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/mkdocs.yml +0 -0
  74. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/renovate.json +0 -0
  75. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/requirements.lock +0 -0
  76. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/__init__.py +0 -0
  77. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/enums.py +0 -0
  78. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/handler.py +0 -0
  79. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/py.typed +0 -0
  80. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/docstring/namespaces.html.jinja +0 -0
  81. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/docstring/properties.html.jinja +0 -0
  82. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/folder.html.jinja +0 -0
  83. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/property.html.jinja +0 -0
  84. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/style.css +0 -0
  85. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/summary/namespaces.html.jinja +0 -0
  86. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/summary/properties.html.jinja +0 -0
  87. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/templates/material/summary.html.jinja +0 -0
  88. {mkdocstrings_matlab-0.8.0 → mkdocstrings_matlab-0.8.1}/src/mkdocstrings_handlers/matlab/treesitter.py +0 -0
@@ -23,12 +23,15 @@ jobs:
23
23
  if: github.event.pull_request.draft == false
24
24
  name: Test deploy documentation
25
25
  uses: ./.github/workflows/docs.yaml
26
+ concurrency:
27
+ group: gh-pages
28
+ cancel-in-progress: false
26
29
  secrets: inherit
27
30
  with:
28
- version: __test__
31
+ version: ${{ format('pr-{0}', github.head_ref) || 'test' }}
29
32
  alias: ""
30
33
  set-default: false
31
- push: false
34
+ push: true
32
35
 
33
36
  check-semantic-version:
34
37
  name: Check semantic version
@@ -86,9 +86,48 @@ jobs:
86
86
  github_token: ${{ steps.app-token.outputs.token }}
87
87
  tag: ${{ steps.semantic-release.outputs.tag }}
88
88
 
89
+ delete-test-document:
90
+ name: Delete test documentation
91
+ needs: publish
92
+ runs-on: ubuntu-latest
93
+ concurrency:
94
+ group: gh-pages
95
+ cancel-in-progress: false
96
+
97
+ steps:
98
+ - name: checkout repository
99
+ uses: actions/checkout@v4
100
+ with:
101
+ fetch-depth: 0 # Required to push to the documentation branch
102
+
103
+ - name: Install the latest version of uv
104
+ uses: astral-sh/setup-uv@v5
105
+ with:
106
+ version: "latest"
107
+
108
+ - name: Sync dependencies
109
+ run: |
110
+ uv sync --no-dev --group docs
111
+
112
+ - name: Configure Git Credentials
113
+ run: |
114
+ git config --global user.name github-actions[bot]
115
+ git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
116
+
117
+ - name: delete testing documentation
118
+ continue-on-error: true
119
+ env:
120
+ VERSION: ${{ format('pr-{0}', github.head_ref) || 'test' }}
121
+ run: >
122
+ uv run mike delete
123
+ --push --ignore-remote-status
124
+ --config-file mkdocs.yml
125
+ --branch gh-pages
126
+ $VERSION
127
+
89
128
  mkdocs:
90
129
  name: Deploy documentation
91
- needs: [publish]
130
+ needs: [publish, delete-test-document]
92
131
  uses: ./.github/workflows/docs.yaml
93
132
  secrets: inherit
94
133
  with:
@@ -1,6 +1,15 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v0.8.1 (2025-01-14)
5
+
6
+ ### Bug Fixes
7
+
8
+ - Names of folder and namespace entities
9
+ ([#49](https://github.com/watermarkhu/mkdocstrings-matlab/pull/49),
10
+ [`248d389`](https://github.com/watermarkhu/mkdocstrings-matlab/commit/248d3893b9fad1b1e9818c7b48959ca01c6f9cdf))
11
+
12
+
4
13
  ## v0.8.0 (2025-01-13)
5
14
 
6
15
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-matlab
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: A MATLAB handler for mkdocstrings
5
5
  Author-email: Mark Hu <watermarkhu@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mkdocstrings-matlab"
3
- version = "0.8.0"
3
+ version = "0.8.1"
4
4
  description = "A MATLAB handler for mkdocstrings"
5
5
  authors = [
6
6
  { name = "Mark Hu", email = "watermarkhu@gmail.com" }
@@ -40,12 +40,17 @@ def copy_template(
40
40
  copy_template(
41
41
  "_base/module.html.jinja",
42
42
  "folder.html.jinja",
43
- {"doc-symbol-module": "doc-symbol-folder"},
43
+ {
44
+ "doc-symbol-module": "doc-symbol-folder",
45
+ },
44
46
  )
45
47
  copy_template(
46
48
  "_base/module.html.jinja",
47
49
  "namespace.html.jinja",
48
- {"doc-symbol-module": "doc-symbol-namespace"},
50
+ {
51
+ "doc-symbol-module": "doc-symbol-namespace",
52
+ "{% set module_name = module.path if show_full_path else module.name %}": '{% set module_name = module.path + ".*" if show_full_path else module.name + ".*" %}',
53
+ },
49
54
  )
50
55
 
51
56
  # Copy the property template
@@ -115,7 +120,7 @@ copy_template(
115
120
  "Attributes": "Properties",
116
121
  "-modules": "-namespaces",
117
122
  "Modules": "Modules",
118
- "{% if config.show_submodules %}": "{% if config.show_submodules or obj.is_folder %}",
119
- "{% elif child.is_module and config.show_submodules %}": "{% elif (child.is_namespace and config.show_submodules) or obj.is_folder %}",
123
+ "{% if config.show_submodules %}": "{% if config.show_subnamespaces or obj.is_folder %}",
124
+ "{% elif child.is_module and config.show_submodules %}": "{% elif (child.is_namespace and config.show_subnamespaces) or obj.is_folder %}",
120
125
  },
121
126
  )
@@ -771,7 +771,7 @@ class LazyModel:
771
771
 
772
772
  def _collect_folder(self, path: Path) -> Folder:
773
773
  name = path.stem
774
- model = Folder(name, filepath=path, path_collection=self._path_collection)
774
+ model = Folder("/" + name, filepath=path, path_collection=self._path_collection)
775
775
  return self._collect_directory(path, model)
776
776
 
777
777
  def _collect_readme_md(self, path, parent: PathMixin) -> Docstring | None:
@@ -193,8 +193,8 @@ class PathMixin(Object):
193
193
  """
194
194
 
195
195
  def __init__(self, *args: Any, filepath: Path | None = None, **kwargs: Any) -> None:
196
- self._filepath: Path | None = filepath
197
196
  super().__init__(*args, **kwargs)
197
+ self._filepath: Path | None = filepath
198
198
 
199
199
  @property
200
200
  def filepath(self) -> Path | None:
@@ -212,9 +212,9 @@ class MatlabMixin(Object):
212
212
  docstring: Docstring | None = None,
213
213
  **kwargs: Any,
214
214
  ):
215
+ super().__init__(*args, **kwargs)
215
216
  self._parent: "Class | Classfolder | Namespace | _ParentGrabber | None" = parent
216
217
  self._docstring: Docstring | None = docstring
217
- super().__init__(*args, **kwargs)
218
218
 
219
219
  @property
220
220
  def parent(self) -> Object | None:
@@ -570,7 +570,7 @@ class Folder(MatlabMixin, PathMixin, Module, MatlabObject):
570
570
  self.extra["mkdocstrings"] = {"template": "folder.html.jinja"}
571
571
 
572
572
  def __repr__(self) -> str:
573
- return f"Folder({self.filepath!r})"
573
+ return f"Folder({self.path!r})"
574
574
 
575
575
  @property
576
576
  def namespaces(self) -> dict[str, "Namespace"]:
@@ -99,7 +99,7 @@ Context:
99
99
  {% endif %}
100
100
  {% endwith %}
101
101
 
102
- {% if config.show_submodules or obj.is_folder %}
102
+ {% if config.show_subnamespaces or obj.is_folder %}
103
103
  {% with modules = obj.modules|filter_objects(
104
104
  filters=config.filters,
105
105
  members_list=members_list,
@@ -153,7 +153,7 @@ Context:
153
153
  {% include function|get_template with context %}
154
154
  {% endwith %}
155
155
 
156
- {% elif (child.is_namespace and config.show_submodules) or obj.is_folder %}
156
+ {% elif (child.is_namespace and config.show_subnamespaces) or obj.is_folder %}
157
157
  {% with module = child %}
158
158
  {% include module|get_template with context %}
159
159
  {% endwith %}
@@ -30,7 +30,7 @@ Context:
30
30
  {% set show_full_path = config.show_object_full_path %}
31
31
  {% endif %}
32
32
 
33
- {% set module_name = module.path if show_full_path else module.name %}
33
+ {% set module_name = module.path + ".*" if show_full_path else module.name + ".*" %}
34
34
 
35
35
  {% if not root or config.show_root_heading %}
36
36
  {% filter heading(