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

Library Upload Refactoring, Testing, and Fixes #5209

Merged
merged 3 commits into from Dec 20, 2017

Conversation

Projects
None yet
3 participants
@jmchilton
Member

jmchilton commented Dec 13, 2017

  • #4908 broke server directory uploading, this adds back in the method that was dropped and is now needed in the library actions code (_get_server_dir_files).
  • Fix some handling of some error cases so ConfigNotAllowedExceptions are raised and handled by the framework instead of NoneType errors.
  • New test cases that cover essentially permission handling for library uploads for admins vs. non-admins with different Galaxy configurations.
  • Modify the library contents API to use the newer API decorator - this allows refactoring some option validation code out into methods that can throw exceptions (as opposed to passing message around) and results in superior JSON exceptions (at least from the API standpoint - does the UI need to be tweaked for this?). I'm reusing these validation methods in my new library folder / collection upload API.
@martenson

This comment has been minimized.

Member

martenson commented Dec 19, 2017

@jmchilton Could you please resolve the conflict?

jmchilton added some commits Dec 13, 2017

Small tweaks toward more modern library API.
- Use exception-aware API decorators for library contents API endpoints.
- Throw exceptions to handle permission and parameter errors for library upload paths with reusable validation functions.
- Re-arrange code to avoid working with empty paths and throw better configuration not allow exceptions.
@jmchilton

This comment has been minimized.

Member

jmchilton commented Dec 19, 2017

@martenson Rebased.

@martenson

Very nice, I am glad the modern decorators are now everywhere in libraries. I shadily remember there was some issue with the decorator for upload, but that might have been just in the old interface.

@martenson martenson merged commit 0bf73e4 into galaxyproject:dev Dec 20, 2017

6 checks passed

api test Build finished. 336 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 165 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 65 tests run, 0 skipped, 0 failed.
Details
selenium test Build finished. 117 tests run, 2 skipped, 0 failed.
Details
toolshed test Build finished. 577 tests run, 0 skipped, 0 failed.
Details
@martenson

This comment has been minimized.

Member

martenson commented Dec 20, 2017

(lol, I was building production client locally for this but this is pure python 🤣)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment