Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Runtime feature mix-in pattern

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần xử lý cấu hình runtime và bước tạo đối tượng được mô tả trong issue, sau đó lần theo cấu trúc kế thừa của Service và Endpoint. Công việc được xem là hoàn tất khi cấu hình runtime có thể định nghĩa một danh sách có thứ tự các lớp mix-in và kiểu của đối tượng được tạo sử dụng thứ tự kế thừa đó, đồng thời duy trì hành vi super() mang tính cộng tác.

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

Mô tả

enhancement major/framework effort

The number of potentially desirable features on top of the basic dripline objects (Service and Endpoint) is large and it does not really make organizational sense to put everything into a single class. In some cases, the expected behaviors may even be mutually incompatible.

Rather than trying to create some set of derived classes that implement every possible useful combination, we propose the following pattern:

  • additional features are implemented as mix-in classes, each inheriting from the lowest possible base class
  • method overrides should never re-implement the logic from the base class, they should use super() to re-use that logic (but may alter the arguments passed or process the results returned as appropriate). They should also also not call the parent method directly, but should use super, so that all overrides are called in order when there is possibly multiple inheritance.
  • because inheritance order is unknown, every class's __init__ should be designed in such a way that being called more than once is not problematic
  • in runtime config, a user specifies the (ordered) list of mix in classes to be used. The user is responsible for understanding the compatibility implications and ordering of inheritance.
  • at runtime, the object creation step should define a new object type with the inheritance set as defined
Ngôn ngữ chính
Python
Star
3
Fork
6
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có 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 driplineorg/dripline-python

Tất cả issue của driplineorg/dripline-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.