Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This package contains the MATLAB Sphinx domain and autodoc extensions.

Installation

Use Pip, Setuptools Easy Install or Python Distributions Utilities (Distutils).

Pip:

~$ pip install -U sphinxcontrib-matlabdomain

Easy Install:

~$ easy_install -U sphinxcontrib-matlabdomain

Distutils:

~/downloads$ curl https://pypi.python.org/packages/source/s/sphinxcontrib-matlabdomain/sphinxcontrib-matlabdomain-0.X.tar.gz
~/downloads$ tar -xf sphinxcontrib-matlabdomain-0.X.tar.gz
~/downloads$ cd sphinxcontrib_matlabdomain-0.X
~/downloads/sphinxcontrib_matlabdomain-0.X$ python setup.py install

Requirements

This package is an extension to Sphinx.

Usage

In general usage is the same as for documenting Python code.

Configuration

In your Sphinx conf.py file add sphinxcontrib.matlab to the list of extensions. To use auto-documentation features, also add sphinx.ext.autodoc to the list of extensions.

In order for the Sphinx MATLAB domain to auto-document MATLAB source code, set the config value of matlab_src_dir to the absolute path instead of adding them to sys.path. Currently only one MATLAB path can be specified, but all subfolders in that tree will be searched.

For convenience the primary domain can be set to mat.

Roles and Directives

Please see Sphinx Domains and sphinx.ext.autodoc for documentation on the use of roles and directives. MATLAB code can be documented using the following roles and directives:

Directive

MATLAB object

.. module:: foldername

folders, packages and namespaces

.. curremtmodule:: foldername

  • set folder but do not link

.. automodule:: foldername

  • auto-document

:mod:`foldername`

  • reference

.. function:: funcname

function definition and signature

.. autofunction:: funcname()

  • auto-document

:func:`funcname`

  • reference

.. class:: classname()

class definition and optional signature

.. autoclass:: classname

  • auto-document

:class:`classname`

  • reference

.. method:: methname()

method definition and signature

.. automethod:: methname

  • auto-document

:meth:`methname`

  • reference

.. staticmethod:: statmethname()

static method definition and signature

.. automethod:: statmethname

  • auto-document

:meth:`methname`

  • reference

.. attribute:: attrname

property definition

.. autoattribute:: attrname

  • auto-document

:attr:`attrname`

  • reference

Several options are available for auto-directives.

  • :members: auto-document public members

  • :show-inheritance: list bases

  • :undoc-members: document members without docstrings

  • :annotation: specifies attribute annotation instead of default

There are also several config values that can be set in conf.py that will affect auto-docementation.

  • autoclass_content can be set to class, both or init, which determines which docstring is used for classes. The constructor docstring is used when this is set to init.

  • autodoc_member_order can be set to alphabetical, groupwise or bysource.

  • autodoc_default_flags can be set to a list of options to apply. Use the no-flag directive option to disable this config value once.

Example: given the following MATLAB source in folder test_data:

classdef MyHandleClass < handle & my.super.Class
    % a handle class
    %
    % :param x: a variable

    %% some comments
    properties
        x % a property
    end
    methods
        function h = MyHandleClass(x)
            h.x = x
        end
        function x = get.x(obj)
        % how is this displayed?
            x = obj.x
        end
    end
    methods (Static)
        function w = my_static_function(z)
        % A static function in :class:`MyHandleClass`.
        %
        % :param z: input z
        % :returns: w

            w = z
        end
    end
end

Use the following to document:

Test Data
=========
This is the test data module.

.. automodule:: test_data

:mod:`test_data` is a really cool module.

My Handle Class
---------------
This is the handle class definition.

.. autoclass:: MyHandleClass
    :show-inheritance:
    :members:

Online Demo

The test docs in the repository are online here: http://bwanamarko.alwaysdata.net/matlabdomain/

Users

Changes

Metadata

Release files for sphinxcontrib-matlabdomain 0.2.8.dev20171123

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinxcontrib-matlabdomain 0.2.8.dev20171123
File Size Uploaded Provenance
sphinxcontrib-matlabdomain-0.2.8.dev20171123.tar.gz 31.4 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for sphinxcontrib-matlabdomain 0.2.8.dev20171123
File Interpreter ABI Platform
sphinxcontrib_matlabdomain-0.2.8.dev20171123-py3-none-any.whl Python 3 none any Details
sphinxcontrib_matlabdomain-0.2.8.dev20171123-py2-none-any.whl Python 2 none any Details

Total release size: 99.3 kB

Release files / sphinxcontrib-matlabdomain-0.2.8.dev20171123.tar.gz

Download URL sphinxcontrib-matlabdomain-0.2.8.dev20171123.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
786eb8b978e52c87e90600857b10eab439108b32a491435b8ef26a679b073a73
BLAKE2b-256 checksum
How to use checksums
e511181f3fc15ef93f0b28a30d4339d547baa183c4d08f434b79e65ccef8138b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sphinxcontrib_matlabdomain-0.2.8.dev20171123-py3-none-any.whl

Download URL sphinxcontrib_matlabdomain-0.2.8.dev20171123-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c4b1c6666e2a7f1b2b97c4a352f330adb12a9abc4975421fcf31eb49d19b093
BLAKE2b-256 checksum
How to use checksums
7c43e0aac7650cbb49b905e7e0f0718558a2fbd51b1d2c1ea9a8a70fd840d840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sphinxcontrib_matlabdomain-0.2.8.dev20171123-py2-none-any.whl

Download URL sphinxcontrib_matlabdomain-0.2.8.dev20171123-py2-none-any.whl
Size 33.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
5c7db2e5d55a4bc3b1981374532936778548d02ca4b899cd112d902a8cfd0403
BLAKE2b-256 checksum
How to use checksums
73c9f34c0a44f32b2a5f9a320514bdea16e91ffc08c95555df974683adb447a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for sphinxcontrib-matlabdomain 0.2.8.dev20171123

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page