Permalink
Browse files

Docstring and documentation improvements.

 - Add new ``planemo docs`` command to open Planemo docs in a web browser.
 - Add docstrings to all command modules.
  • Loading branch information...
jmchilton committed Apr 12, 2016
1 parent 2c90559 commit 6e1e72615099a28dab9f0d995e0e1cc63a79426b
Showing with 71 additions and 33 deletions.
  1. +8 −0 docs/planemo.commands.rst
  2. +11 −2 planemo/cli.py
  3. +1 −0 planemo/commands/cmd_brew.py
  4. +1 −0 planemo/commands/cmd_brew_env.py
  5. +1 −0 planemo/commands/cmd_brew_init.py
  6. +1 −0 planemo/commands/cmd_conda_env.py
  7. +1 −0 planemo/commands/cmd_conda_init.py
  8. +1 −0 planemo/commands/cmd_conda_install.py
  9. +1 −2 planemo/commands/cmd_config_init.py
  10. +1 −2 planemo/commands/cmd_create_gist.py
  11. +1 −0 planemo/commands/cmd_cwl_run.py
  12. +1 −2 planemo/commands/cmd_cwl_script.py
  13. +1 −0 planemo/commands/cmd_dependency_script.py
  14. +1 −0 planemo/commands/cmd_docker_build.py
  15. +3 −1 planemo/commands/cmd_docker_shell.py
  16. +13 −0 planemo/commands/cmd_docs.py
  17. +1 −0 planemo/commands/cmd_lint.py
  18. +1 −0 planemo/commands/cmd_normalize.py
  19. +1 −2 planemo/commands/cmd_project_init.py
  20. +1 −0 planemo/commands/cmd_serve.py
  21. +1 −2 planemo/commands/cmd_share_test.py
  22. +1 −2 planemo/commands/cmd_shed_build.py
  23. +1 −2 planemo/commands/cmd_shed_create.py
  24. +1 −2 planemo/commands/cmd_shed_diff.py
  25. +1 −2 planemo/commands/cmd_shed_download.py
  26. +1 −0 planemo/commands/cmd_shed_init.py
  27. +1 −0 planemo/commands/cmd_shed_lint.py
  28. +1 −2 planemo/commands/cmd_shed_serve.py
  29. +1 −2 planemo/commands/cmd_shed_test.py
  30. +1 −2 planemo/commands/cmd_shed_update.py
  31. +1 −2 planemo/commands/cmd_shed_upload.py
  32. +2 −4 planemo/commands/cmd_syntax.py
  33. +1 −0 planemo/commands/cmd_test.py
  34. +1 −0 planemo/commands/cmd_test_reports.py
  35. +1 −0 planemo/commands/cmd_tool_factory.py
  36. +1 −0 planemo/commands/cmd_tool_init.py
  37. +1 −0 planemo/commands/cmd_travis_before_install.py
  38. +1 −0 planemo/commands/cmd_travis_init.py
  39. +1 −0 planemo/commands/cmd_virtualenv.py
@@ -108,6 +108,14 @@ planemo.commands.cmd_docker_shell module
:undoc-members:
:show-inheritance:

planemo.commands.cmd_docs module
--------------------------------

.. automodule:: planemo.commands.cmd_docs
:members:
:undoc-members:
:show-inheritance:

planemo.commands.cmd_lint module
--------------------------------

@@ -117,8 +117,17 @@ def get_command(self, ctx, name):
envvar="PLANEMO_GLOBAL_WORKSPACE",
help="Workspace for planemo.")
@pass_context
def planemo(ctx, config, directory, verbose):
"""Utilities to assist with the development of Galaxy tools."""
def planemo(ctx, config, directory, verbose): # noqa
"""A command-line toolkit for building tools and workflows for Galaxy.
Check out the full documentation for Planemo online
http://planemo.readthedocs.org or open with ``planemo docs``.
"""
ctx.verbose = verbose
ctx.planemo_config = os.path.expanduser(config)
ctx.planemo_directory = os.path.expanduser(directory)


__all__ = [
"planemo",
]
@@ -1,3 +1,4 @@
"""Module describing the planemo ``brew`` command."""
import click

from planemo.cli import pass_context
@@ -1,3 +1,4 @@
"""Module describing the planemo ``brew_env`` command."""
from __future__ import print_function
import click
import os
@@ -1,3 +1,4 @@
"""Module describing the planemo ``brew_init`` command."""
import click

import urllib
@@ -1,3 +1,4 @@
"""Module describing the planemo ``conda_env`` command."""
from __future__ import print_function
import click

@@ -1,3 +1,4 @@
"""Module describing the planemo ``conda_init`` command."""
import click

from planemo.cli import pass_context
@@ -1,3 +1,4 @@
"""Module describing the planemo ``conda_install`` command."""
import click

from planemo.cli import pass_context
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``config_init`` command."""
import os
import sys

@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``create_gist`` command."""
import click

from planemo.cli import pass_context
@@ -1,3 +1,4 @@
"""Module describing the planemo ``cwl_run`` command."""
import click
from planemo.cli import pass_context
from planemo import options
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``cwl_script`` command."""
from __future__ import print_function

import click
@@ -1,3 +1,4 @@
"""Module describing the planemo ``dependency_script`` command."""
import os
import sys

@@ -1,3 +1,4 @@
"""Module describing the planemo ``docker_build`` command."""
import click
from planemo.cli import pass_context
from planemo import options
@@ -1,4 +1,6 @@
"""The docker_shell command takes the path to a single tool file and returns
"""Module describing the planemo ``docker_shell`` command.
The docker_shell command takes the path to a single tool file and returns
a new command to launch a new shell into the corresponding Docker container
for that tool.
@@ -0,0 +1,13 @@
"""Module describing the planemo ``docs`` command."""
import click

from planemo.cli import pass_context

SYNTAX_URL = "http://planemo.readthedocs.org/en/latest/"


@click.command("syntax")
@pass_context
def cli(ctx, **kwds):
"""Open the Planemo documentation in a web browser."""
click.launch(SYNTAX_URL)
@@ -1,3 +1,4 @@
"""Module describing the planemo ``lint`` command."""
import sys

import click
@@ -1,3 +1,4 @@
"""Module describing the planemo ``normalize`` command."""
from xml.etree import ElementTree

import click
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``project_init`` command."""
import os
import tempfile
import shutil
@@ -1,3 +1,4 @@
"""Module describing the planemo ``serve`` command."""
import click

from planemo.cli import pass_context
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``share_test`` command."""
import click

from planemo.cli import pass_context
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_build`` command."""
import sys

import click
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_create`` command."""
import sys

import click
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_diff`` command."""
import sys
import tempfile
import shutil
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_download`` command."""
import sys

import click
@@ -1,3 +1,4 @@
"""Module describing the planemo ``shed_init`` command."""
import click
import sys

@@ -1,3 +1,4 @@
"""Module describing the planemo ``shed_lint`` command."""
import click
import sys

@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_serve`` command."""
import time
import click

@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_test`` command."""
import socket
import sys

@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_update`` command."""
import sys

import click
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``shed_upload`` command."""
import sys

import click
@@ -1,5 +1,4 @@
"""
"""
"""Module describing the planemo ``syntax`` command."""
import click

from planemo.cli import pass_context
@@ -10,6 +9,5 @@
@click.command("syntax")
@pass_context
def cli(ctx, **kwds):
"""Open tool config syntax wiki page in a web browser.
"""
"""Open tool config syntax wiki page in a web browser."""
click.launch(SYNTAX_URL)
@@ -1,3 +1,4 @@
"""Module describing the planemo ``test`` command."""
import sys

import click
@@ -1,3 +1,4 @@
"""Module describing the planemo ``test_reports`` command."""
import os

import click
@@ -1,3 +1,4 @@
"""Module describing the planemo ``tool_factory`` command."""
import os

import click
@@ -1,3 +1,4 @@
"""Module describing the planemo ``tool_init`` command."""
import os
import sys

@@ -1,3 +1,4 @@
"""Module describing the planemo ``travis_before_install`` command."""
import os
import string

@@ -1,3 +1,4 @@
"""Module describing the planemo ``travis_init`` command."""
import os

import click
@@ -1,3 +1,4 @@
"""Module describing the planemo ``virtualenv`` command."""
import click

from planemo.cli import pass_context

0 comments on commit 6e1e726

Please sign in to comment.