Skip to content

[RFC] changing python type by a term definition in docstring #6698

@massich

Description

@massich

In the following docstring instead of using the python type as description, could we use a glossary term instead?

dig : list of dict | None
The Polhemus digitization data in head coordinates.
See Notes for more information.

Or maybe we should keep the python type and link the term in the description.

    dig : list of dict | None
        The Polhemus :term:`digitization` data in head coordinates.
        See Notes for more information.

WDYT?

cc: @drammock, @larsoner, @agramfort

Maybe something like this could work:

numpydoc_xref_aliases = {
    'Popen': 'python:subprocess.Popen',
    'file-like': ':term:`file-like <python:file object>`',
    ...
    # MNE
    'Label': 'mne.Label', 'Forward': 'mne.Forward', 'Evoked': 'mne.Evoked',
    ...
    'Transform': 'mne.transforms.Transform',
    # MNE-terms
    'digitization': ':term:`digitization`',
}

Suggested term

digitization (abbr. dig)
digpoint

Suggested definition

digitization: list of digpoints
digpoint: Dictionary contaning Polhemus digitization data (kind, identifier, position, and coord_frame)

@drammock feel free to rephrase the whole thing ;) (or push me to do it)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions