Skip to content
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

[FIX] Derivatives datasink handling of compression #1077

Merged
merged 2 commits into from Apr 27, 2018

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Apr 27, 2018

not fully tested - adapted from @effigies #1075 (comment)

@mgxd mgxd requested review from effigies and oesteban April 27, 2018 19:40
src_isgz = src.endswith('.gz')
dst_isgz = dst.endswith('.gz')
if src_isgz == dst_isgz:
copyfile(src, dst, use_hardlink=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need copy=True in there, otherwise we might end up with symlinks.

@effigies
Copy link
Member

Looks good, thanks. @oesteban do we want to add any sanity checks, such as making sure that all image files in the output can at least be nibabel.loaded?

Actually, maybe we should add --low-mem to one of the tests, so that the compression pathway actually gets hit.

@oesteban
Copy link
Member

Adding --low-mem to one of the tests seems like a good idea 👍 .

I think the nibabel.load test can be done in a different PR. We probably want to check the hash of the outputs and force ourselves to update manually the hashes when they change (as it is done now for MRIQC).

@oesteban
Copy link
Member

I've opened #1078. I'll merge this in since it is quite urgent.

@oesteban oesteban changed the title rf: derivatives datasink copying [FIX] Derivatives datasink handling of compression Apr 27, 2018
@oesteban oesteban merged commit 44bc0ec into nipreps:master Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants