Acquire every resource kind through one interface instead of per-kind branches

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

Maintainer thường phản hồi trong vòng 1 ngày

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ái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
cli, data-engineering

Hướng nghiên cứu

Start by reading downloads.py, data_resources.py, download_cli.py and install.py, then compare the per-kind helpers named in the issue with the linked issues #152–#164. Map how current kinds implement listing, inspection, acquisition and info before proposing the shared interface. Done means a new kind needs only a registered implementation, data commands and setup have no per-kind branches, and existing CLI/Python behavior is preserved.

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

Mô tả

enhancement

Adding a resource kind today means editing at least five places:

  • downloads.py: six hand-written finders that build DataStatus rows.
  • data_resources.py: branches per kind in _resolve, data_info and fetch_data.
  • download_cli.py: a focused subcommand per kind.
  • install.py: separate loops for catalogues, chains and collections.
  • The kind's own command group.

These modules reach into each other's private helpers (viral_panel._bundle_path/_existing_bundle, liftover._chain_registry, genomes._registry, catalog._BUNDLED/_installed/_plan). The duplication is why the paths have drifted: the repair policy, timeouts, status words and option grammar each differ by kind and command (see the linked issues). This is the per-source sidecar shape that ORFdata otherwise avoids.

Proposal: one small resource interface per kind, covering:

  • rows(): identity, species, version, sizes and terms;
  • inspect(name, version, verify): a shared status;
  • acquire(name, version, force, sources, options): download or build;
  • info(name, version).

list, status, info, path, fetch and setup then become generic loops over a registry of kinds.

Acceptance: a new kind is one registered implementation. The data commands and setup contain no per-kind branches. Existing CLI and Python behavior is preserved, with the fixes from the linked issues.

Related: the repair policy (#152), status words (#164), option grammar (#163) and command consolidation (#162) are the visible symptoms.

Ngôn ngữ chính
Python
Star
1
Fork
1
Merge trung bình
10 giờ 11 phút
Pull request đã merge (30 ngày)
51

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 openvax/orfdata

Tất cả issue của openvax/orfdata

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.