-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#741 small refactoring to update directory structure, based on PR com…
…ments
- Loading branch information
1 parent
bc483b5
commit cf22aae
Showing
20 changed files
with
84 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### Color constants for rendering text on the console | ||
|
||
TGREEN = "\033[32m" # Green Text | ||
TGREENBG = "\033[30;42m" | ||
TRED = "\033[31m" # Red Text | ||
TREDBG = "\033[30;41m" | ||
TBLUE = "\033[34m" # Blue Text | ||
TBLUEBG = "\033[30;44m" | ||
TPURPLE = "\033[35m" # Purple Text | ||
TPURPLEBG = "\033[30;45m" | ||
TYELLOW = "\033[33m" # Yellow Text | ||
TYELLOWBG = "\033[30;43m" | ||
|
||
ENDC = "\033[m" # reset to the defaults |
2 changes: 1 addition & 1 deletion
2
src/hgvs/pretty/renderer/pos_info.py → src/hgvs/pretty/console/pos_info.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../pretty/renderer/prot_mapping_renderer.py → ...s/pretty/console/prot_mapping_renderer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...vs/pretty/renderer/prot_ruler_renderer.py → ...gvs/pretty/console/prot_ruler_renderer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
from hgvs.pretty.console.constants import ENDC, TPURPLE, TYELLOW | ||
|
||
|
||
def colorize_hgvs(hgvs_str: str) -> str: | ||
""" Takes a string representation of a hgvs Sequence Variant and renders it with console colors. | ||
""" | ||
|
||
spl = hgvs_str.split(":") | ||
var_str = TPURPLE + spl[0] + ENDC | ||
var_str += ":" | ||
|
||
sec = spl[1].split(".") | ||
var_str += TYELLOW + sec[0] + ENDC | ||
var_str += "." | ||
var_str += sec[1] | ||
|
||
return var_str | ||
|
||
class BasicRenderer(ABC): | ||
def __init__(self, config, orientation: int): | ||
self.config = config | ||
self.orientation = orientation | ||
|
||
@abstractmethod | ||
def legend(self): | ||
pass | ||
|
||
@abstractmethod | ||
def display(self): | ||
pass |
2 changes: 1 addition & 1 deletion
2
src/hgvs/pretty/renderer/ruler.py → src/hgvs/pretty/console/ruler.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...vs/pretty/renderer/tx_mapping_renderer.py → ...gvs/pretty/console/tx_mapping_renderer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/hgvs/pretty/renderer/tx_pos.py → src/hgvs/pretty/console/tx_pos.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters