master > master: code-py - refactoring von config/models

- manche command-optionen wie verbosity nach config.yaml umgezogen.
This commit is contained in:
RD
2022-06-10 12:08:31 +02:00
parent 0523c68100
commit 97295b71cd
9 changed files with 87 additions and 64 deletions

View File

@@ -8,7 +8,7 @@
from src.thirdparty.types import *;
from src.thirdparty.maths import *;
from models.generated.commands import *;
from models.generated.config import *;
from src.hirschberg.constants import *;
from src.hirschberg.display import *;
from src.hirschberg.matrix import *;

View File

@@ -6,6 +6,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from src.thirdparty.types import *;
from src.setup.config import *;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EXPORTS
@@ -33,7 +34,7 @@ class Directions(Enum):
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def gap_penalty(x: str):
return 1;
return OPTIONS.hirschberg.penality_gap;
def missmatch_penalty(x: str, y: str):
return 0 if x == y else 1;
return 0 if x == y else OPTIONS.hirschberg.penality_missmatch;

View File

@@ -8,7 +8,7 @@
from src.thirdparty.types import *;
from src.thirdparty.maths import *;
from models.generated.commands import *;
from models.generated.config import *;
from src.hirschberg.constants import *;
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~