Skip to content
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

Reorganize the class members in the sphinx docs #87

Open
tms-bananaquit opened this issue Jul 22, 2022 · 0 comments
Open

Reorganize the class members in the sphinx docs #87

tms-bananaquit opened this issue Jul 22, 2022 · 0 comments

Comments

@tms-bananaquit
Copy link
Collaborator

tms-bananaquit commented Jul 22, 2022

It really seems like there ought to be a clear distinction between attributes, properties, and functions on RTD. The current settings for sphinx don't accomplish this.

In particular, drift_state, total_samples, samples_since_reset are common across all detectors, but to get them to display as inherited using the :inherit-members: option in sphinx, it was necessary to set them up as properties. Only drift_state really needs the validation enabled by the @property decorator, though.

The choice was between two evils: 2 of the 3 appearing in Attributes, redundantly specified in the child classes; or all 3 appearing as properties, documented only in the parents in drift_detector.

If there's a way around this that avoids static .rst files, that'd be fantastic. Otherwise, we may someday have to bite the bullet of maintaining those.

One option for ordering them in a particular way is to use the "member-order":"bysource" option in conf.py, so they'll be ordered according to the source code (seems easy to mess up!), but this still keeps the inherited properties at the bottom, so it's not a big potential improvement over groupwise at the moment.

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

No branches or pull requests

1 participant