Skip to main content

Command-line utilities to assist in building tools for the Galaxy project (http://galaxyproject.org/).

Project description

https://travis-ci.org/galaxyproject/planemo.png?branch=master https://readthedocs.org/projects/pip/badge/?version=latest https://pypip.in/d/planemo/badge.png

Command-line utilities to assist in building tools for the Galaxy project.

Quick Start

This quick start demonstrates using planemo commands to help develop Galaxy tools. Planemo can quickly be installed via Homebrew or as a more traditional Python project.

To install using Homebrew or linuxbrew:

brew tap galaxyproject/tap
brew install planemo

For a more traditional Python installation simply setup a virtualenv for planemo (this example creates a new one in .venv) and then install with pip.

% virtualenv .venv; . .venv/bin/activate
% pip install planemo

Planemo is also available a virtual appliance for Docker or Vagrant (bundled with a preconfigured Galaxy server optimized for tool development).

This quick start will assume you will have a directory with one or more tool XML files. If none is available, one can be quickly create for demonstrating planemo as follows mkdir mytools; cd mytools; planemo project_init --template=demo.

Planemo can check tools containing XML for common problems and best practices using the lint command (also aliased as l).

% planemo lint
...

Like many planemo commands - by default this will search the current directory and use all tool files it finds. It can be explicitly passed other tool files or a directory of tool files.

% planemo l randomlines.xml

The lint command takes in a additional options related to reporting levels, exit code, etc…. These options are descirbed here or (like all available commands) be accessed by passing it --help.:

% planemo l --help
Usage: planemo lint [OPTIONS] TOOL_PATH
...

Once tools are syntically correct - it is time to test. The test command can be used to test a tool or directory of tools.:

% planemo test --galaxy_root=../galaxy-central randomlines.xml

If no --galaxy_root is defined, planemo will check for a default in ~/.planemo.yml) and finally search the tool’s parent directories for a Galaxy root directory (developing tools under Galaxy tools directory is a common development workflow). Planemo can also download and configure a disposable Galaxy instance just for testing by passing it -install_galaxy instead of a Galaxy root.:

% planemo t --install_galaxy

Warning: The features of Planemo that require a --galaxy_root will only work with the latest galaxy-central default branch. Planemo will not work when used with older versions of Galaxy - even the latest stable latest_2014.10.06. Planemo will stablize with the next release of Galaxy and serious attempts at backward compatibility going forward will be made at that time.

Planemo will create a HTML an output report in the current directory named tool_test_output.html (override with --test_output). Here is an example of such a report for Tophat.

Once tools have been linted and tested - the tools can be viewed in a Galaxy interface using the serve (s) command.:

% planemo serve

Like test, serve requires a Galaxy root and one can be explicitly specified with --galaxy_root or installed dynamically with --install_galaxy.

Finally, when tools are ready to be published to GitHub, it may be valuable to setup contineous integration to test changes committed and new pull requests. Travis CI is a service providing free testing and deep integration with GitHub.

The travis_init command will bootstrap a project with files to ease contineous inegration of tools using a Planemo driven approach inspired by this great blog post by Peter Cock.

% planemo travis_init .
% # setup Ubuntu 12.04 w/tool dependencies
% vim .travis/setup_custom_dependencies.bash
% git add .travis.yml .travis
% git commit -m "Add Travis CI testing infrastructure for tools."
% git push # and register repository @ http://travis-ci.org/

Experimental Features

While Planemo is very experimental itself - it can also be used to explore some more experimental features related to Galaxy tooling - including support for Docker and Brew.

Docker

Galaxy has experimental support for running jobs in Docker containers. Planemo contains tools to assist in development of Docker images for Galaxy tools.

A shell can be launched to explore the Docker enviornment referenced by tools that are annotated with publically registered Docker images.:

% $(planemo docker_shell bowtie2.xml)

For Docker containers still in development - a Dockerfile can be associated with a tool by sticking it in the tool’s directory. Planemo can then build and tag a Docker image for this tool and launch a shell into it using the following commands.:

% planemo docker_build bowtie2.xml # asssumes Dockerfile in same dir
% $(planemo docker_shell --from_tag bowtie2.xml)

For more details see the documentation for the docker_build and docker_shell commands.

Brew

The Galaxy development team is exploring different options for integrating Homebrew and linuxbrew with Galaxy. One angle is resolving the tool requirements using brew. An experimental approach for versioning of brew recipes will be used. See full discussion on the homebrew-science issues page here - https://github.com/Homebrew/homebrew-science/issues/1191. Information on the implementation can be found https://github.com/jmchilton/platform-brew until a more permanent project home is setup.

% planemo brew_init # install linuxbrew (only need if not already installed)
% planemo brew # install dependencies for all tools in directory.
% planemo brew bowtie2.xml # install dependencies for one tool
% which bowtie2
bowtie2 not found
% . <(planemo brew_env --shell bowtie2.xml) # shell w/brew deps resolved
(bowtie2) % which bowtie2
/home/john/.linuxbrew/Cellar/bowtie2/2.1.0/bin/bowtie2
(bowtie2) % exit
% . <(planemo brew_env bowtie2.xml) # or just source deps in cur env
% which bowtie2
/home/john/.linuxbrew/Cellar/bowtie2/2.1.0/bin/bowtie2

For more information see the documentation for the brew and brew_env commands.

History

0.5.0 (2015-02-22)

  • Implement --version option. Issue 78

  • Implement --no_cleanup option for test and serve commands to persist temp files. 2e41e0a

  • Fix bug that left temp files undeleted. Issue 80

  • More improvements to release process. fba3874

