Remove redundant docstrings in child classes
tms-bananaquit opened this issue · 1 comments
tms-bananaquit commented
Python 3.5 (and potentially my IDE) fixed the problem I was seeing where inherited docstrings didn't work, so we don't need to dupe them anymore to get proper display in both RTD and an IDE.
- add
"inherited-members": True
to conf.py - remove attributes inherited from
drift_detector
from each docstring -- double-check that this works properly. - remove methods that are only overwriting parent classes for the purposes of the docstring
- ADWINacc
- kdq-tree?
- HDM/HDDDM/CDBD
- remove test_adwin_acc redundant tests (all but the first)
- confirm that the docs build properly and that docstring lookup is functional for child classes
tms-bananaquit commented
Started working on this in PR #85 .
The reason we didn't do this in the first place is that:
- :inherited-members: should cause display of the class attributes in the children. It doesn't. So, we have to include them redundantly in the child classes in order to show them. But, then sphinx-build complains that the attributes are repeated. The only option to suppress that warning is to add :noindex: to one of the .rst files, but our files are not static, because everything except
index.rst
is constructed at build time. - The volume of the warnings (3 per detector class) is enough that it'd be easy to miss relevant warnings along the way.
What we trade for getting annoying warnings during doc build is fewer redundant unit tests and not having to maintain redundant code, while also not having to maintain the static .rst files.