We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The WDL spec says that regular expressions must be evaluated as POSIX ERE.
MiniWDL does attempt to support the POSIX standard:
miniwdl/WDL/StdLib.py
Line 74 in 475dd3f
One of the character classes the POSIX standard supports is [:alpha:]
[:alpha:]
MiniWDL does not properly support the character classes. For example, in the WDL file below:
version 1.1 workflow test_sub { String string_to_sub = "word" output { String out = sub(string_to_sub, "[:alpha:]{4}", "4444") } }
miniwdl returns:
{ "dir": "/home/heaucques/Documents/wdl-conformance-tests/20240726_121643_test_sub", "outputs": { "test_sub.out": "word" } }
I think this is due to the regex pypi library that miniwdl uses. While it says it supports the POSIX standard, the syntax is a little different than what is expected: https://github.com/mrabarnett/mrab-regex?tab=readme-ov-file#posix-character-classes
regex
Replacing [:alpha:] with [[:alpha:]] as per the regex documentation allows the substitution to work:
[[:alpha:]]
version 1.1 workflow test_sub { String string_to_sub = "word" output { String out = sub(string_to_sub, "[[:alpha:]]{4}", "4444") } }
{ "dir": "/home/heaucques/Documents/wdl-conformance-tests/20240726_121923_test_sub", "outputs": { "test_sub.out": "4444" } }
The substitution unit test in the WDL spec depends on this behavior, meaning MiniWDL does not currently pass it: https://github.com/openwdl/wdl/blob/9c0b9cf4586508a9e6260cc5c5e562e21f625aac/SPEC.md?plain=1#L6480-L6496
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The WDL spec says that regular expressions must be evaluated as POSIX ERE.
MiniWDL does attempt to support the POSIX standard:
miniwdl/WDL/StdLib.py
Line 74 in 475dd3f
One of the character classes the POSIX standard supports is
[:alpha:]
MiniWDL does not properly support the character classes. For example, in the WDL file below:
miniwdl returns:
I think this is due to the
regex
pypi library that miniwdl uses. While it says it supports the POSIX standard, the syntax is a little different than what is expected:https://github.com/mrabarnett/mrab-regex?tab=readme-ov-file#posix-character-classes
Replacing
[:alpha:]
with[[:alpha:]]
as per theregex
documentation allows the substitution to work:The substitution unit test in the WDL spec depends on this behavior, meaning MiniWDL does not currently pass it:
https://github.com/openwdl/wdl/blob/9c0b9cf4586508a9e6260cc5c5e562e21f625aac/SPEC.md?plain=1#L6480-L6496
The text was updated successfully, but these errors were encountered: