Closed bvnayak closed 9 years ago
All of the sudden all Python 3 tests are erroring with:
urllib.error.HTTPError: HTTP Error 403: Forbidden
I went back and reran the previously passed v0.3.0
test for 3.5 and it now fails. Maybe the IP from which the 3+ tests are running is now being blocked by PDS due to repeating requests or something.
We may have to mirror our test data ourselves.
Tasks to be performed in this ticket:
@bvnayak you can ignore these comments until next week, since I know you're studying.
I have a number of concerns with this PR:
save()
is implemented in Image
but currently only handles saving PDS3 images. What happens when a user tries to save an Isis cubefile? Probably not the right thing. So we can either leave save()
up here and raise an exception when an Isis cubefile is being saved or we can move save()
down to the PDS3Image
class. This implementation looks pretty PDS3 specific so maybe it should be moved down into pds3image.py
.overwrite
keyword doesn't do what I had intended for it to do. save()
should test to see if a file matching file_to_write
is present, if it is present and overwrite=False
then an exception should be raise with the message "File already exists: filename". ONLY if overwrite=True
should the file be overwritten. The whole point is that save()
should never overwrite an existing file without explicit permission. This can probably be accomplished in the missing else:
branch of the if overwrite:
test.Lastly, I've realized that many of our tests for pds3image are implemented incorrectly. They should be testing image.label
and image.data
. They mostly test the convenience properties that should maybe be considered internal and changed to band
-> _band
. But at the very least, label values need to be tested explicitly since that's the interface users should be using. Please modify your new tests here to include tests of image.label
and image.data
. I will file another ticket to change the older tests.
Added the write support on the updated master branch. Closing this.
refs#45