Skip to content

Command to compare repositories in different Tool Sheds #27

@peterjc

Description

@peterjc

I'm not sure if this falls under the planemo scope, but posting it here for discussion at least.

As part of my workflow of initially releasing tools on the Test Tool Shed, and then if there are no problems with the functional test, uploading them to the main Tool Shed, I would like a "ToolShed diff" command which could be used as follows:

$ shed_diff https://toolshed.g2.bx.psu.edu/view/peterjc/blast_rbh https://testtoolshed.g2.bx.psu.edu/view/peterjc/blast_rbh
...

I would like this to output something along the following lines (a bit of a hack using command line tools hg and diff to fetch and compare the files from the ToolShed), here showing a harmless diff in the dependencies:

$ hg clone https://peterjc@toolshed.g2.bx.psu.edu/repos/peterjc/blast_rbh blast_rbh_main
$ hg clone https://peterjc@testtoolshed.g2.bx.psu.edu/repos/peterjc/blast_rbh blast_rbh_test
$ rm -rf blast_rbh_main/.hg
$ rm -rf blast_rbh_test/.hg
$ diff -r blast_rbh_main blast_rbh_test
diff -r blast_rbh_main/tools/blast_rbh/tool_dependencies.xml blast_rbh_test/tools/blast_rbh/tool_dependencies.xml
4c4
<         <repository changeset_revision="5477a05cc158" name="package_biopython_1_64" owner="biopython" toolshed="https://toolshed.g2.bx.psu.edu" />

---
>         <repository changeset_revision="268128adb501" name="package_biopython_1_64" owner="biopython" toolshed="https://testtoolshed.g2.bx.psu.edu" />
7c7
<         <repository changeset_revision="0fe5d5c28ea2" name="package_blast_plus_2_2_30" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />

---
>         <repository changeset_revision="f69b90d89b62" name="package_blast_plus_2_2_30" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />

In terms of the tool command line API, alternative ways to specify the tool sheds might make sense here too? I'd probably setup an alias like this for the typical case where the same author ID owns both:

$ toolshed_main_test_diff peterjc/blast_rbh
...

This would help greatly in spotting when I have forgotten to push an update from the Test Tool Shed to the main Tool Shed.

However, it would be nice to compare any two tools (e.g. alternative versions of a wrapper from two different authors) which would work with the full URL style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions