Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pygrb offline workflow #4288
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
Pygrb offline workflow #4288
Changes from 34 commits
06416d5
1e0713c
af50dee
ef79530
d451505
611ad0c
0318a45
d7dc6bd
05fc4a6
ed44cf0
cefe678
145c17f
08cbb93
1dcf643
4099487
fa5b123
dc0411e
32a1f56
7fe1c2e
76bd4d2
22533f7
9333bd7
be1aa83
3b48f53
d3ebdec
d3625b5
770e1dc
dfac88e
983c0d8
f2d7a74
00bbd2b
08499d0
0d6b4ec
9685852
cbb62f4
badf31c
177dbec
673e26b
31b666e
e2b8fd8
7b4e422
707717b
0cd748b
6c5481d
2b10fa8
908eb83
8539b04
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Would be good to document all files in
pp_files
in case (for e.g.) someone might want to usepp_files[2]
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 comment makes me wonder if different data structure may be beneficial here in terms of code clarity, maybe a dict?
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.
I will always need a
_workflow.FileList
but I guess I can build a dictionary in parallel, use it as a "living documentation" structure and go through it when I need individualpp_files
elements.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.
Okay, thinking about this more, it is probably better to document this in
pycbc/workflow/grb_utils.py
wheresetup_pygrb_pp_workflow
is defined, and here place a reminder to look over there.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.
On second thought (not required for this PR, as it's time to merge this, but something to fix going forward):
I think it's a bad idea to assume anything about the order here, especially things like
[-1]
or[-2]
. The FileLists were never intended to have a special order. That said, the case of a job that produces multiple output files was never supported well, and dealing with cases like this is ugly ..... Suggestions for improvement here are welcome!However, I would suggest using one of the methods of the FileList class (https://pycbc.org/pycbc/latest/html/_modules/pycbc/workflow/core.html#FileList) to get these files. It's possible that a new method will be needed, as I think you'll want to search by "description", rather than "tag" (but I'm not sure). I think that
file_list. categorize_by_attr('description')
may produce what @titodalcanton suggests ... and would then be easier and clearer to work with.