jjrob / MGET

Marine Geospatial Ecology Tools
Other
0 stars 0 forks source link

On PublicAPI page, the description is not showing up for GeoEco.DataManagement.ArcGISRasters #3

Open jjrob opened 1 week ago

jjrob commented 1 week ago

See here:

image

It is not immediately obvious why this is happening. The ModuleMetadata for the module contains a ShortDescription just like like any other module.

jjrob commented 1 day ago

Apparently this problem occurs when the same restructuredText hyperlink appears in two different docstrings, but it is not written as an "anonymous" hyperlink. For example, The problem with the GeoEco.DataManagement.ArcGISRasters module was that both it and the GeoEco.DataManagement.ArcGISRasters.ArcGISRasters class had the following RST hyperlink in their docstrings:

`arcpy <https://www.esri.com/en-us/arcgis/products/arcgis-python-libraries/libraries/arcpy>`_

Note how the RST hyperlink ends in a single _ character, which makes it a non-anonymous hyperlink. By making it an anonymous hyperlink by ending it in two _ characters, i.e. __ as shown below, the problem goes away.

`arcpy <https://www.esri.com/en-us/arcgis/products/arcgis-python-libraries/libraries/arcpy>`__

I do not fully grasp why this happens, but apparently I should have been writing anonymous hyperlinks all along throughout the documentation. Apparently, to prevent this from happening in other places, we should global search and replace the single _ hyperlink with the double __ hyperlink. Obviously this must be done extremely carefully.

(Note, the issue was not that the module and the class were both named ArcGISRasters. This problem came up in other situations where that did not occur.)