Skip to content

Commit

Permalink
build!: bump variation-normalizer to ~=0.11.0 (#67)
Browse files Browse the repository at this point in the history
close #61

* Note: When running ETL methods, new ga4gh IDs will be returned
  • Loading branch information
korikuzma authored Jan 3, 2025
1 parent 35d640e commit 681b548
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dynamic = ["version"]

[project.optional-dependencies]
etl = [
"variation-normalizer~= 0.8.0.dev0",
"variation-normalizer~= 0.11.0",
"asyncclick",
"openpyxl",
"pandas",
Expand Down
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Provide utilities for tests."""

from pathlib import Path

import pytest


@pytest.fixture(scope="session")
def evidence_data_dir() -> Path:
"""Return evidence data directory"""
return Path(__file__).resolve().parents[1] / "evidence" / "data"
15 changes: 8 additions & 7 deletions tests/data_sources/test_cancer_hotspots.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@


@pytest.fixture(scope="module")
def cancer_hotspots():
def cancer_hotspots(evidence_data_dir):
"""Create test fixture for cancer hotspots class"""
return CancerHotspots()
globbed = (evidence_data_dir / "cancer_hotspots").glob("cancer_hotspots_*.json")
return CancerHotspots(transformed_data_path=sorted(globbed)[-1])


@pytest.fixture(scope="module")
Expand All @@ -33,7 +34,7 @@ def check_source_meta(response):
def test_mutation_hotspots(cancer_hotspots, braf_v600e):
"""Test that mutation_hotspots method works correctly."""
resp = cancer_hotspots.mutation_hotspots(
"ga4gh:VA.mo-SCo1oC_8rUioVymmrlDjwewWzJUdt"
"ga4gh:VA.urVNVupVvzqE57gZFBu6vsAFScIBNojG"
)
assert resp.data == {
"variation": "BRAF N486_A489delinsK",
Expand All @@ -45,7 +46,7 @@ def test_mutation_hotspots(cancer_hotspots, braf_v600e):
}

resp = cancer_hotspots.mutation_hotspots(
"ga4gh:VA.qiBmeiaWQpVa-NQbBk-tRb29arFXHlII"
"ga4gh:VA.iKBIyhCE-3Cnh5XJpVNZ4t0Ju8Ov8Ine"
)
assert resp.data == {
"variation": "BRAF N486_P490del",
Expand All @@ -57,7 +58,7 @@ def test_mutation_hotspots(cancer_hotspots, braf_v600e):
}

resp = cancer_hotspots.mutation_hotspots(
"ga4gh:VA.4Wr6-Pw1TiTDxvYTSthJHz0sl52wb7Hq"
"ga4gh:VA.uIzxca0MnfZ1ni3NYNkvNh6Isw-5QXG9"
)
assert resp.data == {
"variation": "TP53 I255del",
Expand All @@ -69,7 +70,7 @@ def test_mutation_hotspots(cancer_hotspots, braf_v600e):
}

resp = cancer_hotspots.mutation_hotspots(
"ga4gh:VA.0rVaYwX7S_-NenW_WQ5e7JoHQFkscWUS"
"ga4gh:VA.AM5oy_X7xBxJmWyUPJ0ZSLpRaTgu2kHt"
)
assert resp.data == {
"variation": "CEBPA T310_Q311insKQNP",
Expand All @@ -81,7 +82,7 @@ def test_mutation_hotspots(cancer_hotspots, braf_v600e):
}

resp = cancer_hotspots.mutation_hotspots(
vrs_variation_id="ga4gh:VA.4XBXAxSAk-WyAu5H0S1-plrk_SCTW1PO"
vrs_variation_id="ga4gh:VA.j4XnsLZcdzDIYa5pvvXM7t1wn9OITr0L"
).model_dump(by_alias=True)
assert resp["_id"] == "normalize.evidence:92f3db383a79d855323a71d65d860ec3"
assert resp["data"] == braf_v600e
Expand Down
10 changes: 8 additions & 2 deletions tests/data_sources/test_cbioportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@


@pytest.fixture(scope="module")
def cbioportal():
def cbioportal(evidence_data_dir):
"""Create test fixture for cbioportal class"""
return CBioPortal()
cbioportal_data_dir = evidence_data_dir / "cbioportal"
return CBioPortal(
transformed_mutations_data_path=cbioportal_data_dir
/ "msk_impact_2017_mutations.csv",
transformed_case_lists_data_path=cbioportal_data_dir
/ "msk_impact_2017_case_lists.csv",
)


@pytest.fixture(scope="module")
Expand Down

0 comments on commit 681b548

Please sign in to comment.