-
Notifications
You must be signed in to change notification settings - Fork 5
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
ENH Stream file merge task #15
Conversation
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.
Thanks @valmar looks mostly good to me, I left a couple of comments inline. Two additional things:
- We should probably add validators to the
Task
model to:- Automatically pull the input directory from the output file of indexing (for now just CrystFEL)
- Set the output file accordingly
- Also, it is probably best to add a validator here now for the merge
Task
:lute/lute/io/models/sfx_merge.py
Line 47 in ff26ea7
in_file: Optional[str] = Field(
infile: Path | ||
for infile in stream_file_list: | ||
with open(infile, "rb") as fd: | ||
shutil.copyfileobj(fd, wfd) |
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.
Looks good to me. We should remember to pay attention to this when we start having interactions between multiple users. I remember we had some issues copying files and doing operations like this when multiple users were submitting jobs.
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.
Thanks @valmar !
Description
This PR introduces a simple native task that merges several streams file into one by concatenating ther content.
Checklist
PR Type:
Address issues:
Testing