[MNT] Remove `__version__.py` module and define `__version__` in `__init__`

Đang mở
#1,642 7 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
55/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
developer-experience

Hướng nghiên cứu

Start with openml/version.py and openml/init.py to compare the current definition and re-export. Search the package for internal imports of version and update them consistently. Done means openml.version is a single attribute defined in init.py, the separate module is removed, and imports remain functional.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Good First Issue maintenance & CI

Currently, the package defines __version__ inside a __version__.py module and then re-exports it from openml/__init__.py.

This results in two objects named __version__:

  • the module openml.__version__
  • the variable __version__ imported from that module

This kind of name masking between a module and a variable is generally discouraged in Python, as it can lead to confusion and unclear import semantics.

Todo:

  • Remove openml/__version__.py
  • Define __version__ directly inside openml/__init__.py
  • Update any internal imports accordingly

This keeps a single, conventional openml.__version__ attribute while avoiding module/variable name collisions and simplifying the package structure.

Initial Source/Discussion: https://github.com/aiondemand/aiondemand/pull/70

Ngôn ngữ chính
Python
Star
361
Fork
296
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của openml/openml-python

Tất cả issue của openml/openml-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.