Skip to content

Commit a4093b8

Browse files
committed
cli: Improve cloe-launch command help messages
1 parent 0b4052f commit a4093b8

File tree

7 files changed

+70
-38
lines changed

7 files changed

+70
-38
lines changed

cli/cloe_launch/commands/activate.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,15 @@ def cli_activate(
6060
\b
6161
Warnings:
6262
- If you use method #3 and delete ~/.cache/cloe, you will get errors
63-
until you re-create the profile.
63+
until you re-create the runtime environment.
6464
- Deleting or overwriting packages in your Conan cache that are used
6565
in an activated environment is undefined behavior: it can lead to
6666
unexpected problems!
67-
- Using cloe shell in combination with cloe activate is undefined
68-
behavior: it can lead to unexpected problems.
67+
- Using cloe shell in combination with cloe activate is currently
68+
undefined behavior: it can lead to unexpected problems.
69+
70+
If you want permanence, it's probably better to use the `deploy`
71+
command instead of `activate`.
6972
"""
7073
engine = Engine(conf, conanfile=conanfile)
7174
engine.conan_args = options.extract_conan_args(args)

cli/cloe_launch/commands/clean.py

+26-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,32 @@ def cli_clean(
4141
all: bool,
4242
conanfile: str,
4343
):
44-
"""Clean launcher runtime environment for specified configuration."""
44+
"""Clean launcher runtime environment for specified configuration.
45+
46+
The runtime environment is by default at `~/.cache/cloe/launcher/`
47+
in a directory named after a hash calculated from the conanfile.
48+
Currently, the hash does not take additional arguments into account
49+
(this should change in the future).
50+
51+
It is safe to clean a configuration or all configurations.
52+
Almost all commands will regenerate these configurations if needed
53+
within a few seconds. However, the following cases should be noted:
54+
55+
\b
56+
1. If the `deploy` command is used with a configuration,
57+
an uninstall script is stored in the cache.
58+
This should be preserved if you want to completely
59+
remove a deployed configuration at a later time.
60+
2. If the output of the `activate` command is used,
61+
for example in the `.bashrc` file,
62+
then you should not clean the configuration.
63+
64+
Usage Examples:
65+
66+
\b
67+
cloe-launch clean tests/conanfile.py
68+
cloe-launch clean -a
69+
"""
4570
engine = Engine(conf, conanfile=conanfile)
4671

4772
if all:

cli/cloe_launch/commands/deploy.py

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ def cli_deploy(
6868
6969
This may involve downloading missing and available packages and building
7070
outdated packages.
71+
72+
Usage Examples:
73+
74+
\b
75+
cloe-launch deploy -f -D /usr/local tests/conanfile.py
76+
cloe-launch deploy -D deploy tests/conanfile.py
7177
"""
7278
engine = Engine(conf, conanfile=conanfile)
7379
engine.conan_args = options.extract_conan_args(args)

cli/cloe_launch/commands/exec.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,19 @@ def cli_exec(
5454
conanfile: str,
5555
args: List[str],
5656
):
57-
"""Launch cloe-engine with a profile.
57+
"""Launch cloe-engine from a Conan recipe.
5858
59-
ENGINE_ARGS are passed on to cloe-engine.
59+
No options to cloe-launch may appear after specifying the conanfile.
60+
All options encountered after the conanfile and before -- will be
61+
passed to `conan install`. See `conan install --help` for help on
62+
which options are available here. All arguments after -- will be
63+
passed to the `cloe-engine` binary.
64+
65+
Usage Examples:
66+
67+
\b
68+
cloe-launch exec -c tests/conanfile.py -- usage
69+
cloe-launch exec -c tests/conanfile.py -- -l debug run tests/smoketest.json
6070
"""
6171
engine = Engine(conf, conanfile=conanfile)
6272
engine.conan_args = options.extract_conan_args(args)

cli/cloe_launch/commands/prepare.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ def cli_prepare(
5151
passed to `conan install`. See `conan install --help` for help on
5252
which options are available here.
5353
54-
Examples:
54+
Usage Examples:
5555
56+
\b
5657
cloe-launch prepare tests/conanfile.py --build=missing
5758
cloe-launch prepare tests/conanfile.py -o cloe-engine:server=False --build=outdated
5859
cloe-launch prepare tests/conanfile.py -s build_type=Debug --build="*/*@cloe/develop"

cli/cloe_launch/commands/shell.py

+18-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,24 @@ def cli_shell(
4646
conanfile: str,
4747
args: List[str],
4848
):
49-
"""Launch shell with the correct environment from a profile."""
49+
"""Launch shell with the correct environment from a profile.
50+
51+
No options to cloe-launch may appear after specifying the conanfile.
52+
All options encountered after the conanfile and before -- will be
53+
passed to `conan install`. See `conan install --help` for help on
54+
which options are available here. All arguments after -- will be
55+
passed to the shell.
56+
57+
Set the SHELL environment variable to influence which shell will be used.
58+
59+
Usage Examples:
60+
61+
\b
62+
cloe-launch shell tests/conanfile.py
63+
cloe-launch shell -c tests/conanfile.py -- -c "bats tests"
64+
cloe-launch shell -E tests/conanfile.py -o cloe-engine:server=False -- -c "bats tests"
65+
SHELL=/bin/bash cloe-launch shell tests/conanfile.py
66+
"""
5067
engine = Engine(conf, conanfile=conanfile)
5168
engine.preserve_env = preserve_env
5269
engine.conan_args = options.extract_conan_args(args)

cli/poetry.lock

-30
This file was deleted.

0 commit comments

Comments
 (0)