Exemple #1
0
def cli(ctx, **kwds):
    """(Experimental) Launch Galaxy with the Tool Factory 2 available.

    For more information about the Galaxy Tool Factory see the publication
    Creating reusable tools from scripts: the Galaxy Tool Factory by Lazarus
    et. al. (10.1093/bioinformatics/bts573). Available at
    http://www.ncbi.nlm.nih.gov/pubmed/23024011.
    """
    mod_dir = os.path.dirname(__file__)
    tf_dir = os.path.join(mod_dir, '..', '..', 'planemo_ext', 'tool_factory_2')
    galaxy_serve.serve(ctx, [os.path.abspath(tf_dir)], **kwds)
Exemple #2
0
def cli(ctx, paths, **kwds):
    """Launch a Galaxy instance with the specified tool in the tool panel.

    The Galaxy tool panel will include just the referenced tool or tools (by
    default all the tools in the current working directory) and the upload
    tool.

    planemo will search parent directories to see if any is a Galaxy instance
    - but one can pick the Galaxy instance to use with the ``--galaxy_root``
    option or force planemo to download a disposable instance with the
    ``--install_galaxy`` flag.

    ``planemo`` uses temporarily generated config files and environment
    variables to attempt to shield this execution of Galaxy from manually
    launched runs against that same Galaxy root - but this may not be bullet
    proof yet so please careful and do not try this against production Galaxy
    instances.
    """
    galaxy_serve.serve(ctx, paths, **kwds)
Exemple #3
0
    def test_serve_daemon(self):
        port = network_util.get_free_port()
        cat_path = os.path.join(TEST_REPOS_DIR, "single_tool", "cat.xml")
        config = galaxy_serve.serve(
            self.test_context,
            cat_path,
            install_galaxy=True,
            port=port,
            daemon=True,
        )

        assert network_util.wait_net_service(
            "localhost",
            config.port,
            timeout=.1,
        )
        config_dict = config.gi.config.get_config()
        assert "allow_user_dataset_purge" in config_dict
        config.kill()
        assert not network_util.wait_net_service(
            "localhost",
            config.port,
            timeout=.1,
        )
    def test_serve_daemon(self):
        port = network_util.get_free_port()
        cat_path = os.path.join(TEST_REPOS_DIR, "single_tool", "cat.xml")
        config = galaxy_serve.serve(
            self.test_context,
            cat_path,
            install_galaxy=True,
            port=port,
            daemon=True,
        )

        assert network_util.wait_net_service(
            "localhost",
            config.port,
            timeout=.1,
        )
        config_dict = config.gi.config.get_config()
        assert "allow_user_dataset_purge" in config_dict
        config.kill()
        assert not network_util.wait_net_service(
            "localhost",
            config.port,
            timeout=.1,
        )