Skip to content

Added support for grabbing and putting data on S3. #1201

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

Merged
merged 6 commits into from
Oct 2, 2015

Conversation

shariqiqbal2810
Copy link
Contributor

  • Added S3DataGrabber to nipype/interfaces/io.py
  • Added S3DataSink to nipype/interfaces/io.py
  • Added tests to nipype/interfaces/tests/test_io.py
    • Currently the S3 tests are using a bucket on our lab's account.
    • We would like to have a conversation about a more long-term testing solution.

* Added S3DataGrabber to nipype/interfaces/io.py
* Added S3DataSink to nipype/interfaces/io.py
* Added tests to nipype/interfaces/tests/test_io.py
    * Currently the S3 tests are using a bucket on our lab's account.
@satra
Copy link
Member

satra commented Sep 1, 2015

for testing the grabber you can use the openfmri bucket (which is a public bucket). for the sink, i need to think of a better solution.

One concern is that these files are large (we were using empty text files before), so the test is slowed considerably.
@shariqiqbal2810
Copy link
Contributor Author

I changed the s3datagrabber test to use the openfmri data. Unfortunately, these files are fairly large, so the tests are slowed (even though I'm only downloading 2 files). Additionally, these modules require the use of boto3 (AWS Python API), and I was wondering what your solution would be to keep this optional. Currently I have this with my imports

try:
    import boto3
except:
    pass

@shariqiqbal2810
Copy link
Contributor Author

FYI the only tests that are failing are due to a lack of boto3 on the testing system. Tests all pass on my system.

@chrisgorgo
Copy link
Member

We should skip those tests on systems without boto3 (since not all users
will use it), but also add it to circle.yml config file so it would be
installed on the test server.

On Fri, Sep 4, 2015 at 3:56 AM, Shariq Iqbal notifications@github.com
wrote:

FYI the only tests that are failing are due to a lack of boto3 on the
testing system. Tests all pass on my system.


Reply to this email directly or view it on GitHub
#1201 (comment).

@shariqiqbal2810
Copy link
Contributor Author

Ok done! Any more thoughts on how to implement the S3DataSink test?

@shariqiqbal2810
Copy link
Contributor Author

So I think the only remaining things to sort out are:

  • Figuring out a more permanent testing solution for S3DataSink
  • Getting AWS credentials for the testing server

@chrisgorgo
Copy link
Member

What about using a fake S3 server? https://github.com/jubos/fake-s3

- S3DataGrabber uses anon connection to grab from openfmri bucket
- S3DataSink uses fakes3 server to test functionality
- Added 'gem install fakes3' to circle.yml
@shariqiqbal2810
Copy link
Contributor Author

I modified the code to use a fake s3 server on the S3DataSink tests and use an anonymous request on the S3DataGrabber test (in order to avoid needing credentials). I added a 'gem install fakes3' line to the circle.yml file. Hopefully that will be enough to get everything working (It should as long as 'gem' works on the testing server)

chrisgorgo added a commit that referenced this pull request Oct 2, 2015
Added support for grabbing and putting data on S3.
@chrisgorgo chrisgorgo merged commit 9317425 into nipy:master Oct 2, 2015
@shariqiqbal2810 shariqiqbal2810 deleted the s3io branch October 2, 2015 14:32
@shariqiqbal2810 shariqiqbal2810 restored the s3io branch October 12, 2015 13:14
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.

4 participants