Closed pllim closed 1 year ago
I am working on improving the API docs a lot.
I am currently experimenting with the Gaussian
class, which on here you can see how has a description:
https://pyautogalaxy.readthedocs.io/en/latest/api/api.html
I achieved this by having an additional class-level docstring above the __init__
method.
My question is do you know why the methods (e.g. angle_to_profile_grid_from
) are not being given URL links? I guess the Sphinx build is not doing to this level of detail, but I cannot find a way to fix this.
I want it to be that by clicking each method you are taken to another URL / webpage with the docstring fully built (including descriptions of the parameters).
At the very least, it shoudl take one to the source code.
Any ideas why I've vfailed to achieve this?
I think that is because that method is inherited from here:
And the parent class does not have its API doc rendered. To have proper links, you have to render the parent. Otherwise, you can also tell Sphinx to not inherit docstring. Hope this helps!
Fixed, by changing some sphinx setup parameters and using a class template:
https://pyautogalaxy.readthedocs.io/en/latest/api/light.html
I will be working on the API docs in general over the next week or so, but this specific issue is fixed.
At the time of posting this issue, the right column in https://pyautogalaxy.readthedocs.io/en/latest/api/api.html is empty. I think this is because your class docstring is buried under
__init__
. Consider moving it to the class-level docstring for it to render properly.https://github.com/astropy/astropy.github.com/pull/491#issuecomment-1215349065