[galaxy-dev] Fix for missing included files from history export and import

2015-07-03 Thread Vimalkumar Velayudhan
Hi all,
For some of the recent tools we have developed on our Galaxy instance (
http://ribogalaxy.ucc.ie),
we were using the approach mentioned in the wiki for writing a single HTML
output file with links to additional output files (images, csv etc.,). This
is much nicer than generating multiple output files in the history panel.
However, the exported histories did not contain these included files. I
have now fixed this bug on our instance and have also created a pull
request on Github (#417 
).

Implementation details:

1. Include the extra_files_path attribute on the dataset which is being
exported.

2. Check if there are any files in the extra_files_path for each dataset
that will be included in the archive.

3. If there are files present, create a new directory and save files to
this directory. This directory will then be included in exported archive.
The dataset's history ID is appended to both the directory and the
dataset's name to prevent conflict with a dataset of the same name.

Testing:

A simple tool to test html export with included files is available at:
https://testtoolshed.g2.bx.psu.edu/repos/vimalkumarvelayudhan/html_export

Regards,

Vimalkumar Velayudhan
___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Re: [galaxy-dev] Problem finding depency for none toolshed tools

2015-07-03 Thread Christian Brenninkmeijer
Hi All,


I have withdrawn the pull request after useful comments from [X] Nicola Soranzo 
and John Chilton and upon finding a bug that results in a worse error in testing

I have had another go at adding this feature.
This time as a new resolver to be plugged in.

Adding at John Chilton suggestion ranking in cases where more that one possible 
revision of the same dependency can be found.

I have the code in a fork:
https://github.com/Christian-B/galaxy/blob/dev/lib/galaxy/tools/deps/resolvers/unlinked_tool_shed_packages.py

If I want to submit a pull request is this best done against master or dev?
Also should I submit a Jira(ish) ticket for this as well? If so where?

Christian

From: galaxy-dev [galaxy-dev-boun...@lists.galaxyproject.org] on behalf of 
Christian Brenninkmeijer [christian.brenninkmei...@manchester.ac.uk]
Sent: Wednesday, July 01, 2015 1:17 PM
To: galaxy-dev@lists.galaxyproject.org
Subject: [galaxy-dev] Problem finding depency for none toolshed tools

Hi,
I have been testing tools not yet ready for a tool-shed but had trouble finding 
the dependencies as there was no database entries to load these.


The code in lib/galaxy/tools/deps/resolvers/galaxy_packages.py assumes that the 
env.sh or bin directory will be in dependency_dir/package/version when in fact 
it is often in dependency_dir/
package/version/owner/package_name/revision.


I have created a pull request with some code to find the dependency in the sub 
directory

https://github.com/galaxyproject/galaxy/pull/413

As I am relatively new to galaxy I have probably broken lots of 
rules/agreements on how I did the pull request. If so please let me know where 
I went wrong so I can redo it properly.

Christian

PS.
This is my proposed change to 
lib/galaxy/tools/deps/resolvers/galaxy_packages.py:
def _find_dep_versioned( self, name, version, type='package', **kwds ):
#First try the way without owner/name/revision
path = join( self.base_path, name, version )
package = self._galaxy_package_dep(path, version)
if package != INDETERMINATE_DEPENDENCY:
return package
#now try with an owner/name/revision
for owner in listdir(path):
owner_path = path + "/" + owner
for package_name in listdir(owner_path):
if package_name.startswith("package_"+name):
package_path = owner_path + "/" + package_name
for revision in listdir(package_path):
revision_path = package_path + "/" + revision
package = self._galaxy_package_dep(revision_path, 
version)
if package != INDETERMINATE_DEPENDENCY:
return package
return INDETERMINATE_DEPENDENCY

___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/