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
DM-32820: Skip ButlerURI in table of contents #613
Conversation
f44e2e2
to
4ba2712
Compare
Codecov Report
@@ Coverage Diff @@
## main #613 +/- ##
=======================================
Coverage 83.78% 83.78%
=======================================
Files 231 231
Lines 29616 29616
Branches 4910 4910
=======================================
Hits 24813 24813
Misses 3672 3672
Partials 1131 1131 Continue to review full report at Codecov.
|
4ba2712
to
2c8b85e
Compare
ButlerURI is an alias for ResourcePath and this confusess sphinx, especially when building pipelines.lsst.io. Simplest to remove the toc entry completely. A class stub is given although this does not get linked.
2c8b85e
to
e3fa06e
Compare
@@ -100,6 +100,12 @@ Python API reference | |||
|
|||
.. automodapi:: lsst.daf.butler | |||
:no-main-docstr: | |||
:skip: ButlerURI | |||
|
|||
.. py:class:: lsst.daf.butler.ButlerURI(uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathansick This does work in the sense that some words appear, but it doesn't result in something that is clickable. Am I doing something wrong? The :skip:
fixes the pipelines.lsst.io build problem so it's not important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What automodapi does, once it detects the available symbols in a namespace, is create rst pages that in turn contain py:class
directives and so on. Then it creates an automodsumm in place of the automodapi while creates the click-able table of contents. I'm assuming that this ButlerURI documentation in lsst.daf.butler
is only temporary, so I don't think it's worth the trouble to fake the look of automodsumm.
Also note that if there are existing links in the documentation to methods of ButlerURI, you'd technically want to add those methods to your doc for ButlerURI. You'd do this by putting py:method
directives inside the scope of the py:class
directive. If there aren't such links, I wouldn't worry about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There aren't any links to methods, just the class. The docs do build fine with this change so I'll leave it. The plan is to do a global replacement of ButlerURI
with ResourcePath
so I'll leave it as is and merge this to solve the immediate problem of the pipelines.lsst.io build not working.
@@ -100,6 +100,12 @@ Python API reference | |||
|
|||
.. automodapi:: lsst.daf.butler | |||
:no-main-docstr: | |||
:skip: ButlerURI | |||
|
|||
.. py:class:: lsst.daf.butler.ButlerURI(uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What automodapi does, once it detects the available symbols in a namespace, is create rst pages that in turn contain py:class
directives and so on. Then it creates an automodsumm in place of the automodapi while creates the click-able table of contents. I'm assuming that this ButlerURI documentation in lsst.daf.butler
is only temporary, so I don't think it's worth the trouble to fake the look of automodsumm.
Also note that if there are existing links in the documentation to methods of ButlerURI, you'd technically want to add those methods to your doc for ButlerURI. You'd do this by putting py:method
directives inside the scope of the py:class
directive. If there aren't such links, I wouldn't worry about it.
Aliasing
ButlerURI
toResourcePath
works fine for code but breaks sphinx documentation building. Workaround this by removing the table of content entry.Checklist
doc/changes