Skip to content
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

Add --no_shed_install option. #841

Merged
merged 1 commit into from
May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions docs/test_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ same testing file format is used for both kinds of artifacts.
job: pear_job.yml
outputs:
assembled_pairs:
file: test-data/pear_assembled_results1.fastq
path: test-data/pear_assembled_results1.fastq
unassembled_forward_reads:
file: test-data/pear_unassembled_forward_results1.fastq
path: test-data/pear_unassembled_forward_results1.fastq


.. code-block:: yaml
Expand All @@ -50,13 +50,13 @@ same testing file format is used for both kinds of artifacts.
path: mutant_R2.fastq
wildtype.fna:
class: File
path: wildtype.fna
location: https://zenodo.org/record/582600/files/wildtype.fna
wildtype.gbk:
class: File
path: wildtype.gbk
location: https://zenodo.org/record/582600/files/wildtype.gbk
wildtype.gff:
class: File
path: wildtype.gff
location: https://zenodo.org/record/582600/files/wildtype.gff
outputs:
jbrowse_html:
asserts:
Expand Down Expand Up @@ -85,6 +85,11 @@ The job input file is a proper CWL_ job document - which is fairly straight forw
the above examples. Planemo adapts the CWL_ job document to Galaxy_ workflows and tools - using input
names for Galaxy_ tools and input node labels for workflows.

Input files can be specified using either ``path`` attributes (which should generally be file
paths relative to the aritfact and test directory) or ``location`` (which should be a URI). The
examples above demonstrate using both paths relative to the tool file and test data published
to `Zenodo <https://zenodo.org/>`__.

.. note::

These job objects can be run directly with ``planemo run``.
Expand Down Expand Up @@ -241,11 +246,13 @@ option to mount test data into the testing container.
``external_galaxy``
~~~~~~~~~~~~~~~~~~~~

$ planemo test --engine external_galaxy --galaxy_admin_key <admin_key> --galaxy_user_key <user_key> --galaxy_user <url>
$ planemo test --engine external_galaxy --galaxy_admin_key <admin_key> --galaxy_user_key <user_key> [--no_shed_install] <url>

This is primarily useful for testing workflows against already running Galaxy instances. An admin or
master API key should be supplied to install missing tool repositories for the workflow and a user API
key should be supplied to run the workflow using.
key should be supplied to run the workflow using. If you wish to skip tool shed repository installation
(this requires the tool all be present already), use the ``-no_shed_install`` option with the ``test``
command.

To run tool tests against a running Galaxy, ``galaxy-tool-test`` is a script that gets installed with
galaxy-lib and so may very well already be on your ``PATH``. Check out the options available with that
Expand Down
4 changes: 3 additions & 1 deletion planemo/galaxy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,9 @@ def install_workflows(self):
self._install_workflow(runnable)

def _install_workflow(self, runnable):
install_shed_repos(runnable, self.gi, self._kwds.get("ignore_dependency_problems", False))
if self._kwds["shed_install"]:
install_shed_repos(runnable, self.gi, self._kwds.get("ignore_dependency_problems", False))

# TODO: Allow serialization so this doesn't need to assume a
# shared filesystem with Galaxy server.
from_path = runnable.type.name == "cwl_workflow"
Expand Down
13 changes: 13 additions & 0 deletions planemo/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,17 @@ def paste_test_data_paths_option():
)


def shed_install_option():
return planemo_option(
"--shed_install/--no_shed_install",
is_flag=True,
default=True,
help=("By default Planemo will attempt to install repositories needed for workflow "
"testing. This may not be appropriate for production servers and so this can "
"disabled by calling planemo with --no_shed_install.")
)


def single_user_mode_option():
return planemo_option(
"galaxy_single_user",
Expand Down Expand Up @@ -1108,6 +1119,7 @@ def galaxy_serve_options():
daemon_option(),
pid_file_option(),
ignore_dependency_problems_option(),
shed_install_option()
)


Expand Down Expand Up @@ -1203,6 +1215,7 @@ def engine_options():
docker_galaxy_image_option(),
docker_extra_volume_option(),
ignore_dependency_problems_option(),
shed_install_option(),
galaxy_url_option(),
galaxy_admin_key_option(),
galaxy_user_key_option(),
Expand Down