0.4.2 (2015-02-21)

  • Fix setup.py for installing non-Python data from PyPI (required newer for tool_factory command and reStructuredText linting). Thanks to Damion Dooley for the bug report. Issue 83

0.4.1 (2015-02-16)

  • Fix README.rst so it renders properly on PyPI.

0.4.0 (2015-02-16)

  • Implement tool_init command for bootstrapping creation of new tools (with tutorial.) 78f8274

  • Implement normalize command for reorganizing tool XML and macro debugging. e8c1d45

  • Implement tool_factory command to spin up Galaxy pre-configured the Tool Factory. 9e746b4

  • Added basic linting of command blocks. b8d90ab

  • Improved linting of help blocks, including verifying valid reStructuredText. 411a8da

  • Fix bug related to serve command not killing Galaxy properly when complete. 53a6766

  • Have serve command display tools at the top level instead of in shallow sections. badc25f

  • Add additional dependencies to setup.py more functionality works out of the box. 85b9614

  • Fix terrible error message related to bioblend being unavailable. Issue 70

  • Various smaller documentation and project structure improvements.

0.3.1 (2015-02-15)

  • Fixes to get PyPI workflow working properly.

0.3.0 (2015-02-13)

  • Add option (-r) to the shed_upload command to recursively upload subdirectories (thanks to Eric Rasche). Pull Request 68

  • Fix diff formatting in test reports (thanks to Eric Rasche). Pull Request 63

  • Grab updated test database to speed up testing (thanks to approach from Eric Rasche and Dannon Baker). Issue 61, dff4f33

  • Fix test data command-line argument name (was test-data now it is test_data). 834bfb2

  • Use tool_data_table_conf.xml.sample file if tool_data_table_conf.xml.test is unavailable. Should allow some new tools to be tested without modifying Galaxy’s global tool_data_table_conf.xml file. ac4f828

0.2.0 (2015-01-13)

  • Improvements to way Planemo loads its own copy of Galaxy modules to prevent various conflicts when launching Galaxy from Planemo. Pull Request 56

  • Allow setting various test output options in ~/.planemo.yml and disabling JSON output. 21bb463

  • More experimental Brew and Tool Shed options that should not be considered part of Planemo’s stable API. See bit.ly/gxbrew1 for more details.

  • Fix project_init for BSD tar (thanks to Nitesh Turaga for the bug report.) a4110a8

  • Documentation fixes for tool linting command (thanks to Nicola Soranzo). Pull Request 51

0.1.0 (2014-12-16)

  • Moved repository URL to https://github.com/galaxyproject/planemo.

  • Support for publishing to the Tool Shed. Pull Request 6

  • Support for producing diffs (shed_diff) between local repositories and the Tool Shed (based on scripts by Peter Cock). Pull Request 33

  • Use tool’s local test data when available - add option for configuring test-data target. Pull Request 1

  • Support for testing tool features dependent on cached data. 44de95c

  • Support for generating XUnit tool test reports. 82e8b1f

  • Prettier HTML reports for tool tests. 05cc9f4

  • Implement share_test command for embedding test result links in pull requests. Pull Request 40

  • Fix for properly resolving links during Tool Shed publishing (thanks to Dave Bouvier). Pull Request 29

  • Fix for citation linter (thanks to Michael Crusoe for the bug report). af39061

  • Fix tool scanning for tool files with fewer than 10 lines (thanks to Dan Blankenberg). a2c13e4

  • Automate more of Travis CI testing so the scripts added to tool repository can be smaller. 20a8680

  • Documentation fixes for Travis CI (thanks to Peter Cock). Pull Request 22, Pull Request 23

  • Various documentation fixes (thanks to Martin Čech). 36f7cb11, b9232e55

  • Various smaller fixes for Docker support, tool linting, and documentation.

0.0.1 (2014-10-04)

  • Initial work on the project - commands for testing, linting, serving Galaxy tools - and more experimental features involving Docker and Homebrew. 7d07782

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

planemo-0.5.0.tar.gz (157.2 kB view details)

Uploaded Source

Built Distributions

planemo-0.5.0-py2.py3-none-any.whl (178.1 kB view details)

Uploaded Python 2 Python 3

planemo-0.5.0-py2.7.egg (296.6 kB view details)

Uploaded Source

File details

Details for the file planemo-0.5.0.tar.gz.

File metadata

  • Download URL: planemo-0.5.0.tar.gz
  • Upload date:
  • Size: 157.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for planemo-0.5.0.tar.gz
Algorithm Hash digest
SHA256 77111d11f2ad7de4770cab0b2df3241362e7217479fbc01b978c2280954058f8
MD5 d7513dd1f69be197064138466c4f20e9
BLAKE2b-256 7314a59497e032cf6e83f8e3c8be5df19d8df56c67062fe5253451d277bb69fd

See more details on using hashes here.

File details

Details for the file planemo-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for planemo-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c90b19f4ba81f3da0fd0487965607a4c3091bd6134222dc4e90f234d26459d4a
MD5 b2fe8fc014a4da9c9447c1ba0e5c98c0
BLAKE2b-256 42da07295e26dcd64d422debe2f45391ce86a78f1b30c9fd39809e662236cb29

See more details on using hashes here.

File details

Details for the file planemo-0.5.0-py2.7.egg.

File metadata

  • Download URL: planemo-0.5.0-py2.7.egg
  • Upload date:
  • Size: 296.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for planemo-0.5.0-py2.7.egg
Algorithm Hash digest
SHA256 0c96385970d149394eee10183c23b35e650ac0549317a996cbc9e35894289158
MD5 6c682ea2056d5aace33ce17820f979e5
BLAKE2b-256 1b06c3e1df05243829916008ea8030f18504bf8a946d4bd0a9f62075190a45fc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page