[MNT] Remove __version__.py, define __version__ in __init__.py#1661
Open
moksha-hub wants to merge 3 commits intoopenml:mainfrom
Open
[MNT] Remove __version__.py, define __version__ in __init__.py#1661moksha-hub wants to merge 3 commits intoopenml:mainfrom
moksha-hub wants to merge 3 commits intoopenml:mainfrom
Conversation
Author
|
@geetu040 please have a review. |
Author
|
@geetu040 please have a review if any changes are required i can work on them or move onto the next issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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