-
Notifications
You must be signed in to change notification settings - Fork 45
Unique process identifiers #141
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
Conversation
Co-authored-by: tiagofilipe12 <tiagofilipe12@gmail.com> Co-authored-by: bfrgoncalves <bfgoncalves@medicina.ulisboa.pt>
Codecov Report
@@ Coverage Diff @@
## dev #141 +/- ##
==========================================
+ Coverage 38.46% 38.91% +0.45%
==========================================
Files 59 59
Lines 5590 5635 +45
==========================================
+ Hits 2150 2193 +43
- Misses 3440 3442 +2
Continue to review full report at Codecov.
|
|
Here is a previous example of the current implementation: And here is how it looks now: This was the test pipeline string used in the above example: |
|
Great job guys! I think this will solve pretty much all issues with pipeline forks. For me, adding unique identifiers to allow the correct identification of source lanes also seemed like the best approach. |
|
|
||
| identifiers_to_tags = {} | ||
| """ | ||
| Dictionary to match new process names (identifiers) with original process |
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.
Consider using the : format, as in dict: Matches new process ...
|
|
||
| new_process_names = [] | ||
| """ | ||
| List of new process names used to replace in the pipeline string |
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.
Same as before
|
|
||
| # force to add a space between each token so that regex modification can | ||
| # be applied | ||
| find = r'[)(|]+' |
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 should use the constants FORK_TOKEN, LANE_TOKEN and CLOSE_TOKEN instead of literals.
| # escape characters are required to match to the dict keys | ||
| # (identifiers_to_tags), since python keys with escape characters | ||
| # must be escaped | ||
| find = r'{}[^_]'.format(val).replace("\\", "\\\\") |
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.
Don't usually like regex, but this is very nice. Great job!
Co-authored-by: tiagofilipe12 <tiagofilipe12@gmail.com> Co-authored-by: bfrgoncalves <bfgoncalves@medicina.ulisboa.pt>
Co-authored-by: tiagofilipe12 <tiagofilipe12@gmail.com> Co-authored-by: bfrgoncalves <bfgoncalves@medicina.ulisboa.pt>


This pr adds unique identifiers to processes before parsing the pipeline to allow forking processes with the same name, which occurred when source process for new fork has the same exact name for multiple branches of a previous fork.