[MNT] Add CI test for correct API entries - #3750
Conversation
Thank you for contributing to
|
bc16720 to
2096e77
Compare
TonyBagnall
left a comment
There was a problem hiding this comment.
This looks useful and it has already picked up some missing API entries. One query thoug: currently if name not in doc_contents only checks whether the estimator name occurs anywhere in the API docs. That could pass if an estimator is mentioned in prose, or if its name is a substring of another estimator, without it actually being added to an autosummary.
Could it instead collect the stripped lines from the API reference files and require the estimator name to match a line exactly?
4f8a4d3 to
0aefa49
Compare
|
Done! Updated the test to use exact line matching instead of a global substring search. Tests pass successfully |
|
One small thing before approval: the test still checks if name not in doc_contents, so an estimator could pass if its name only appears in prose or as a substring of another estimator. Could we instead collect the stripped lines from the API reference files and require an exact match for each estimator name? That would more directly test that every estimator actually has an API reference entry. |
|
Hey @TonyBagnall, this is already done! Commit 0aefa49 updated the test to collect doc_lines = {line.strip() ...} and check if name not in doc_lines: so it strictly enforces exact line matching. |
Reference Issues/PRs
Fixes #3479
What does this implement/fix? Explain your changes.
This PR adds a CI test to ensure that all public estimators in
aeonare documented indocs/api_reference/.Key changes:
aeon/testing/tests/test_api_reference.pywhich dynamically checks that all estimators returned byall_estimators()are listed in the.rst/.mdfiles underdocs/api_reference/. It skips gracefully if run in packaged environments where thedocsdirectory is not present.CollectionToSeriesWrapperindocs/api_reference/transformations.mdRandomOverSamplerindocs/api_reference/transformations.mdTimeSeriesAgglomerativeindocs/api_reference/clustering.rstDoes your contribution introduce a new dependency? If yes, which one?
No.
Any other comments?
None.
PR checklist
For all contributions
For new estimators and functions
__maintainer__at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.For developers with write access