[MNT] Remove __version__.py, define __version__ in __init__.py#1661
[MNT] Remove __version__.py, define __version__ in __init__.py#1661moksha-hub wants to merge 3 commits intoopenml:mainfrom
Conversation
|
@geetu040 please have a review. |
|
@geetu040 please have a review if any changes are required i can work on them or move onto the next issue. |
geetu040
left a comment
There was a problem hiding this comment.
Sorry for the delayed response.
This PR currently fails CI. Please run the tests locally to see the issue:
pytest tests/test_openml
Also, this overlaps with an earlier PR: #1653. Since that one was opened first, I can’t guarantee this will be merged if the other gets approved. It would be good to coordinate on the issue to avoid duplicate work.
|
@geetu040 Thanks i will drop and close my pr. |
|
Let's wait for that PR to be merged first. After that, you can address the feedback here: #1653 (comment) in this PR, so your contribution is properly reflected, and then we can proceed with merging this one as well. |
Removes the separate
openml/__version__.pymodule and defines__version__directly inopenml/__init__.pyas suggested in #1642.Motivation
Having a dedicated
__version__.pyis an older pattern. Modern Python packages define the version string directly in__init__.py, which is simpler and avoids an unnecessary import level.Changes
openml/__init__.py: Replacedfrom .__version__ import __version__with the version string defined inline:openml/__version__.py: File deleted (git rm).All existing code that does
import openml; openml.__version__orfrom openml import __version__continues to work unchanged, since__version__is still exported from the top-level package.Testing
No behavioural change — existing tests that access
openml.__version__will continue to pass.Closes #1642