Skip to content

Commit c1cb5b7

Browse files
committed
add some of astropy’s glossary
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
1 parent 4095608 commit c1cb5b7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sphinx_astropy/conf/v1.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,30 @@ def check_sphinx_version(expected_version):
116116
"mapping": ":term:`python:mapping`",
117117
}
118118

119+
# Aliases to Astropy's glossary. In packages these can be turned on with
120+
# ``numpydoc_xref_aliases.update(numpydoc_xref_aliases_astropy_glossary)``
121+
# (if astropy is in the intersphinx mapping).
122+
numpydoc_xref_aliases_astropy_glossary = {} # works even if older astropy
123+
if float(astropy.__version__[:3]) >= 4.3:
124+
numpydoc_xref_aliases_astropy_glossary = {
125+
# general
126+
"-like": ":term:`astropy:-like`",
127+
# "number": ":term:`number`",
128+
# "writable": ":term:`writable file-like object`",
129+
# "readable": ":term:`readable file-like object`",
130+
# coordinates
131+
"angle-like": ":term:`astropy:angle-like`",
132+
"coordinate-like": ":term:`astropy:coordinate-like`",
133+
"frame-like": ":term:`astropy:frame-like`",
134+
# units
135+
"unit-like": ":term:`astropy:unit-like`",
136+
"quantity-like": ":term:`astropy:quantity-like`",
137+
# table
138+
"table-like": ":term:`astropy:table-like`",
139+
# time
140+
"time-like": ":term:`astropy:time-like`",
141+
}
142+
119143
# Aliases to Astropy's physical types. In packages these can be turned on with
120144
# ``numpydoc_xref_aliases.update(numpydoc_xref_aliases_astropy_physical_type)``
121145
# (if astropy is in the intersphinx mapping).

0 commit comments

Comments
 (0)