@@ -104,65 +104,82 @@ def setup(app):
104104 getattr (traits , alias ).__module__ = "ctapipe.core.traits"
105105
106106
107+ def add_reference_type (prefix , objs ):
108+ return [(prefix , o ) for o in objs ]
109+
110+
107111# These links are ignored in the checks, necessary due to broken intersphinx for
108112# these
109- nitpick_ignore = [
110- # needed for building the docs with python 3.11 locally.
111- # we use the lowest supported version on readthedocs,
112- # so that is what we use in the intersphinx link above
113- ("py:class" , "enum.StrEnum" ),
114- # these are coming from traitlets:
115- ("py:class" , "t.Union" ),
116- ("py:class" , "t.Any" ),
117- ("py:class" , "t.Dict" ),
118- ("py:class" , "t.Optional" ),
119- ("py:class" , "t.Type" ),
120- ("py:class" , "t.List" ),
121- ("py:class" , "t.Tuple" ),
122- ("py:class" , "t.Sequence" ),
123- ("py:class" , "Config" ),
124- ("py:class" , "traitlets.config.configurable.Configurable" ),
125- ("py:class" , "traitlets.traitlets.HasTraits" ),
126- ("py:class" , "traitlets.traitlets.HasDescriptors" ),
127- ("py:class" , "traitlets.traitlets.TraitType" ),
128- ("py:class" , "traitlets.traitlets.BaseDescriptor" ),
129- ("py:class" , "traitlets.traitlets.List" ),
130- ("py:class" , "traitlets.traitlets.Container" ),
131- ("py:class" , "traitlets.traitlets.Instance" ),
132- ("py:class" , "traitlets.traitlets.ClassBasedTraitType" ),
133- ("py:class" , "traitlets.traitlets.Int" ),
134- ("py:class" , "traitlets.config.application.Application" ),
135- ("py:class" , "traitlets.utils.sentinel.Sentinel" ),
136- ("py:class" , "traitlets.traitlets.ObserveHandler" ),
137- ("py:class" , "traitlets.traitlets.T" ),
138- ("py:class" , "traitlets.traitlets.G" ),
139- ("py:class" , "Sentinel" ),
140- ("py:class" , "ObserveHandler" ),
141- ("py:class" , "dict[K, V]" ),
142- ("py:class" , "G" ),
143- ("py:class" , "K" ),
144- ("py:class" , "V" ),
145- ("py:class" , "StrDict" ),
146- ("py:class" , "ClassesType" ),
147- ("py:class" , "re.Pattern" ),
148- ("py:class" , "re.Pattern[t.Any]" ),
149- ("py:class" , "astropy.coordinates.baseframe.BaseCoordinateFrame" ),
150- ("py:class" , "astropy.table.table.Table" ),
151- ("py:class" , "eventio.simtel.simtelfile.SimTelFile" ),
152- ("py:class" , "ctapipe.compat.StrEnum" ),
153- ("py:class" , "ctapipe.compat.StrEnum" ),
154- ("py:obj" , "traitlets.traitlets.T" ),
155- ("py:obj" , "traitlets.traitlets.G" ),
156- ("py:obj" , "traitlets.traitlets.S" ),
157- ("py:obj" , "traitlets.config.boolean_flag" ),
158- ("py:obj" , "traitlets.TraitError" ),
159- ("py:obj" , "-v" ), # fix for wrong syntax in a traitlets docstring
160- ("py:obj" , "cls" ),
161- ("py:obj" , "name" ),
162- ("py:meth" , "MetaHasDescriptors.__init__" ),
163- ("py:meth" , "HasTraits.__new__" ),
164- ("py:meth" , "BaseDescriptor.instance_init" ),
165- ]
113+ nitpick_ignore = add_reference_type (
114+ "py:class" ,
115+ [
116+ "enum.StrEnum" ,
117+ "t.Union" ,
118+ "t.Any" ,
119+ "t.Dict" ,
120+ "t.Optional" ,
121+ "t.Type" ,
122+ "t.List" ,
123+ "t.Tuple" ,
124+ "t.Sequence" ,
125+ "Config" ,
126+ "traitlets.config.configurable.Configurable" ,
127+ "traitlets.traitlets.HasTraits" ,
128+ "traitlets.traitlets.HasDescriptors" ,
129+ "traitlets.traitlets.TraitType" ,
130+ "traitlets.traitlets.BaseDescriptor" ,
131+ "traitlets.traitlets.List" ,
132+ "traitlets.traitlets.Container" ,
133+ "traitlets.traitlets.Instance" ,
134+ "traitlets.traitlets.ClassBasedTraitType" ,
135+ "traitlets.traitlets.Int" ,
136+ "traitlets.config.application.Application" ,
137+ "traitlets.utils.sentinel.Sentinel" ,
138+ "traitlets.traitlets.ObserveHandler" ,
139+ "traitlets.traitlets.T" ,
140+ "traitlets.traitlets.G" ,
141+ "Sentinel" ,
142+ "ObserveHandler" ,
143+ "dict[K, V]" ,
144+ "G" ,
145+ "K" ,
146+ "V" ,
147+ "StrDict" ,
148+ "ClassesType" ,
149+ "re.Pattern" ,
150+ "re.Pattern[t.Any]" ,
151+ "astropy.coordinates.baseframe.BaseCoordinateFrame" ,
152+ "astropy.table.table.Table" ,
153+ "eventio.simtel.simtelfile.SimTelFile" ,
154+ "ctapipe.compat.StrEnum" ,
155+ "ctapipe.compat.StrEnum" ,
156+ ],
157+ )
158+ nitpick_ignore += add_reference_type (
159+ "py:obj" ,
160+ [
161+ # needed for building the docs with python 3.11 locally.
162+ # we use the lowest supported version on readthedocs,
163+ # so that is what we use in the intersphinx link above
164+ # these are coming from traitlets:
165+ "traitlets.traitlets.T" ,
166+ "traitlets.traitlets.G" ,
167+ "traitlets.traitlets.S" ,
168+ "traitlets.config.boolean_flag" ,
169+ "traitlets.TraitError" ,
170+ "-v" , # fix for wrong syntax in a traitlets docstring
171+ "cls" ,
172+ "name" ,
173+ ],
174+ )
175+ nitpick_ignore += add_reference_type (
176+ "py:meth" ,
177+ [
178+ "MetaHasDescriptors.__init__" ,
179+ "HasTraits.__new__" ,
180+ "BaseDescriptor.instance_init" ,
181+ ],
182+ )
166183
167184# Sphinx gallery config
168185
@@ -379,15 +396,18 @@ def setup(app):
379396# Grouping the document tree into Texinfo files. List of tuples
380397# (source start file, target name, title, author,
381398# dir menu entry, description, category)
399+ description = (
400+ "Experimental Data Analysis for the"
401+ " Cherenkov Telescope Array Observatory (CTAO)."
402+ )
382403texinfo_documents = [
383404 (
384405 master_doc ,
385406 "ctapipe" ,
386407 "ctapipe Documentation" ,
387408 author ,
388409 "ctapipe" ,
389- "Experimental Data Analysis for the"
390- "Cherenkov Telescope Array Observatory (CTAO)." ,
410+ description ,
391411 "Science" ,
392412 )
393413]
0 commit comments