Skip to content

Commit

Permalink
fix pep_config not populating during runp
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Nov 30, 2023
1 parent c9521e8 commit bd1bd85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions looper/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def _get_apperance_dict(type, templ=APPEARANCE_BY_FLAG):
SAMPLE_PL_ARG = "sample_pipeline_interfaces"
PROJECT_PL_ARG = "project_pipeline_interfaces"


DEFAULT_CFG_PATH = os.path.join(os.getcwd(), LOOPER_DOTFILE_NAME)
CLI_PROJ_ATTRS = [
OUTDIR_KEY,
Expand All @@ -232,6 +233,7 @@ def _get_apperance_dict(type, templ=APPEARANCE_BY_FLAG):
SAMPLE_PL_ARG,
PIPESTAT_KEY,
DEFAULT_PIPESTAT_CONFIG_ATTR,
PEP_CONFIG_KEY,
]

# resource package TSV-related consts
Expand Down
2 changes: 2 additions & 0 deletions looper/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def __init__(
super(Project, self).__init__(cfg=cfg, amendments=amendments)
prj_dict = kwargs.get("project_dict")
pep_config = kwargs.get("pep_config", None)
if pep_config:
self["pep_config"] = pep_config

# init project from pephub pep_config:
if prj_dict is not None and cfg is None:
Expand Down
3 changes: 3 additions & 0 deletions looper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,10 @@ def read_looper_config_file(looper_config_path: str) -> dict:
dp_data = yaml.safe_load(dotfile)

if PEP_CONFIG_KEY in dp_data:
# Looper expects the config path to live at looper.config_file
# However, user may wish to access the pep at looper.pep_config
return_dict[PEP_CONFIG_FILE_KEY] = dp_data[PEP_CONFIG_KEY]
return_dict[PEP_CONFIG_KEY] = dp_data[PEP_CONFIG_KEY]

# TODO: delete it in looper 2.0
elif DOTFILE_CFG_PTH_KEY in dp_data:
Expand Down

0 comments on commit bd1bd85

Please sign in to comment.