Skip to content

Commit

Permalink
docs: updating after merging #293, regenerating examples and cli inte…
Browse files Browse the repository at this point in the history
…rfaces
  • Loading branch information
jbohren committed Apr 13, 2016
1 parent 6331f8b commit 8317023
Show file tree
Hide file tree
Showing 21 changed files with 322 additions and 249 deletions.
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
2 changes: 0 additions & 2 deletions docs/build_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ Build Stages
First Subsequent Description
============== ============ ==================================================
``mkdir`` | Create package build space if it doesn't exist.
---------------------------- --------------------------------------------------
``envgen`` | Generate environment setup file for building.
---------------------------- --------------------------------------------------
``cmake`` ``check`` | Run CMake configure step **once** for the
| first build and the ``cmake_check_build_system``
Expand Down
6 changes: 3 additions & 3 deletions docs/cheat_sheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ Cleaning Build Products
^^^^^^^^^^^^^^^^^^^^^^^

Blow away the build, devel, and install spaces (if they exist):
- ``catkin clean -a``
- ``catkin clean``

... or just the **build space**:
- ``catkin clean --build``

... or just delete the `CMakeCache.txt` files for each package:
- ``catkin clean --cmake-cache``
... or just clean a single package:
- ``catkin clean PKGNAME``

... or just delete the build directories for packages which have been disabled or removed:
- ``catkin clean --orphans``
Expand Down
145 changes: 0 additions & 145 deletions docs/config_summary.rst

This file was deleted.

45 changes: 45 additions & 0 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Documentation Examples
======================

This document explains how to run examples and generate all static text and
asciinema videos.

## Prerequisites

* [perl](http://perl.org)
* [asciinema](http://asciinema.org)
* [rosinstall\_generator](https://github.com/vcstools/wstool)
* [wstool](https://github.com/vcstools/wstool)
* [catkin](https://github.com/ros/catkin)

## Generating All Examples

All examples must be run from the examples directory.

```bash
./quickstart_ws/all.bash
./failure_ws/all.bash
./ros_tutorials_ws/all.bash
```

## Scripts

### slowrun

The `slowrun` script executes a script line by line, echoing characters to the
console with a delay, as if they were being typed.

Optional arguments:

* `--buffer` -- buffer and delay printing of each line from the output from subcommands

### slowrecord

The `slowrecord` script executes a script line by line with `slowrun`, but also
spawns a `urxvt` terminal with a specific size, and records the commands with
`asciinema`.

Optional arguments:

* `--check` -- check interactively before uploading
* `--tall` -- use a taller window for recording
5 changes: 0 additions & 5 deletions docs/examples/capture

This file was deleted.

15 changes: 15 additions & 0 deletions docs/examples/failure_ws/all.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

SLOWRECORD=$(pwd)/slowrecord
WS=/tmp/failure_ws

pushd `dirname $0`

rm -rf $WS

source /opt/ros/indigo/setup.bash
bash 0_init.bash
$SLOWRECORD --check --tall --buffer 1_build_warning.bash
$SLOWRECORD --check --tall --buffer 2_build_err.bash

popd
11 changes: 0 additions & 11 deletions docs/examples/quickstart_ws/1_prebuild.bash.out

This file was deleted.

13 changes: 13 additions & 0 deletions docs/examples/quickstart_ws/1_prebuild.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.
├── .catkin_tools
│   ├── CATKIN_IGNORE
│   ├── profiles
│   ├── README
│   └── VERSION
└── src
├── pkg_a
├── pkg_b
├── pkg_c
└── pkg_d

7 directories, 3 files
31 changes: 0 additions & 31 deletions docs/examples/quickstart_ws/2_postbuild.bash.out

This file was deleted.

41 changes: 41 additions & 0 deletions docs/examples/quickstart_ws/2_postbuild.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.
├── build
│   ├── .built_by
│   ├── catkin_tools_prebuild
│   ├── .catkin_tools.yaml
│   ├── pkg_a
│   ├── pkg_b
│   ├── pkg_c
│   └── pkg_d
├── .catkin_tools
│   ├── CATKIN_IGNORE
│   ├── profiles
│   ├── README
│   └── VERSION
├── devel
│   ├── .built_by
│   ├── .catkin
│   ├── CMakeLists.txt -> /tmp/quickstart_ws/devel/.private/catkin_tools_prebuild/CMakeLists.txt
│   ├── env.sh -> /tmp/quickstart_ws/devel/.private/catkin_tools_prebuild/env.sh
│   ├── etc
│   ├── lib
│   ├── package.xml -> /tmp/quickstart_ws/devel/.private/catkin_tools_prebuild/package.xml
│   ├── .private
│   ├── setup.bash -> /tmp/quickstart_ws/devel/.private/catkin_tools_prebuild/setup.bash
│   ├── setup.sh -> /tmp/quickstart_ws/devel/.private/catkin_tools_prebuild/setup.sh
│   ├── _setup_util.py -> /tmp/quickstart_ws/devel/.private/catkin_tools_prebuild/_setup_util.py
│   ├── setup.zsh -> /tmp/quickstart_ws/devel/.private/catkin_tools_prebuild/setup.zsh
│   └── share
├── logs
│   ├── catkin_tools_prebuild
│   ├── pkg_a
│   ├── pkg_b
│   ├── pkg_c
│   └── pkg_d
└── src
├── pkg_a
├── pkg_b
├── pkg_c
└── pkg_d

24 directories, 14 files
Loading

0 comments on commit 8317023

Please sign in to comment.