[RFC] changing python type by a term definition in docstring
See original GitHub issueIn the following docstring instead of using the python type as description, could we use a glossary term instead?
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)
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Documenting Python APIs with Docstrings
'Parameters' is a description of a function or method's arguments and their respective types. Parameters should be listed in the same order as...
Read more >Specify types with docstrings | PyCharm Documentation
Generate reference documentation. Specify types with docstrings. Legacy type syntax for docstrings. Type hinting in PyCharm. Pattern matching.
Read more >PEP 287 – reStructuredText Docstring Format
This PEP proposes that the reStructuredText markup be adopted as a standard markup format for structured plaintext documentation in Python ...
Read more >Python Docstrings (With Examples) - Programiz
Python docstrings are the string literals that appear right after the definition of a function, method, class, or module. Let's take an example....
Read more >Python Style Guide Update: PEP 8, flake8 & Numpydoc
What does this Numpydoc change mean? RFC-214 has essentially given DM developers permission to use the Numpydoc format for docstrings. That is, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

sounds good !
+1 to add a “digitization” entry in glossary
in the place you point to we should not mention Polhemus. it’s not the only system to get a valid digitization.
Whoops I mean #6461