-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
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
Replace column fixes #1048
base: master
Are you sure you want to change the base?
Replace column fixes #1048
Conversation
wm75
commented
Dec 10, 2020
- The tool would previously behave unexpectedly with empty columns at the end of lines (drop columns, retain lines that should be skipped, etc)
- The input datatype is now preserved on output
- The code has also been cleaned a bit
Stripping all whitespace from the end of input lines is questionable in general, and outright wrong in the case of tab-delimited data with empty columns at the end of lines.
if len(out) == len(line_content): | ||
output.write('%s\n' % delimiter_local.join(out)) | ||
if column >= len(line_content): | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somewhat questionable, but preserves the behavior of the previous version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could fail instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the simple alternative. We could also couple the behavior for short lines to the general mode (skip/error/pass), which would also not be too complicated to do.
I was just reluctant to change this cause it may force people to revise WFs when they update to the new tool version.
But if you think it's worth it I can change it to either of the two behaviors above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we bump the version I think this is fine and afaik the supplied value, if this fails, is invalid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll change this. Regarding to what:
I can see use-cases for the more complex implementation where users would want to skip/keep unmodified truncated lines instead of erroring out (like certain lines of the input lacking an annotation so there's nothing to replace, but you don't want to lose these lines either) so I'd prefer being able to handle such situations.
I'm not sure why, but in containers, those tests all fail. |
Yes, but it seems that job execution as such is broken. |
Rerunning tests now. |