Skip to content

Commit

Permalink
Merge branch 'hotfix/1.5.3'
Browse files Browse the repository at this point in the history
`+` is not allowed in file names anymore, as CWL could not "glob" an output with a `+` in its name
  • Loading branch information
Yaobo Xu committed Mar 20, 2019
2 parents 7258a9a + 2b90741 commit 3eb9295
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGES

## 1.5.3

* `+` is not allowed in file names anymore, as CWL could not "glob" an output with a `+` in its name

## 1.5.2

* Reject files in a manifest with characters that not compatible with CWL file name restrictions in their names.
Expand Down
7 changes: 4 additions & 3 deletions cgp_seq_input_val/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
VAL_LIM_CONFIG_ERROR = "'limit' and 'limit_by' must both be defined when either \
is present, check body.validate."

# same as implemented in CWLtool. Reference: https://tinyurl.com/y3gxryu4
# same as implemented in CWLtool. Reference: https://tinyurl.com/y3gxryu4,
# except '+' as CWL can not glob the output when it is in output file name
# the reference linked to the line in CWLtool repo
CWL_EN_STRICT_RE = re.compile(r"^[a-zA-Z0-9._+-]+$")
CWL_EN_STRICT_RE = re.compile(r"^[a-zA-Z0-9._-]+$")


def wrapped_validate(args):
Expand Down Expand Up @@ -562,7 +563,7 @@ def filename_cwl_compatibility_check(self, rules: bool):
if not CWL_EN_STRICT_RE.match(item):
raise ValidationError(
"File has CWL imcompatible character(s) in the name: '%s' on line %d."
% (item, cnt) + f"\nAcceptable pattern is: '{CWL_EN_STRICT_RE.pattern}'."
% (item, cnt) + f" Acceptable pattern is: '{CWL_EN_STRICT_RE.pattern}'."
)

def heading_check(self, config):
Expand Down
Binary file modified data/SimplifiedManifest_v1.0.xls
Binary file not shown.
Binary file modified data/SimplifiedManifest_v1.0.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'url': 'https://github.com/cancerit/cgp_seq_input_val',
'download_url': '',
'author_email': '[email protected]',
'version': '1.5.2',
'version': '1.5.3',
'python_requires': '>= 3.6',
'setup_requires': ['pytest'],
'install_requires': ['progressbar2', 'xlrd', 'xopen'],
Expand Down

0 comments on commit 3eb9295

Please sign in to comment.