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

Replace history import form #4993

Merged
merged 21 commits into from Nov 29, 2017

Conversation

Projects
None yet
4 participants
@guerler
Contributor

guerler commented Nov 13, 2017

The history import form is the last form which relies on makos. This PR replaces the form using js and redirects the post request to the existing api endpoint. It should be very easy to transform this new js-view into vue once available.

@guerler guerler added this to the 18.01 milestone Nov 13, 2017

@guerler guerler changed the title from Replace history import to Replace history import form Nov 13, 2017

archive_source = payload["archive_file"].file.name
archive_type = "file"
else:
raise exceptions.MessageException("Please provide a url or file.")

This comment has been minimized.

@jmchilton

jmchilton Nov 13, 2017

Member

Thanks for the backend fix - sorry about that issues!

This comment has been minimized.

@guerler

guerler Nov 13, 2017

Contributor

No worries, thx for looking into it. It was helpful. I wonder if I can further improve the api parameter handling or if its good that archive_source is passed empty and then filled through the name in archive_file.

@mvdbeek mvdbeek self-requested a review Nov 27, 2017

@mvdbeek

This comment has been minimized.

Member

mvdbeek commented Nov 28, 2017

@guerler I think I may have figured out your issue (#4345 (comment)) with importing histories by URL (I had only tested file export/import, not the URL based import). If my changes are OK and this works for you i'm happy to merge.

@jmchilton

This comment has been minimized.

Member

jmchilton commented Nov 28, 2017

history-import.vue missing?

@@ -1,7 +1,7 @@
<tool id="__IMPORT_HISTORY__" name="Import History" version="0.1" tool_type="import_history">
<type class="ImportHistoryTool" module="galaxy.tools"/>
<action module="galaxy.tools.actions.history_imp_exp" class="ImportHistoryToolAction"/>
<command interpreter="python">unpack_tar_gz_archive.py "${ str( $__ARCHIVE_SOURCE__ ).encode( 'base64' ) }" "${ str( $__DEST_DIR__ ).encode( 'base64' ) }" --$__ARCHIVE_TYPE__ --encoded</command>
<command>python $__tool_directory__/unpack_tar_gz_archive.py '${ str( $__ARCHIVE_SOURCE__ ).encode( 'base64' ) }' '${ str( $__DEST_DIR__ ).encode( 'base64' ) }' --$__ARCHIVE_TYPE__ --encoded</command>

This comment has been minimized.

@bgruening

bgruening Nov 28, 2017

Member

'$__tool_directory__/unpack_tar_gz_archive.py'

This comment has been minimized.

@guerler

guerler Nov 28, 2017

Contributor

I added quotes. Thanks @bgruening.

This comment has been minimized.

@mvdbeek

mvdbeek Nov 28, 2017

Member

For the record, I don't think this is necessary and we don't do this in the tool XSD (https://docs.galaxyproject.org/en/master/dev/schema.html#id2).

This comment has been minimized.

@mvdbeek

mvdbeek Nov 28, 2017

Member

I'm wrong, definitely necessary and the schema has been updated in the dev branch.

@guerler

This comment has been minimized.

Contributor

guerler commented Nov 28, 2017

Thanks @mvdbeek for tracking the import failure issue. The export/import using the file and the webbrowser works. The url import still causes issues for me.

@mvdbeek

This comment has been minimized.

Member

mvdbeek commented Nov 28, 2017

if you wget/curl the link, do you get the proper archive ?
I'm often forgetting to share the history, and then it fails with the same message because it's trying to unpack html ...

@guerler guerler added status/review and removed status/WIP labels Nov 28, 2017

@guerler

This comment has been minimized.

Contributor

guerler commented Nov 28, 2017

Thanks @mvdbeek that was the issue. It works fine now.

@mvdbeek mvdbeek merged commit 75a6d43 into galaxyproject:dev Nov 29, 2017

7 checks passed

api test Build finished. 317 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 163 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 58 tests run, 0 skipped, 0 failed.
Details
lgtm analysis: JavaScript No alert changes
Details
selenium test Build finished. 100 tests run, 1 skipped, 0 failed.
Details
toolshed test Build finished. 577 tests run, 0 skipped, 0 failed.
Details
@mvdbeek

This comment has been minimized.

Member

mvdbeek commented Nov 29, 2017

Nice, glad this works!

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