CatalogRegistry and DatasetRegistry duplicate version resolution, species filtering and build-receipt checks
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 1
- Merge medio
- 10h 11m
- PR unite (30g)
- 51
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openvax/orfdata
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
openvax/orfdata#194 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openvax/orfdata
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pearu/agent-sandbox#451 ·
I maintainer di solito rispondono entro 1 giorno
-
run_gate loads a custom tasks file from outside the working directoryForse già presa @Ru0k3 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MakazhanAlpamys/Soup#3189 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
review developer setup docAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NYCPlanning/data-engineering#2996 ·
I maintainer di solito rispondono entro 1 giorno