Skip to content

Commit 6e1e726

Browse files
committed
Docstring and documentation improvements.
- Add new ``planemo docs`` command to open Planemo docs in a web browser. - Add docstrings to all command modules.
1 parent 2c90559 commit 6e1e726

39 files changed

+71
-33
lines changed

docs/planemo.commands.rst

+8
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ planemo.commands.cmd_docker_shell module
108108
:undoc-members:
109109
:show-inheritance:
110110

111+
planemo.commands.cmd_docs module
112+
--------------------------------
113+
114+
.. automodule:: planemo.commands.cmd_docs
115+
:members:
116+
:undoc-members:
117+
:show-inheritance:
118+
111119
planemo.commands.cmd_lint module
112120
--------------------------------
113121

planemo/cli.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,17 @@ def get_command(self, ctx, name):
117117
envvar="PLANEMO_GLOBAL_WORKSPACE",
118118
help="Workspace for planemo.")
119119
@pass_context
120-
def planemo(ctx, config, directory, verbose):
121-
"""Utilities to assist with the development of Galaxy tools."""
120+
def planemo(ctx, config, directory, verbose): # noqa
121+
"""A command-line toolkit for building tools and workflows for Galaxy.
122+
123+
Check out the full documentation for Planemo online
124+
http://planemo.readthedocs.org or open with ``planemo docs``.
125+
"""
122126
ctx.verbose = verbose
123127
ctx.planemo_config = os.path.expanduser(config)
124128
ctx.planemo_directory = os.path.expanduser(directory)
129+
130+
131+
__all__ = [
132+
"planemo",
133+
]

planemo/commands/cmd_brew.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``brew`` command."""
12
import click
23

34
from planemo.cli import pass_context

planemo/commands/cmd_brew_env.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``brew_env`` command."""
12
from __future__ import print_function
23
import click
34
import os

planemo/commands/cmd_brew_init.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``brew_init`` command."""
12
import click
23

34
import urllib

planemo/commands/cmd_conda_env.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``conda_env`` command."""
12
from __future__ import print_function
23
import click
34

planemo/commands/cmd_conda_init.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``conda_init`` command."""
12
import click
23

34
from planemo.cli import pass_context

planemo/commands/cmd_conda_install.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``conda_install`` command."""
12
import click
23

34
from planemo.cli import pass_context

planemo/commands/cmd_config_init.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``config_init`` command."""
32
import os
43
import sys
54

planemo/commands/cmd_create_gist.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``create_gist`` command."""
32
import click
43

54
from planemo.cli import pass_context

planemo/commands/cmd_cwl_run.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``cwl_run`` command."""
12
import click
23
from planemo.cli import pass_context
34
from planemo import options

planemo/commands/cmd_cwl_script.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``cwl_script`` command."""
32
from __future__ import print_function
43

54
import click

planemo/commands/cmd_dependency_script.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``dependency_script`` command."""
12
import os
23
import sys
34

planemo/commands/cmd_docker_build.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``docker_build`` command."""
12
import click
23
from planemo.cli import pass_context
34
from planemo import options

planemo/commands/cmd_docker_shell.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
"""The docker_shell command takes the path to a single tool file and returns
1+
"""Module describing the planemo ``docker_shell`` command.
2+
3+
The docker_shell command takes the path to a single tool file and returns
24
a new command to launch a new shell into the corresponding Docker container
35
for that tool.
46

planemo/commands/cmd_docs.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""Module describing the planemo ``docs`` command."""
2+
import click
3+
4+
from planemo.cli import pass_context
5+
6+
SYNTAX_URL = "http://planemo.readthedocs.org/en/latest/"
7+
8+
9+
@click.command("syntax")
10+
@pass_context
11+
def cli(ctx, **kwds):
12+
"""Open the Planemo documentation in a web browser."""
13+
click.launch(SYNTAX_URL)

planemo/commands/cmd_lint.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``lint`` command."""
12
import sys
23

34
import click

planemo/commands/cmd_normalize.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``normalize`` command."""
12
from xml.etree import ElementTree
23

34
import click

planemo/commands/cmd_project_init.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``project_init`` command."""
32
import os
43
import tempfile
54
import shutil

planemo/commands/cmd_serve.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``serve`` command."""
12
import click
23

34
from planemo.cli import pass_context

planemo/commands/cmd_share_test.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``share_test`` command."""
32
import click
43

54
from planemo.cli import pass_context

planemo/commands/cmd_shed_build.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_build`` command."""
32
import sys
43

54
import click

planemo/commands/cmd_shed_create.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_create`` command."""
32
import sys
43

54
import click

planemo/commands/cmd_shed_diff.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_diff`` command."""
32
import sys
43
import tempfile
54
import shutil

planemo/commands/cmd_shed_download.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_download`` command."""
32
import sys
43

54
import click

planemo/commands/cmd_shed_init.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``shed_init`` command."""
12
import click
23
import sys
34

planemo/commands/cmd_shed_lint.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``shed_lint`` command."""
12
import click
23
import sys
34

planemo/commands/cmd_shed_serve.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_serve`` command."""
32
import time
43
import click
54

planemo/commands/cmd_shed_test.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_test`` command."""
32
import socket
43
import sys
54

planemo/commands/cmd_shed_update.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_update`` command."""
32
import sys
43

54
import click

planemo/commands/cmd_shed_upload.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``shed_upload`` command."""
32
import sys
43

54
import click

planemo/commands/cmd_syntax.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
"""
1+
"""Module describing the planemo ``syntax`` command."""
32
import click
43

54
from planemo.cli import pass_context
@@ -10,6 +9,5 @@
109
@click.command("syntax")
1110
@pass_context
1211
def cli(ctx, **kwds):
13-
"""Open tool config syntax wiki page in a web browser.
14-
"""
12+
"""Open tool config syntax wiki page in a web browser."""
1513
click.launch(SYNTAX_URL)

planemo/commands/cmd_test.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``test`` command."""
12
import sys
23

34
import click

planemo/commands/cmd_test_reports.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``test_reports`` command."""
12
import os
23

34
import click

planemo/commands/cmd_tool_factory.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``tool_factory`` command."""
12
import os
23

34
import click

planemo/commands/cmd_tool_init.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``tool_init`` command."""
12
import os
23
import sys
34

planemo/commands/cmd_travis_before_install.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``travis_before_install`` command."""
12
import os
23
import string
34

planemo/commands/cmd_travis_init.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``travis_init`` command."""
12
import os
23

34
import click

planemo/commands/cmd_virtualenv.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module describing the planemo ``virtualenv`` command."""
12
import click
23

34
from planemo.cli import pass_context

0 commit comments

Comments
 (0)