Skip to content

[BUG] fix missing Cauchy import in distributions __init__ - #1122

Open
Ashish-Kumar-Dash wants to merge 1 commit into
sktime:mainfrom
Ashish-Kumar-Dash:bug/cauchy-registration
Open

[BUG] fix missing Cauchy import in distributions __init__#1122
Ashish-Kumar-Dash wants to merge 1 commit into
sktime:mainfrom
Ashish-Kumar-Dash:bug/cauchy-registration

Conversation

@Ashish-Kumar-Dash

Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

Cauchy is listed in skpro/distributions/__init__.py __all__, and the class exists in cauchy.py, but the corresponding import line was missing. As a result from skpro.distributions import Cauchy raised ImportError, the class was effectively unreachable through the public API.

  • Add the missing from skpro.distributions.cauchy import Cauchy.
  • Add a regression test asserting every name in __all__ is importable from the package, so this class of __all__/import drift is caught for any distribution, not just Cauchy.

Does your contribution introduce a new dependency? If yes, which one?

No.

Did you add any tests for the change?

Yes, distributions/tests/test_registration.py::test_all_names_importable. It fails before the fix (missing: ['Cauchy']) and passes after.

`Cauchy` was listed in `__all__` but its import line was missing from
`skpro/distributions/__init__.py`, so `from skpro.distributions import Cauchy`
raised ImportError although the class existed in `cauchy.py`.

Add the import, and a regression test asserting every name in `__all__` is
importable from the package (guards the whole class of __all__/import drift).
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.

2 participants