-
Notifications
You must be signed in to change notification settings - Fork 533
ENH: REF: SSHDataGrabber should grab related file #2104
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
Conversation
The CircleCI failure looks to be unrelated: an issue w/ dependency resolution for FSL and AFNI |
Looks like the same/similar issue we had here: nipreps/fmriprep#566, probably need to update the docker file in a separate pull request. |
This was fixed in #2075. Just merge or rebase on master. |
95a6d25
to
69c948a
Compare
Ah thanks, I thought the CI would have run against what the code would be after a merge, not the pre-merge. I have rebased |
Codecov Report
@@ Coverage Diff @@
## master #2104 +/- ##
===========================================
+ Coverage 48.56% 72.15% +23.58%
===========================================
Files 116 1144 +1028
Lines 23598 57629 +34031
Branches 0 8246 +8246
===========================================
+ Hits 11461 41582 +30121
- Misses 12137 14746 +2609
- Partials 0 1301 +1301
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #2104 +/- ##
==========================================
+ Coverage 66.62% 66.63% +0.01%
==========================================
Files 328 328
Lines 42508 42497 -11
Branches 5280 5275 -5
==========================================
- Hits 28321 28319 -2
+ Misses 13505 13496 -9
Partials 682 682
Continue to review full report at Codecov.
|
I'm actually surprised the SSH tests ran already... The CI must be able to SSH back to itself by default. But I went through the logs and this line exists:
And I confirmed that the test fails locally without the final commit locally. |
Uh oh, my bad:
I guess I need to add paramiko to the CI dependencies. |
5c23101
to
5a15a6d
Compare
So it looks like SSHing to localhost on CI might be a little tricky, I thought it would be a simple way to add tests of the functionality. What do others think of leaving the test, but marking it not to be checked my CI? The functionality is currently not tested at all, at least this way it can be manually tested. |
Sorry I completely dropped the ball on this. If I'm understanding the issue, it looks like there's no SSH server? If so, I guess there are three options:
Obviously the first is the least work. I think in principle the third is ideal. But I don't see any particular harm in (2), if configured only to accept connections from localhost. Managing keys could get fiddly. In any event, you'll need to merge master and resolve conflicts to resume this PR. Apologies again. |
Hey. Thanks for responding, I was actually just looking for this yesterday, I have been rebasing a few changes. I think 2 would be a good solution. If I rebase, are you able to help with the container side? |
Sure. |
7088d23
to
d08a4b1
Compare
Okay, rebased and test_io.py running successfully locally |
Great, thanks. I spent some time last night playing with installing and running I'm going to have a look at creating servers with paramiko. If we can simulate a server from within the tests, I think that would be ideal. In the short term, I think it would be useful to have another pytest skip criterion that checks whether there is an SSH server running on localhost (with a port parameter that defaults to 22). Given that we need paramiko installed anyway, perhaps there is functionality there that will make it easy. |
Good temp fix. Python2:
And Python 3
|
Hey, thanks for poking at this some more. Just as an update, I've taken a couple shots at creating an SSH server with paramiko and have failed pretty hard. I'm a little inclined to verify your tests work locally, skip properly on circle, and add an issue to hack together an SSH server in a separate PR. |
Yeah, my /very limited/ search revealed that it might not be as trivial as it at first seems |
Okay, I can verify tests pass locally, and turning my SSH server off and on toggles the number of skipped tests. Pushing a fix for the Dockerfile (we now edit a Dockerfile-generating script), and I think this should be good to go, as far as I'm concerned. |
Yep, assuming CI doesn't fail again. Not sure why Circle CI threw a different error (OSError) to locally. I guess maybe it isn't so much refusing to connect as refusing to try to connect (ssh server vs ssh client error?). |
Ah sorry, I was wondering what the go with that Dockerfile was when I was rebasing. I guess I accidentally added it back in |
Not sure about that 1 Travis error... Some sort of time out? Can you ask it to run that test again? |
Looks like a Python 2 issue. |
The CircleCI build had a |
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.
Waiting on the examples to run, but the tests are passing, so I'm calling this ready.
Will merge at the end of the day unless tests fail or someone else has comments. A second pair of eyes would be appreciated.
Strange that you'd only get such errors with Python 2, but glad the tests ran. Thank for adding the last bit of work, I ran out of time on Friday afternoon :) |
SSHDataGrabber will optionally download files, however if requested file is a header file, the corresponding data file won't be downloaded. This PR fixes this issue.
Changes