Skip to content

Conversation

@TallJimbo
Copy link
Member

No description provided.

@TallJimbo TallJimbo force-pushed the tickets/DM-54027 branch 7 times, most recently from 5aaaee4 to 23d127e Compare February 3, 2026 17:04
@TallJimbo TallJimbo marked this pull request as ready for review February 3, 2026 17:06
Almost nobody knows that Sphinx normally pays no attention to your
import statements, and I didn't even notice the existing text on this
when I went to add new text on it.
.. note::
Attributes without default values (or some sort of ``= RHS``) are not
included in documentation *at all*, except for those on `~dataclasses.dataclass` types.
Important instance attributes that cannot have a class-level default value should be made into properties so they can be documented.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a really significant recommendation to be making about Python code style for something that seems like a limitation in the documentation build system, but I also don't really see that we have a much of a choice; not documenting public attributes doesn't really seem like a viable option, either.

This is not clear from the Sphinx output unless you know what you're
looking for, but nitpick mode complains if you don't use types.
[sphinx]
nitpick_ignore = [
["py:class", "T"], # type variables don't resolve
]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This recommendation works well enough for per-package builds, but I suspect it doesn't scale up to pipelines_lsst_io, and I'm not sure what to do about that. Maybe it's a moot point because it's hard to imagine pipelines_lsst_io ever running nitpick-clean.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. There is no way that nitpick is ever passing. (and now it's impossible because of the way the pybind11 docs from C++ aren't really known to sphinx).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants