Skip to content

Commit

Permalink
biocommons#741 small refactoring to update directory structure, based…
Browse files Browse the repository at this point in the history
… on PR comments, also disabling slow running unit test
  • Loading branch information
andreasprlic committed Sep 2, 2024
1 parent d4f2ac4 commit d08f02d
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/hgvs/pretty/console/chrom_seq_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def legend(self) -> str:

def display(self, data: VariantData) -> str:
"""colors the ref sequences with adenine (A, green), thymine (T, red), cytosine (C, yellow), and guanine (G, blue)"""
from hgvs.pretty.pretty_print import ENDC, TBLUE, TGREEN, TRED, TYELLOW
from hgvs.pretty.console.constants import ENDC, TBLUE, TGREEN, TRED, TYELLOW

var_seq = ""
for p in data.position_details:
Expand Down
2 changes: 1 addition & 1 deletion src/hgvs/pretty/console/chrom_seq_reverse_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def legend(self) -> str:

def display(self, data: VariantData) -> str:
"""colors the ref sequences with adenine (A, green), thymine (T, red), cytosine (C, yellow), and guanine (G, blue)"""
from hgvs.pretty.pretty_print import ENDC, TBLUE, TGREEN, TRED, TYELLOW
from hgvs.pretty.console.constants import ENDC, TBLUE, TGREEN, TRED, TYELLOW

var_seq = ""
for p in data.position_details:
Expand Down
2 changes: 1 addition & 1 deletion src/hgvs/pretty/console/prot_mapping_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class ProtMappingRenderer(BasicRenderer):
"""prints the position in p (amino acid) coordinates."""
"""Prints the position in p (amino acid) coordinates."""

def legend(self):
return "aa pos : "
Expand Down
2 changes: 1 addition & 1 deletion src/hgvs/pretty/console/prot_seq_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def display(self, data: VariantData) -> str:
if not data.var_c_or_n:
return ""

from hgvs.pretty.pretty_print import ENDC, TGREEN, TRED
from hgvs.pretty.console.constants import ENDC, TGREEN, TRED

var_str = ""
for pdata in data.position_details:
Expand Down
2 changes: 1 addition & 1 deletion src/hgvs/pretty/console/shuffled_variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def legend(self) -> str:

def display(self, data: VariantData) -> str:

from hgvs.pretty.pretty_print import ENDC, TBLUE, TGREEN, TRED, TYELLOW
from hgvs.pretty.console.constants import ENDC, TRED

seq_start = data.display_start
seq_end = data.display_end
Expand Down
2 changes: 1 addition & 1 deletion src/hgvs/pretty/console/tx_alig_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def display(self, data: VariantData) -> str:
if not data.var_c_or_n:
return ""

from hgvs.pretty.pretty_print import ENDC, TPURPLE, TYELLOW
from hgvs.pretty.console.constants import ENDC, TPURPLE, TYELLOW

var_str = ""

Expand Down
5 changes: 2 additions & 3 deletions src/hgvs/pretty/console/tx_ref_disagree_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ class TxRefDisagreeRenderer(BasicRenderer):
"""Display tx-ref-disagree positions"""

def legend(self) -> str:

return f"tx ref dif: "
return "tx ref dif: "

def display(self, data: VariantData) -> str:
"""show differences between tx and ref genome, if there are any"""

if not data.var_c_or_n:
return ""

from hgvs.pretty.pretty_print import ENDC, TRED
from hgvs.pretty.console.constants import ENDC, TRED

var_str = ""
counter = -1
Expand Down
1 change: 1 addition & 0 deletions src/hgvs/pretty/datacompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, config: PrettyConfig):
self.config = config

def get_shuffled_variant(self, var_g: SequenceVariant, direction: int) -> VariantCoords:
""" Takes a sequence variant and returns VariantCoords that have been shuffled accordingly."""

# get shuffled representation:
if direction == 5:
Expand Down
1 change: 1 addition & 0 deletions tests/test_pretty_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from hgvs.pretty.pretty_print import PrettyPrint


@pytest.mark.skip("The pretty print tests are data hungry. If we were to add the data to the test cache, we would inflate the size of the cache. As such only running when necessary.")
@pytest.mark.quick
@pytest.mark.models
class Test_SimplePosition(unittest.TestCase):
Expand Down

0 comments on commit d08f02d

Please sign in to comment.