-
Notifications
You must be signed in to change notification settings - Fork 90
Store attachments as intact files #659
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
all tests pass
1 similar comment
|
Can you please remove python 3.4 from |
|
Please merge in the latest from |
| relpath = 'one/two/three' | ||
| os.makedirs(os.path.join(stage_path, relpath), exist_ok=True) | ||
| managed_file = os.path.join(stage_path, relpath, filename) | ||
| managed_file = Path(stage_path, relpath, filename) |
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.
This test failed on WIN10. For example, the result of managed_file was C:\\Users\\rguzman\\AppData\\Local\\Temp\\tmpb3gvp0ht\\one\two\threepicture.dat.
| ext.delete(delete_external_files=True) | ||
|
|
||
|
|
||
| def test_filepath_s3(): |
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.
This test failed on WIN10. For example, the result of managed_file was dj/repo/one\two\three\picture.dat.
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.
Updated with errors from running nosetests on WIN10.
| ext.upload_filepath(managed_file) # this is fine because the file is the same | ||
|
|
||
|
|
||
| def test_duplicate_upload_s3(): |
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.
This test failed on WIN10. For example, the result of managed_file was dj/repo/one\two\three\plot.dat.
| ext.upload_filepath(managed_file) # this should raise exception because the file has changed | ||
|
|
||
|
|
||
| def test_duplicate_error_s3(): |
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.
This test failed on WIN10. For example, the result of managed_file was dj/repo/one\two\three\thesis.dat.
| relative_path = 'one/two/three' | ||
| os.makedirs(os.path.join(stage_path, relative_path), exist_ok=True) | ||
| managed_file = os.path.join(stage_path, relative_path, filename) | ||
| managed_file = Path(stage_path, relative_path, 'attachment.dat') |
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.
This test failed on WIN10. For example, the result of managed_file was C:\\Users\\rguzman\\AppData\\Local\\Temp\\tmpb3gvp0ht\\one\two\threeattachment.dat.
| table.external[store].delete(delete_external_files=True) | ||
|
|
||
|
|
||
| def test_filepath_class_again(): |
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.
- This test failed on WIN10 at
test_filepath_class_again. Error details:datajoint.errors.DataJointError: A different version of 'one\two\three\attachment.dat' has already been placed - This test failed on WIN10 at
test_filepath_class_s3. For example, the result ofmanaged_filewasdj/repo/one\two\three\attachment.dat. - This test failed on WIN10 at
test_filepath_class_s3_again. For example, the result ofmanaged_filewasdj/repo/one\two\three\attachment.dat.
| managed_file.parent.mkdir(parents=True, exist_ok=True) | ||
| with managed_file.open('wb') as f: | ||
| f.write(contents) # same in all files | ||
| table.insert1((i, managed_file)) |
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.
This test failed on WIN10. Error details: datajoint.errors.DuplicateError: ("Duplicate entry '1' for key 'PRIMARY'", 'To ignore duplicate entries in insert, set skip_duplicates=True')
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.
this happens sometimes when the previous test run was terminated before cleanup
|
|
||
|
|
||
| def test_filepath_cleanup_s3(): | ||
| """test deletion of filepath entries from external table """ |
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.
This test failed on WIN10. For example, the result of managed_file was dj/repo/four\three\one\file.dat.
.travis.yml
Outdated
| - sudo pip install python-coveralls | ||
| - coveralls | ||
| - coveralls | ||
| >>>>>>> bff58baac8da58b43be95ba1c58174cb7721411f |
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.
This line should be removed... Travis tests will no longer run on this PR until this is addressed.
Provide WIN10/Python3.7/MySQL 5.7 compatibility
Fix WIN10 filepath to store as posix and fetch as user's platform.
…able the filepath datatype
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.
Awesome! Feel much better about this version. :)
Only have some minor suggestions for CHANGELOG.md then I will happily approve and merge.
Co-Authored-By: guzman-raphael <[email protected]>
Co-Authored-By: guzman-raphael <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.