Skip to content

Commit

Permalink
config: fixed config loading order
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo authored and slint committed Oct 31, 2023
1 parent 18efd33 commit 1538774
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lycophron/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, root_path, defaults: dict = None) -> None:
self.root_path = root_path
self.defaultsLoader = DefaultsLoader()
self.cfgLoader = CFGLoader(root_path=root_path)
self.loaders = [self.cfgLoader, self.defaultsLoader]
self.loaders = [self.defaultsLoader, self.cfgLoader]

def __setitem__(self, __key, __value) -> None:
if not str(__key).isupper():
Expand Down Expand Up @@ -94,7 +94,7 @@ def exists(self) -> bool:
return os.path.exists(self.cfg_path)

def deserialize(self, key, val):
return f"{key.upper()} = '{val}'"
return f"{key.upper()} = '{val}'\n"

def dump(self, dump_data) -> None:
if type(dump_data) is not dict:
Expand Down
1 change: 0 additions & 1 deletion src/lycophron/tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from ..db import LycophronDB
from ..client import create_session
from ..models import RecordStatus

# TODO tasks are using 'db' directly. Breaks the basic flow Interface -> Business -> Data.
# TODO tasks do not have any logging implemented yet (e.g. success, errors).
# TODO record serialization to zenodo is done in place, should have its own module (e.g. marshmallow serializers)
Expand Down

0 comments on commit 1538774

Please sign in to comment.