Skip to content
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

Accept serialized Tale in POST /tale/import #259

Merged
merged 3 commits into from Jun 18, 2019
Merged

Conversation

Xarthisius
Copy link
Collaborator

@Xarthisius Xarthisius commented Mar 7, 2019

This PR enables importing serialized Tales via POST /tale/import

How to test

  1. Create a Tale and add something to the workspace.
  2. Export the Tale (both formats)
  3. Remove the Tale
  4. Try to upload a zip file
curl -X POST \
  --header 'Content-Type: application/zip' \
  --header 'Accept: application/json' \
  --header 'Girder-Token: ...' \
  --data-binary "@/path/to/tale.zip" \
  'https://girder.local.wholetale.org/api/v1/tale/import?imageId=5a563172a415f100018b9c38&url=https%3A%2F%2Fgoogle.com%2F&spawn=false'

@codecov
Copy link

codecov bot commented Mar 7, 2019

Codecov Report

Merging #259 into master will increase coverage by 0.01%.
The diff coverage is 88.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #259      +/-   ##
==========================================
+ Coverage   87.51%   87.52%   +0.01%     
==========================================
  Files          41       42       +1     
  Lines        2563     2670     +107     
==========================================
+ Hits         2243     2337      +94     
- Misses        320      333      +13
Impacted Files Coverage Δ
server/rest/tale.py 94.69% <82.97%> (-3.21%) ⬇️
server/tasks/import_tale.py 92.95% <92.95%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b43237...070ae58. Read the comment docs.

@Xarthisius Xarthisius force-pushed the import_tale_as_a_file branch 2 times, most recently from 5c26de3 to 94596aa Compare March 23, 2019 01:57
@Xarthisius Xarthisius changed the base branch from master to refactor_register_rest March 23, 2019 01:58
@Xarthisius Xarthisius force-pushed the import_tale_as_a_file branch 2 times, most recently from 0a5b4e8 to 4692470 Compare March 25, 2019 13:43
@Xarthisius Xarthisius changed the base branch from refactor_register_rest to master March 25, 2019 13:43
@Xarthisius Xarthisius force-pushed the import_tale_as_a_file branch 2 times, most recently from 3e89d6f to 9eacf44 Compare March 27, 2019 18:47
@Xarthisius Xarthisius changed the title [WIP] Accept serialized Tale in POST /tale/import Accept serialized Tale in POST /tale/import May 6, 2019
Copy link
Member

@ThomasThelen ThomasThelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty awesome. I followed your testing steps and got the Tale back with the workspace. One note that is that I used https in the curl request (http will give Temporary Redirect).

Copy link

@craig-willis craig-willis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That did it.

@Xarthisius Xarthisius merged commit 0e9db92 into master Jun 18, 2019
@Xarthisius Xarthisius deleted the import_tale_as_a_file branch August 16, 2019 16:05
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.

None yet

3 participants