Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Importing old exported histories failing #4268
I have exported histories on older versions of galaxy (<17.01) in order to keep them as backup. I can not import them anymore in newer version.
While exporting histories on older versions of galaxy (using the bioblend API) there was a subdirectory created at the base of the archive (Galaxy-History-). This is not the format expected by the import history tool which expects all the data to be found on the base of the archive and the datasets in a 'datasets' subdirectory. This produces a 'history_attrs.txt' file not found error and the import fails.
The workaround implemented is to check for the existence of 'history_attrs.txt' on the base of the archive and if not found check for the existence in the subdirectory of the archive.
Hi Marius, The only file I have with me is the one in attach. This file was exported through the API (bioblend). Cheers, Cristian…
On 30 Jun 2017, at 12:28, Marius van den Beek ***@***.***> wrote: So I tried exporting a history from 16.07 and importing to dev, and that worked (which is not to say it works all the time of course). Do you have a small example of a failing import ? Otherwise the code looks fine to me. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#4268 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AClk0ea-Cx4rXn54rtgZFd-VbJmEyY-bks5sJM3jgaJpZM4OJTtm>.
I see that the style is to have spaces between the ( ) and the code inside so I adapted the code to that style. First contribution to galaxy so glad to be couched step by step ;-) C.…
On 30 Jun 2017, at 12:24, Marius van den Beek ***@***.***> wrote: @mvdbeek commented on this pull request. In lib/galaxy/tools/imp_exp/__init__.py <#4268 (comment)>: > @@ -74,6 +74,11 @@ def get_tag_str( tag, value ): # # Create history. # + if not os.path.exists(os.path.join( archive_dir, 'history_attrs.txt')): Sorry for the piecemeal review, but could you drop the whitespace before archive_dir, move the added code before the existing comment and add a comment saying something like '# Galaxy pre 17.01 stored exported histories in a subdirectory ? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#4268 (review)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AClk0egp9ui44RO7h5wRTPN5vSCrLUPyks5sJMzAgaJpZM4OJTtm>.
Jul 12, 2017
5 checks passed
For future-@jmchilton or others to look into this more - here is a patch to allow testing the import of that history:
Run the tests with: