Skip to content

Commit

Permalink
Merge pull request #318 from catkin/pre-0.4.0-docs-rebase
Browse files Browse the repository at this point in the history
pre-0.4.0 Documentation
  • Loading branch information
wjwwood committed Apr 14, 2016
2 parents 8722596 + a8e9795 commit efc54bd
Show file tree
Hide file tree
Showing 96 changed files with 13,524 additions and 1,834 deletions.
3 changes: 2 additions & 1 deletion .travis.before_install.bash
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

if [ "$TRAVIS_OS_NAME" == "linux" ]; then
echo "No Linux-specific before_install steps."
sudo apt-get install enchant -y
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
if [ "$PYTHON" == "/usr/local/bin/python3" ]; then
brew install python3
brew install enchant
fi
sudo pip install virtualenv
virtualenv -p $PYTHON venv
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ matrix:
before_install:
# Install catkin_tools dependencies
- source .travis.before_install.bash
- pip install setuptools argparse catkin-pkg distribute PyYAML psutil trollius osrf_pycommon
- pip install setuptools argparse catkin-pkg distribute PyYAML psutil trollius osrf_pycommon pyenchant sphinxcontrib-spelling
install:
# Install catkin_tools
- python setup.py develop
Expand All @@ -55,6 +55,7 @@ script:
# Build documentation
- pushd docs
- make html
- sphinx-build -b spelling . build -t use_spelling
- popd
notifications:
email: false
10 changes: 0 additions & 10 deletions catkin_tools/commands/catkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ def catkin_main(sysargs):
help='Forces catkin to output in color, even when the terminal does not appear to support it.')
add('--no-color', action='store_true', default=False,
help='Forces catkin to not use color in the output, regardless of the detect terminal type.')
add('--locate-extra-shell-verbs', action='store_true',
help='Returns the full path of the file to source for extra shell verbs, then exits.')

# Generate a list of verbs available
verbs = list_verbs()
Expand Down Expand Up @@ -211,14 +209,6 @@ def catkin_main(sysargs):
# Do verb alias expansion
sysargs = expand_verb_aliases(sysargs, verb_aliases)

# Check for --locate-extra-shell-verbs
for arg in sysargs:
if arg == '--locate-extra-shell-verbs':
this_dir = os.path.dirname(__file__)
shell_verbs = os.path.join(this_dir, '..', 'verbs', 'catkin_shell_verbs.bash')
print(os.path.normpath(shell_verbs))
sys.exit(0)

# Determine the verb, splitting arguments into pre and post verb
verb = None
pre_verb_args = []
Expand Down
20 changes: 20 additions & 0 deletions catkin_tools/verbs/catkin_locate/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,33 @@ def prepare_arguments(parser):
add('package', metavar='PACKAGE', nargs='?',
help="The name of a package to locate.")

special_group = parser.add_argument_group(
'Special Directories',
'Get the absolute path to a special catkin location')
add = special_group.add_argument
add('--shell-verbs', action='store_true',
help="Get the path to the shell verbs script.")
add('--examples', action='store_true',
help="Get the path to the examples directory.")

return parser


def main(opts):
# Initialize dictionary version of opts namespace
opts_vars = vars(opts) if opts else {}

# Check for special locations
root_resource_path = os.path.join(os.path.dirname(__file__), '..', '..')
if opts.shell_verbs:
shell_verbs = os.path.join(root_resource_path, 'verbs', 'catkin_shell_verbs.bash')
print(os.path.normpath(shell_verbs))
sys.exit(0)
elif opts.examples:
shell_verbs = os.path.join(root_resource_path, '..', 'docs', 'examples')
print(os.path.normpath(shell_verbs))
sys.exit(0)

# Get the workspace (either the given directory or the enclosing ws)
workspace_hint = opts_vars.get('workspace', None) or os.getcwd()
workspace = find_enclosing_workspace(workspace_hint)
Expand Down
8 changes: 4 additions & 4 deletions docs/advanced/catkin_shell_verbs.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Shell support in ``catkin`` command
===================================

You can use the command ``catkin --locate-extra-shell-verbs`` to locate the shell file for your installation.
You can use the ``locate`` verb to locate the shell file for your installation.
When you source the resulting file, you can use ``bash``/``zsh`` shell functions which provide added utility.

.. code-block:: shell
. `catkin --locate-extra-shell-verbs`
. `catkin locate --shell-verbs`
Provided verbs are:

- ``catkin cd`` -- Change to package directory in source space.
- ``catkin source`` -- Source the develspace or installspace of the containing workspace.
- ``catkin source`` -- Source the devel space or install space of the containing workspace.

Full Command-Line Interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -24,7 +24,7 @@ Change to package directory in source space with `cd` verb.
ARGS are any valid catkin locate arguments
The `source` verb sources the develspace or installspace of the containing workspace.
The `source` verb sources the devel space or install space of the containing workspace.

.. code-block:: text
Expand Down

0 comments on commit efc54bd

Please sign in to comment.