Skip to content

Commit

Permalink
Merge pull request #196 from epigen/dev
Browse files Browse the repository at this point in the history
Fix failure summarization message and allow non-string argument to option in pipeline_args
  • Loading branch information
vreuter committed Nov 15, 2017
2 parents c84627d + f3d8141 commit 1fd7057
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
8 changes: 8 additions & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
******************************

- **v0.7.1** (*2017-11-15*):

- Fixed

- No longer falsely display that there's a submission failure.

- Allow non-string values to be unquoted in the ``pipeline_args`` section.

- **v0.7** (*2017-11-15*):

- New
Expand Down
2 changes: 1 addition & 1 deletion looper/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.0"
__version__ = "0.7.1"
2 changes: 1 addition & 1 deletion looper/looper.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def __call__(self, args, remaining_args):
samples_by_reason[SUBMISSION_FAILURE_MESSAGE] |= fails
failed_samples_by_pipeline[pl_key] |= fails

failed_sub_samples = samples_by_reason[SUBMISSION_FAILURE_MESSAGE]
failed_sub_samples = samples_by_reason.get(SUBMISSION_FAILURE_MESSAGE)
if failed_sub_samples:
_LOGGER.info("\n{} samples with at least one failed job submission: {}".
format(len(failed_sub_samples),
Expand Down
11 changes: 9 additions & 2 deletions looper/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,15 @@ def get_arg_string(self, pipeline_name):

def make_optarg_text(opt, arg):
""" Transform flag/option into CLI-ready text version. """
return "{} {}".format(opt, _os.path.expandvars(arg)) \
if arg else opt
if arg:
try:
arg = _os.path.expandvars(arg)
except TypeError:
# Rely on direct string formatting of arg.
pass
return "{} {}".format(opt, arg)
else:
return opt

def create_argtext(name):
""" Create command-line argstring text from config section. """
Expand Down

0 comments on commit 1fd7057

Please sign in to comment.