Skip to content

Commit 44f105a

Browse files
committed
fix(catalog,tests): address PR #196 review (Copilot)
Three valid review findings, all verified before acting: - test_plugins_cli.py: synthetic catalog fixtures used data_source "Custom", which now violates the tightened catalog_entry.schema.json enum. This was not merely cosmetic: in test_validate_rejects_duplicate_accession_within_catalog the per-entry schema failure short-circuited (validate_cmd `continue`s on a schema error) so the duplicate-accession branch was never reached -- the test passed for the wrong reason. Use a valid enum value ("ClinGen"); verified the dedup branch is exercised again ("duplicate accession within catalog: DUP"). - test_unified_registry_per_plugin.py: same "Custom" -> "ClinGen" in the two fake-entry fixtures, to keep examples consistent with the schema (the registry loader doesn't schema-validate, so behavior is unchanged). - gwas_catalog/catalog/datasets.json: the file description claimed "pinned content: e115 / r2026-04-27" while the url is the rolling releases/latest/ endpoint. Reworded to clarify the url is the latest-release endpoint (may resolve to a newer release) and that the built-from release lives in accession. Verified: full fast suite 1004 passed, 0 failed, 4 skipped.
1 parent 444e0bc commit 44f105a

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

hvantk/skills/gwas_catalog/catalog/datasets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"format": "tsv",
2929
"size_bytes": 556245182,
3030
"url": "https://ftp.ebi.ac.uk/pub/databases/gwas/releases/latest/gwas-catalog-associations-full.zip",
31-
"description": "Full associations TSV (v1.0, 34 columns), unzipped from the EBI GWAS Catalog latest-release archive (pinned content: e115 / r2026-04-27). The legacy api/search/downloads/full endpoint has been retired (404); this FTP archive is the URL the drift probe fingerprints."
31+
"description": "Full associations TSV (v1.0, 34 columns), unzipped from the EBI GWAS Catalog full-associations archive. The `url` is the rolling latest-release endpoint (the same one the drift probe fingerprints) and may resolve to a newer release over time; the specific release this entry was built from is recorded in `accession` (e115 / r2026-04-27). The legacy api/search/downloads/full endpoint has been retired (404)."
3232
}
3333
]
3434
}

hvantk/tests/test_plugins_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def test_validate_rejects_catalog_entry_missing_required_field(tmp_path):
9494
from hvantk.tools.plugins.plugins_cli import plugins_group
9595
(tmp_path / "catalog").mkdir()
9696
(tmp_path / "catalog" / "datasets.json").write_text(
97-
'[{"title": "x", "description": "d", "data_source": "Custom", '
97+
'[{"title": "x", "description": "d", "data_source": "ClinGen", '
9898
'"organism": "Homo sapiens", "files": []}]' # missing "accession"
9999
)
100100
(tmp_path / "plugin.yaml").write_text(
@@ -112,7 +112,7 @@ def test_validate_rejects_duplicate_accession_within_catalog(tmp_path):
112112
from hvantk.tools.plugins.plugins_cli import plugins_group
113113
(tmp_path / "catalog").mkdir()
114114
entry = ('{"accession": "DUP", "title": "x", "description": "d", '
115-
'"data_source": "Custom", "organism": "Homo sapiens", "files": []}')
115+
'"data_source": "ClinGen", "organism": "Homo sapiens", "files": []}')
116116
(tmp_path / "catalog" / "datasets.json").write_text(f"[{entry}, {entry}]")
117117
(tmp_path / "plugin.yaml").write_text(
118118
"api_version: 2\nname: tmp-plug\nversion: 0.1.0\n"

hvantk/tests/test_unified_registry_per_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(self, name, catalog_path):
102102
def _entry(acc):
103103
return {
104104
"accession": acc, "title": acc, "description": "x",
105-
"data_source": "Custom", "organism": "Homo sapiens", "files": [],
105+
"data_source": "ClinGen", "organism": "Homo sapiens", "files": [],
106106
}
107107

108108
cat_a = tmp_path / "a.json"; cat_a.write_text(json.dumps([_entry("DUP")]))
@@ -137,7 +137,7 @@ def __init__(self, name, catalog_path, domain):
137137
cat.write_text(
138138
json.dumps([{
139139
"accession": "X1", "title": "X1", "description": "x",
140-
"data_source": "Custom", "organism": "Homo sapiens", "files": [],
140+
"data_source": "ClinGen", "organism": "Homo sapiens", "files": [],
141141
}])
142142
)
143143

0 commit comments

Comments
 (0)