Skip to content

Add public API consistency test - #93

Merged
vc1492a merged 3 commits into
sklearn-api-compliancefrom
feat/api-regression-test
Sep 22, 2026
Merged

vc1492a merged 3 commits into
sklearn-api-compliancefrom
feat/api-regression-test

Conversation

@SaritNike

Copy link
Copy Markdown
Collaborator

To ensure that any future work where we have to change names of functions or attributes do not break our existing API unintentionally, I have added a public API test. If we now change something, like renaming a variable our test will break and remind us that we have to either offer some kind of backward compatible solution or release an intermediate version first, where we provide deprecation warnings.
This is just a guard against unintentional breakage. Once we take the appropriate measures, we are of course free to always edit the test to match a new API.

@SaritNike
SaritNike requested a review from vc1492a September 4, 2026 21:08
@SaritNike SaritNike added the test Anything regarding testing label Sep 4, 2026
@vc1492a
vc1492a changed the base branch from main to sklearn-api-compliance September 22, 2026 17:28
vc1492a and others added 2 commits September 22, 2026 10:29
Translate SaritNike's contract test from the 0.4.0 constructor to the
scikit-learn-style API: configuration-only constructor, data passed to
fit(X, y=None, ...), _-suffixed fitted attributes with their read-only
legacy aliases, the sklearn outlier methods, get_params() keys, the LoOP
alias, and the exception classes now defined in PyNomaly.exceptions and
re-exported from PyNomaly.loop. The structure and intent of the original
test are kept; cluster_labels_u is dropped from the expected attributes
because it became private (_cluster_labels_u) in 1.0.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vc1492a
vc1492a merged commit 43ea6e4 into sklearn-api-compliance Sep 22, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Anything regarding testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants