CatalogRegistry and DatasetRegistry duplicate version resolution, species filtering and build-receipt checks
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
Compare the duplicated logic in orfdata/catalogs.py and orfdata/datasets.py, starting with _version, list(), _data_registry, and the build-receipt checks. Read the existing catalogue and dataset tests before choosing whether a shared base class or functions alongside orfdata/cache.py best fit the code. Done means each shared piece exists once, public behavior and error messages stay unchanged, and both existing test suites pass unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
CatalogRegistry (orfdata/catalogs.py) and DatasetRegistry (orfdata/datasets.py) are the same kind of object: a registry over a JSON of pinned releases, each either published or built locally. Each class keeps its own copy of the shared parts (line numbers are on main at cd1b828):
- Version resolution.
_version(catalogs 116, datasets 99) raises the same unknown-name and unknown-version errors. The constructors repeat the same checks thatdefault_versionis pinned and that the distribution'saccess_termsandredistributableare explicit. - Species filter.
list()(catalogs 124, datasets 107) repeats thespecies_taxonlookup and the "Unknown species alias" and "Species and taxon_id disagree" errors line for line. - Published-artifact registry. Both classes have
publishedand_published._data_registry(catalogs 167, datasets 205) builds aVersionedDatasetRegistryfrom the releases that have assets, with the same default-version fallback (default if default in published else min(published)) and the samestore_pathclosure,<area>/<name>/<version>/<digest of release>. - Build-receipt check.
CatalogRegistry.inspect_build(catalogs 221) anddatasets._inspect_build(datasets 327) compare amaterializereceipt with the manifest in the same steps: the source and output inventory, each source's SHA-256, size andverifiedflag, and the transform. Only the output name and the messages differ.
Because the logic is duplicated, a fix to one of these has to be made in both classes, and nothing checks that they still agree.
Proposal: put these four pieces in one place, either a shared base class or functions next to orfdata/cache.py (#180). They would be parameterized by the cache area, the output asset name and the manifest type. CatalogRegistry and DatasetRegistry would keep only what really differs: catalogue priority and optional, dataset archives, assays and search references, and each class's manifest validation.
Acceptance: each of the four pieces exists once, public behavior and error messages are unchanged, and the existing catalogue and dataset tests pass unchanged.
Related: #161 covers one acquisition interface per resource kind across downloads, data_resources and install. This issue is the registry-level part of that work. Found while reviewing #180.
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openvax/orfdata
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
openvax/orfdata#194 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openvax/orfdata
Issue tương tự
-
[Bug]: DoubleMLData.from_arrays checks the treatment d with force_all_x_finite instead of force_all_d_finiteCó thể đã có người làm @leninworld đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
DoubleML/doubleml-for-py#471 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
python-pillow/Pillow#10590 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
BUG: ZarrTrace fails in init_trace for models with datetime coordinates (object dtype coord array)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày