-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autosummary lists functions but does not generate documentation pages #11998
Comments
A workaround is to copy the original template to --- module.rst
+++ module.rst
@@ -18,6 +18,7 @@
.. rubric:: {{ _('Functions') }}
.. autosummary::
+ :toctree:
{% for item in functions %}
{{ item }}
As a downside, the custom template copies a lot of unchanged code, which does not get updates if you update sphinx. Should I create a pull request? Is this the right place to fix, and are there other items like classes/methods where this also need to be applied? |
@aeisenbarth could you link to a sample documentation project that does offer hyperlinked function documentation? (preferably one with an open source license, to make it easier to compare the configuration details) |
After further inspection, I am not sure whether there is some extra build process on top of what is specified in conf.py, when projects are hosted on readthedocs? (maybe sphinx-autoapi) Others (xarray) explicitly specify every item. I didn't observe projects that use autosummary to summarize unclickable items, but not document the items in some way. It seems to be desirable to document them. The question is maybe whether autosummary should do it by default or rather not. |
…file to get the functions to be clickable per sphinx-doc/sphinx#11998.
* Changes URL for coding standards to point to the METplus wrappers contributors guide coding standards. * Changes wording from build to make to be consistent with experience using newer sphinx. * Changes to allow autosummary to work and document the diagnostics submodule. * Adds new menu entry for the diagnostics submodule. * RST file for autosummary to use, with change from default module.rst file to get the functions to be clickable per sphinx-doc/sphinx#11998. * RST file for the diagnostic submodule. * Adds the generated directory from sphinx in the diag_api subdirectory to the gitignore. * Adds a new land_surface diagnostic file to contain functions for land/surface applications. * Adds __pycache__ to gitignore. * Adds sphinx execution times RST file to gitignore. * Removes cruft from testing, adds exception raising, and updates docstring formatting to match Sphinx https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html. * Restructure function to handle invalid types. This may not be the right way to do this. * Removes erroneous menu entries from testing documentation. * Adds test for calc_tci function and test data. * Adds Xarray and Pandas dependencies for building documentation, and lifts Python version for building documentation from 3.8 to 3.10. * Adds TCI test to the unit test config. * Changes name to remove API. * Trying to get GHA to run. * Updating pandas/xarray versions. * Double equals. * Changes RST heading level and adds description of the diagnostic reference. * Moves the diagnostic calculation reference to a sub-menu within the User's Guide. * Testing failure when readthedocs reports a warning. * Adds back xarray readthedocs requirement. * Update docs/Contributors_Guide/index.rst Co-authored-by: Julie Prestopnik <jpresto@ucar.edu> * Adds reference for function. * Adds bool for turning on/off the pandas and xarray tests. * Adds new skipna argument to the function, which is passed to pandas and xarray. The default is set to True, but a user can override if they wish. * Renames diag_api directory to diag_ref. * Renames testing file for land_surface diagnostics to support additional land_surface diagnostics in the future. * Turns on the Sphinx napoleon extension to support Google and NumPy docstrings and re-writes the docstring using Google format. * Updates Google docstring to acheive desired formatting. * Adds dunder init file. * Renames hyperlink and menu entry. * Changed a directory name and forgot to update the ignore file. * Removes directory not intended to be in repository. --------- Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
Describe the bug
When using autosummary with recursion, functions in the summaries are not clickable while modules are. There is no page with full documentation generated for each function.
I see that other projects have full documentation of their functions, and I assume this is the wanted behavior. I also don't see other projects having extra stub generating scripts besides
autosummary_generate = True
.Actual behavior
Function is not clickable
Expected behavior
Function is clickable
How to Reproduce
my_module.py
conf.py
index.rst
Environment Information
Sphinx extensions
["sphinx.ext.autosummary"]
Additional context
No response
The text was updated successfully, but these errors were encountered: