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

S3 Bids Fetch Fixes #340

Merged
merged 6 commits into from
Aug 12, 2020
Merged

S3 Bids Fetch Fixes #340

merged 6 commits into from
Aug 12, 2020

Conversation

36000
Copy link
Collaborator

@36000 36000 commented Aug 10, 2020

It seems to be working now. We made 3 fixes:

  1. make directory for modality agnostic files if it does not exist
  2. allow derivatives to download, which was broken before because the prefix was wrong
  3. download the dataset description for derivatives by default whenever downloading a given derivative, if it exists

@richford
Copy link
Collaborator

I thought that this line in _download_from_s3 would take care of that. Were you experiencing an issue where it crashed if the directory didn't exist? In either case, it's probably better to solve this issue inside of _download_from_s3 so that we don't have to duplicate code in both of the download methods.

@36000
Copy link
Collaborator Author

36000 commented Aug 10, 2020

@richford
Copy link
Collaborator

Ahh, I see. It's running into the same issue for the modality agnostic files. I think the fix in #341 is probably a better way to go. Feel free to take the changes from that one and close that PR if you want to keep this one open.

@36000
Copy link
Collaborator Author

36000 commented Aug 10, 2020

I think I will keep this open and throw stuff in here, then I can drop commits that you make better fixes for elsewhere. This PR is really useful, so I am eager to get this working with cam-can so I can use it with other datasets as well.

@36000
Copy link
Collaborator Author

36000 commented Aug 11, 2020

So it looks like _ls_s3fs returns the full prefix to a file, but sometimes we were using it like it returned only the last part of the prefix. Anyways, with these fixes, I can download derivatives.

@pep8speaks
Copy link

pep8speaks commented Aug 11, 2020

Hello @36000! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-08-12 15:37:23 UTC

@36000 36000 force-pushed the bds-fetch-fix branch 2 times, most recently from a30bf2c to 0b76ee2 Compare August 11, 2020 19:15
@36000 36000 changed the title [WIP] S3 Bids Fetch Fixes S3 Bids Fetch Fixes Aug 11, 2020
@arokem
Copy link
Collaborator

arokem commented Aug 11, 2020

This looks good to me, but I am not 100% sure that I was following the discussion. @richford : would you mind taking a look and giving this a 👍 / 👎 ?

@richford
Copy link
Collaborator

@36000, could you remove line 721 from data.py? This is a bug that I just found and I figure we should just fix it in this PR instead of opening a new one. Other than that, LGTM!

@36000 36000 force-pushed the bds-fetch-fix branch 2 times, most recently from 5acd499 to 4254c87 Compare August 12, 2020 14:49
@36000 36000 merged commit 32f3e2b into yeatmanlab:master Aug 12, 2020
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

4 participants