Skip to content

watermarkhu/mkdocstrings-matlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

90 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

mkdocstrings-matlab

A MATLAB handler for mkdocstrings.

Qualify documentation pypi version

The MATLAB handler uses maxx to collect documentation from MATLAB source code, which in turn uses Tree-sitter and its MATLAB parser.

You can install this handler by specifying it as a dependency:

# PEP 621 dependencies declaration
# adapt to your dependencies manager
[project]
dependencies = [
    "mkdocstrings-matlab>=0.X.Y",
]

Features

  • ๐Ÿค– Data collection from source code: collection of the object-tree and the docstrings is done thanks to Tree-sitter.

  • โœจ Support for argument validation blocks: Tree-sitter collects your function and method argument validation blocks to display input and output argument types and default values. It is even able to automatically add cross-references to other objects from your API, and links to MathWorks documentation are generated for MATLAB builtin classes.

  • ๐Ÿ” Recursive documentation of MATLAB namespaces and folders: just add + to the identifer for namespaces or the relative path for folder, and you get documentation for the entire directory. You don't need to inject documentation for each class, function, and script. Additionaly, the directory documentation will be either extracted from the Contents.m or the readme.md file at the root of the namespace or folder.

  • ๐Ÿ“„ Multiple docstring-styles support: common support for Google-style, Numpydoc-style, and Sphinx-style docstrings. See Griffe's documentation on docstrings support.

  • โš ๏ธ Admonition support in Google docstrings: blocks like Note: or Warning: will be transformed to their admonition equivalent. We do not support nested admonitions in docstrings!

  • ๐Ÿ”— Every object has a TOC entry: we render a heading for each object, meaning MkDocs picks them into the Table of Contents, which is nicely displayed by the Material theme. Thanks to mkdocstrings cross-reference ability, you can reference other objects within your docstrings, with the classic Markdown syntax: [this object][namespace.subnamespace.object] or directly with [namespace.subnamespace.object][]

  • ๐Ÿ“บ Source code display: mkdocstrings can add a collapsible div containing the highlighted source code of the MATLAB object.

About

๐Ÿ“˜ A MATLAB handler for mkdocstrings, automatic documentation from sources

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors 4

  •  
  •  
  •  
  •