Skip to content

Commit c3f7aec

Browse files
committed
Remove redundant imports from gks tests
1 parent 80ca8fc commit c3f7aec

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

gnomad/utils/annotations.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,9 +2864,7 @@ def _create_group_dicts(
28642864
ancillaryResults["grpMaxFAF95"] = {
28652865
"frequency": input_struct.grpMaxFAF95.grpmax_gen_anc,
28662866
"confidenceInterval": 0.95,
2867-
"groupId": (
2868-
f"{gnomad_id}.{input_struct.grpMaxFAF95.grpmax_gen_anc.upper()}"
2869-
),
2867+
"groupId": f"{gnomad_id}.{input_struct.grpMaxFAF95.grpmax_gen_anc.upper()}",
28702868
}
28712869

28722870
# Add joint group max FAF if it exists.

tests/utils/test_annotations.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,21 +1096,18 @@ class TestVRSFunctions:
10961096

10971097
def test_vrs_identifier_generation(self):
10981098
"""Test that GA4GH identifiers are generated correctly."""
1099-
import ga4gh.core as ga4gh_core
1100-
import ga4gh.vrs as ga4gh_vrs
1101-
11021099
# Test that we can import and access VRS modules
1103-
assert hasattr(ga4gh_core, "__version__")
1104-
assert hasattr(ga4gh_vrs, "models")
1105-
assert hasattr(ga4gh_vrs.models, "SequenceLocation")
1100+
assert hasattr(ga4gh.core, "__version__")
1101+
assert hasattr(ga4gh.vrs, "models")
1102+
assert hasattr(ga4gh.vrs.models, "SequenceLocation")
11061103

11071104
# Test that VRS 2.0.1+ API is available
11081105
assert hasattr(
1109-
ga4gh_core, "ga4gh_identify"
1106+
ga4gh.core, "ga4gh_identify"
11101107
), "VRS 2.0.1+ ga4gh_identify function not found"
11111108

11121109
# Test that we can create a VRS object using the 2.0.1+ API
1113-
seq_loc = ga4gh_vrs.models.SequenceLocation(
1110+
seq_loc = ga4gh.vrs.models.SequenceLocation(
11141111
sequenceReference="ga4gh:SQ.test",
11151112
start=1,
11161113
end=2,
@@ -1141,7 +1138,6 @@ def test_add_gks_vrs_actual_api_call(self):
11411138
locus_py = hl.eval(locus)
11421139
vrs_py = hl.eval(vrs_struct)
11431140

1144-
# This should actually call ga4gh_core.ga4gh_identify()
11451141
result = add_gks_vrs(locus_py, vrs_py)
11461142

11471143
# Verify the result has the expected VRS structure
@@ -1192,10 +1188,8 @@ def test_add_gks_vrs_grch37_chromosome_mapping(self):
11921188

11931189
def test_vrs_version_compatibility(self):
11941190
"""Test that VRS 2.0.1+ is properly installed."""
1195-
import ga4gh.core as ga4gh_core
1196-
11971191
# Test that VRS 2.0.1+ API is available
1198-
assert hasattr(ga4gh_core, "ga4gh_identify"), "VRS 2.0.1+ is required"
1192+
assert hasattr(ga4gh.core, "ga4gh_identify"), "VRS 2.0.1+ is required"
11991193

12001194
# The function should work with VRS 2.0.1+
12011195
assert callable(add_gks_vrs)

0 commit comments

Comments
 (0)