Title: [Doc]: Suppress missing references through a ! prefix instead of missing_references extension. · Issue #28920 · matplotlib/matplotlib · GitHub
Open Graph Title: [Doc]: Suppress missing references through a ! prefix instead of missing_references extension. · Issue #28920 · matplotlib/matplotlib
X Title: [Doc]: Suppress missing references through a ! prefix instead of missing_references extension. · Issue #28920 · matplotlib/matplotlib
Description: Problem Our standard way to handle missing references is our missing_references extension, which specifies explicit error messages including line numbers inside missing_references.json. This is cumbersome because docstring edits can chan...
Open Graph Description: Problem Our standard way to handle missing references is our missing_references extension, which specifies explicit error messages including line numbers inside missing_references.json. This is cum...
X Description: Problem Our standard way to handle missing references is our missing_references extension, which specifies explicit error messages including line numbers inside missing_references.json. This is cum...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/28920
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Doc]: Suppress missing references through a ! prefix instead of missing_references extension.","articleBody":"### Problem\r\n\r\nOur standard way to handle missing references is our `missing_references` extension, which specifies explicit error messages including line numbers inside `missing_references.json`.\r\n\r\nThis is cumbersome because docstring edits can change the line numbers, requiring to adapt the `missing_references.json`.\r\n\r\n### Suggested improvement\r\n\r\nI just found out, that one can suppress references by prefixing with an exclamation mark. This seems undocumented but is used inside the sphinx docs, e.g. ``:class:`!MyClass` ``. I've opened an issue on that: https://github.com/sphinx-doc/sphinx/issues/12940.\r\n\r\nIf this is intended as a public feature on the sphinx side, I propose to switch to it and dump our missing references. This has several advantages:\r\n\r\n- The missing info is inlined, so that we can see in the sources whether the link will works or not.\r\n- We don't have problems with line number changes anymore.\r\n- When references vanish, e.g. by removal after deprecation, we don't have to change old references, e.g. in changelog to a literal role, but can simply prefix them with the exclamation mark.\r\n- It's still straight forward to get an overview of missing references by searching for `` `!``\r\n\r\n## Sprint task\r\n\r\nFor the following references, add a ! in front, e.g. ``:class:`MyClass` `` -\u003e ``:class:`!MyClass` ``\r\n\r\nWhen the reference is inside a method docstring, the method is listed in parenthesis, e.g. ``:class:`MyClass` `` (method)\r\n \r\n**To avoid merge conflicts, please choose 1 file to work on at a time and note it here**\r\n\r\n### doc/tutorials/\r\n* [X] **galleries/tutorials/artists.py:** #29080\r\n * :attr:`matplotlib.axes.Axes.patch`\r\n * :attr:`matplotlib.figure.Figure.patch`\r\n * :class:`matplotlib.backend_bases.FigureCanvas`\r\n * :class:`matplotlib.backend_bases.Renderer`\r\n * :attr:`matplotlib.figure.Figure.transFigure`\r\n * :attr:`matplotlib.axes.Axes.patches`\r\n * :attr:`matplotlib.axes.Axes.xaxis`\r\n * :attr:`matplotlib.axes.Axes.yaxis`\r\n### doc/users/ \n#29086\r\n* [X] **galleries/users/explain/figure/event_handling.py:**\r\n * :obj:`Rectangle.contains`\r\n * :obj:`Line2D.pick`\r\n* [X] **galleries/users/explain/figure/interactive.py:**\r\n * :obj:`ipykernel.pylab.backend_inline`\r\n* [X] **galleries/users/explain/figure/interactive_guide.py:**\r\n * :obj:`Artist.stale_callback`\r\n * :obj:`Figure.stale_callback`\r\n * :meth:`IPython.terminal.interactiveshell.TerminalInteractiveShell.inputhook`\r\n### doc/api/ \r\n* [x] **doc/api/toolkits/axisartist.rst:**\r\n * :class:`mpl_toolkits.axisartist.Axes`\r\n* [x] **doc/api/toolkits/mplot3d.rst:**\r\n * :attr:`mpl_toolkits.mplot3d.axis3d._axinfo`\r\n### lib/matplotlib/\r\n* [ ] **lib/matplotlib/axes/_axes.py:**\r\n * :meth:`matplotlib.collections._CollectionWithSizes.set_sizes` (matplotlib.axes._axes.Axes.barbs)\r\n * :obj:`ax.transAxes` (matplotlib.axes._axes.Axes.inset_axes)\r\n * :meth:`matplotlib.collections._MeshData.set_array` (matplotlib.axes._axes.Axes.pcolormesh)\r\n * :obj:`kde.factor` (matplotlib.axes._axes.Axes.violinplot)\r\n* [ ] **lib/matplotlib/axes/_base.py:**\r\n * :obj:`fmt_xdata` (matplotlib.axes._base._AxesBase.format_xdata)\r\n * :obj:`fmt_ydata` (matplotlib.axes._base._AxesBase.format_ydata)\r\n* [ ] **lib/matplotlib/backend_bases.py:**\r\n * :obj:`Timer` (matplotlib.backend_bases.FigureCanvasBase.new_timer)\r\n * :obj:`_iter_collection_raw_paths` (matplotlib.backend_bases.RendererBase.draw_path_collection)\r\n * :obj:`_iter_collection` (matplotlib.backend_bases.RendererBase.draw_path_collection)\r\n * :class:`matplotlib.backend_bases._Backend` (matplotlib.backend_bases.ShowBase)\r\n * :obj:`ToolContainer` (matplotlib.backend_bases.ToolContainerBase.remove_toolitem)\r\n* [ ] **lib/matplotlib/backend_tools.py:**\r\n * :obj:`toggled` (matplotlib.backend_tools.AxisScaleBase.disable)\r\n* [ ] **lib/matplotlib/backends/backend_agg.py:**\r\n * :obj:`draw_image` (matplotlib.backends.backend_agg.RendererAgg.option_scale_image)\r\n* [ ] **lib/matplotlib/backends/backend_cairo.py:**\r\n * :obj:`option_scale_image` (matplotlib.backends.backend_cairo.RendererCairo.draw_image)\r\n* [ ] **lib/matplotlib/backends/backend_pdf.py:**\r\n * :class:`matplotlib.backends._backend_pdf_ps.RendererPDFPSBase` (matplotlib.backends.backend_pdf.RendererPdf)\r\n* [ ] **lib/matplotlib/backends/backend_tkagg.py:**\r\n * :class:`matplotlib.backends._backend_tk.FigureCanvasTk` (matplotlib.backends.backend_tkagg.FigureCanvasTkAgg)\r\n* [ ] **lib/matplotlib/colorbar.py:**\r\n * :attr:`lines` (matplotlib.colorbar.Colorbar.add_lines)\r\n* [ ] **lib/matplotlib/dviread.py:**\r\n * :obj:`_read` (matplotlib.dviread.Vf)\r\n* [ ] **lib/matplotlib/image.py:**\r\n * :obj:`can_composite` (matplotlib.image.composite_images)\r\n * :obj:`make_image` (matplotlib.image.composite_images)\r\n* [ ] **lib/matplotlib/mlab.py:**\r\n * :obj:`kde.covariance_factor` (matplotlib.mlab.GaussianKDE)\r\n* [ ] **lib/matplotlib/patches.py:**\r\n * :class:`matplotlib.patches._Style` (matplotlib.patches.ArrowStyle)\r\n * :class:`matplotlib.patches.ArrowStyle._Curve` (matplotlib.patches.ArrowStyle.BarAB)\r\n * :class:`matplotlib.patches.ArrowStyle._Base` (matplotlib.patches.ArrowStyle.Fancy)\r\n * :class:`matplotlib.patches.ConnectionStyle._Base` (matplotlib.patches.ConnectionStyle.Angle3)\r\n* [ ] **lib/matplotlib/patheffects.py:**\r\n * :meth:`AbstractPathEffect._update_gc` (matplotlib.patheffects.SimpleLineShadow)\r\n* [ ] **lib/matplotlib/projections/geo.py:**\r\n * :class:`matplotlib.projections.geo._GeoTransform` (matplotlib.projections.geo.AitoffAxes.AitoffTransform)\r\n * :attr:`input_dims` (matplotlib.projections.geo.AitoffAxes.AitoffTransform.transform_non_affine)\r\n * :attr:`output_dims` (matplotlib.projections.geo.AitoffAxes.AitoffTransform.transform_non_affine)\r\n* [ ] **lib/matplotlib/pyplot.py:**\r\n * :obj:`Image` (matplotlib.pyplot.gci)\r\n* [ ] **lib/matplotlib/quiver.py:**\r\n * :meth:`_find_tails` (matplotlib.quiver.Barbs)\r\n * :meth:`_make_barbs` (matplotlib.quiver.Barbs)\r\n* [ ] **lib/matplotlib/scale.py:**\r\n * :attr:`name` (matplotlib.scale.ScaleBase)\r\n* [ ] **lib/matplotlib/testing/compare.py:**\r\n * :obj:`converter` (matplotlib.testing.compare.compare_images)\r\n* [ ] **lib/matplotlib/transforms.py:**\r\n * :attr:`height` (matplotlib.transforms.Bbox.bounds)\r\n * :attr:`width` (matplotlib.transforms.Bbox.bounds)\r\n * :attr:`min` (matplotlib.transforms.Bbox.p0)\r\n * :attr:`max` (matplotlib.transforms.Bbox.p1)\r\n * :attr:`xmin` (matplotlib.transforms.Bbox.x0)\r\n * :attr:`xmax` (matplotlib.transforms.Bbox.x1)\r\n * :attr:`ymin` (matplotlib.transforms.Bbox.y0)\r\n * :attr:`ymax` (matplotlib.transforms.Bbox.y1)\r\n * :class:`matplotlib.transforms._BlendedMixin` (matplotlib.transforms.BlendedAffine2D)\r\n* [ ] **lib/matplotlib/tri/_trirefine.py:**\r\n * :attr:`triangulation` (matplotlib.tri._trirefine.UniformTriRefiner.refine_triangulation)\r\n* [ ] **lib/matplotlib/widgets.py:**\r\n * :obj:`active` (matplotlib.widgets.AxesWidget)\r\n * :attr:`eventson` (matplotlib.widgets.CheckButtons.set_active)\r\n * :class:`matplotlib.widgets._SelectorWidget` (matplotlib.widgets.LassoSelector)\r\n### lib/mpl_toolkits/\r\n* [ ] **lib/mpl_toolkits/axes_grid1/anchored_artists.py:**\r\n * :attr:`matplotlib.axes.Axes.transData` (mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox)\r\n * :attr:`matplotlib.axes.Axes.transAxes` (mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows)\r\n* [ ] **lib/mpl_toolkits/axes_grid1/axes_grid.py:**\r\n * :attr:`cbar_axes` (mpl_toolkits.axes_grid1.axes_grid.ImageGrid)\r\n * :obj:`Size.from_any` (mpl_toolkits.axes_grid1.axes_grid.ImageGrid)\r\n* [ ] **lib/mpl_toolkits/axes_grid1/axes_size.py:**\r\n * :obj:`get_size` (mpl_toolkits.axes_grid1.axes_size)\r\n * :class:`mpl_toolkits.axes_grid1.axes_size._Base` (mpl_toolkits.axes_grid1.axes_size.Add)\r\n* [ ] **lib/mpl_toolkits/axisartist/axis_artist.py:**\r\n * :obj:`mpl_toolkits.axislines.Axes` (mpl_toolkits.axisartist.axis_artist)\r\n* [ ] **lib/mpl_toolkits/axisartist/axisline_style.py:**\r\n * :class:`mpl_toolkits.axisartist.axisline_style.AxislineStyle._Base` (mpl_toolkits.axisartist.axisline_style.AxislineStyle.SimpleArrow)\r\n* [ ] **lib/mpl_toolkits/mplot3d/axes3d.py:**\r\n * :attr:`fmt_zdata` (mpl_toolkits.mplot3d.axes3d.Axes3D.format_zdata)\r\n","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2024-10-01T21:03:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/28920/matplotlib/issues/28920"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c6867c77-b5a8-f9d6-6496-fc508c072692 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF52:1ED62B:DC8BFD:12B5C98:6A52174E |
| html-safe-nonce | 040226af5aee170d6dcd450cdf17016421450e761db0079b991c9d32b4ea5f2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjUyOjFFRDYyQjpEQzhCRkQ6MTJCNUM5ODo2QTUyMTc0RSIsInZpc2l0b3JfaWQiOiIyODgzNDM3NjkwNTAxNjAxMTAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 77fe786ec7062ca4fc6b33f9402d37a924fc4e414304da3b275f0bb860bcfb10 |
| hovercard-subject-tag | issue:2560212385 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/28920/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe30a40019ba7eb41bc42ed76f92c0d27dff9e081066f4d678fb87099cffc1c4/matplotlib/matplotlib/issues/28920 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe30a40019ba7eb41bc42ed76f92c0d27dff9e081066f4d678fb87099cffc1c4/matplotlib/matplotlib/issues/28920 |
| og:image:alt | Problem Our standard way to handle missing references is our missing_references extension, which specifies explicit error messages including line numbers inside missing_references.json. This is cum... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhoffm |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width