Skip to main content

A MATLAB handler for mkdocstrings

Project description

mkdocstrings-matlab

A MATLAB handler for mkdocstrings.

qualify documentation pypi version

The MATLAB handler uses Tree-sitter and its MATLAB parser to collect documentation from MATLAB source code. The AST information are imported as custom Griffe objects and mocked for the python handler.

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.

  • 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.

  • Support for documented properties: properties definitions followed by a docstring will be recognized in classes.

  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocstrings_matlab-0.9.7.tar.gz (364.7 kB view details)

Uploaded Source

Built Distribution

mkdocstrings_matlab-0.9.7-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocstrings_matlab-0.9.7.tar.gz.

File metadata

File hashes

Hashes for mkdocstrings_matlab-0.9.7.tar.gz
Algorithm Hash digest
SHA256 18534f8a74c48847e51b4b8fb172ca83ff22f791af29e2c471f7aac62f4095d0
MD5 73683c41e3a6a7a3b5be7381d74b3809
BLAKE2b-256 5c4c06f0ab5d8c029f20914336fd0fb1e37458802082633489344c989d406e98

See more details on using hashes here.

File details

Details for the file mkdocstrings_matlab-0.9.7-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocstrings_matlab-0.9.7-py3-none-any.whl
Algorithm Hash digest
SHA256 45b4c9946c32a992c3ff51254db038c19bf37b3852d3600c18c34eb21b54d26d
MD5 cda9ac6bb6587d80e051da86037d6341
BLAKE2b-256 4207e59cf429dc51c3a2bf9d010881a43a41bd76d548e995ab8a6f8e17263e86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page