Skip to content

get all tools when searching for tool ids for testing (get_tools instead of get_tool_panel)#159

Merged
mvdbeek merged 2 commits intogalaxyproject:masterfrom
cat-bro:use_get_tools_instead_of_get_tool_panel_to_find_tool_ids
May 8, 2020
Merged

get all tools when searching for tool ids for testing (get_tools instead of get_tool_panel)#159
mvdbeek merged 2 commits intogalaxyproject:masterfrom
cat-bro:use_get_tools_instead_of_get_tool_panel_to_find_tool_ids

Conversation

@cat-bro
Copy link
Copy Markdown
Contributor

@cat-bro cat-bro commented Apr 22, 2020

When shed-tools looks for tests, it looks for tool ids within the output of get_tool_panel. There is generally only one version of a tool in the panel but there could be several versions of the tool installed. I'd like to be able to run tests for older revisions of tools. Currently if the --revisions arg does not correspond to the version in the panel, no tests are run.

My proposed change is to look in the output of get_tools instead of get_tool_panel if the revision is provided.

I'm not sure what should happen when there is no changeset revision - I've defaulted using get_tool_panel in this case to look for what is usually the most recent version, but I could change this so that it runs tests from all versions.

Catherine, Galaxy Australia

@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Apr 25, 2020

Thanks, this looks good, but could you you make this a non-default option please ?

@cat-bro
Copy link
Copy Markdown
Contributor Author

cat-bro commented Apr 25, 2020

Hi @mvdbeek, thanks for reviewing. What is meant by 'make this a non-default option'? That instead of tools_for_repository having the extra argument all_tools, it should be calling get_tools instead of get_tool_panel as standard behaviour?

@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Apr 26, 2020

Yes, if you can add something like --all_versions in

test_command_parser.add_argument(

@cat-bro
Copy link
Copy Markdown
Contributor Author

cat-bro commented May 8, 2020

Hi @mvdbeek, I've added this as boolean --test_all_versions (default False)

The expected behaviour is that if the user has specified the revisions that they want to test, the --revisions argument outranks --test_all_versions and only the specified revisions are tested. If no revisions are specified, using --test_all_versions will mean that all versions are tested.

For example, if the tool has two revisions, old_revision_hash and new_revision_hash and only the new one is in the tool panel:

shed-tools test --name abc --owner def --test_all_versions # test both versions

shed-tools test --name abc --owner def # test latest version

shed-tools test --name abc --owner def --revisions old_revision_hash # test old version

shed-tools test --name abc --owner def --revisions old_revision_hash --test_all_versions  # test old version

shed-tools test --name abc --owner def --revisions new_revision_hash old_revision_hash # test both versions

@cat-bro cat-bro force-pushed the use_get_tools_instead_of_get_tool_panel_to_find_tool_ids branch from 8ff1630 to b98faae Compare May 8, 2020 03:58
Copy link
Copy Markdown
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Thanks so much, looks very good!

@mvdbeek mvdbeek merged commit 474a1c1 into galaxyproject:master May 8, 2020
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.

2 participants