Skip to content

Commit

Permalink
Update write_pipestat_config doc strings and out put message #459
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Feb 20, 2024
1 parent 8d029bf commit 0f8efe2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions looper/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ def _get_yaml_path(namespaces, template_key, default_name_appendix="", filename=

def write_pipestat_config(looper_pipestat_config_path, pipestat_config_dict):
"""
This is run at the project level, not at the sample level.
This writes a combined configuration file to be passed to a PipestatManager.
:param str looper_pipestat_config_path: path to the created pipestat configuration file
:param dict pipestat_config_dict: the dict containing key value pairs to be written to the pipestat configutation
return bool
"""
with open(looper_pipestat_config_path, "w") as f:
yaml.dump(pipestat_config_dict, f)
print(f"Initialized looper config file: {looper_pipestat_config_path}")
print(f"Initialized pipestat config file: {looper_pipestat_config_path}")

return True

Expand Down
6 changes: 4 additions & 2 deletions looper_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# configuring a .looper.yaml file for a new project. To be used as `looper init`.

import os

cfg = {}

print("This utility will walk you through creating a .looper.yaml file.")
Expand All @@ -19,7 +20,7 @@
"pep_config": "databio/example",
"output_dir": "results",
"piface_path": "pipeline_interface.yaml",
"project_name": os.path.basename(os.getcwd())
"project_name": os.path.basename(os.getcwd()),
}


Expand All @@ -36,7 +37,8 @@
print(f"Warning: PEP file does not exist at '{cfg['pep_config']}'")

cfg["output_dir"] = (
input(f"Path to output directory: ({DEFAULTS['output_dir']}) ") or DEFAULTS["output_dir"]
input(f"Path to output directory: ({DEFAULTS['output_dir']}) ")
or DEFAULTS["output_dir"]
)

# TODO: Right now this assumes you will have one pipeline interface, and a sample pipeline
Expand Down

0 comments on commit 0f8efe2

Please sign in to comment.