updated doc examples for invoke tasks
This commit is contained in:
parent
c884ee27cd
commit
d1fd19edc6
2 changed files with 25 additions and 9 deletions
|
@ -173,22 +173,38 @@ The invoke tool installed by way of pipx provides conveniences for running
|
||||||
CORE tasks to help ensure usage of the create python virtual environment.
|
CORE tasks to help ensure usage of the create python virtual environment.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
inv --list
|
||||||
|
|
||||||
Available tasks:
|
Available tasks:
|
||||||
|
|
||||||
cleanup run core-cleanup removing leftover core nodes, bridges, directories
|
|
||||||
cli run core-cli used to query and modify a running session
|
|
||||||
daemon start core-daemon
|
daemon start core-daemon
|
||||||
gui start core-pygui
|
install install core, poetry, scripts, service, and ospf mdr
|
||||||
install install core, scripts, service, and ospf mdr
|
install-emane install emane and the python bindings
|
||||||
install-scripts install core script files, modified to leverage virtual environment
|
install-scripts install core script files, modified to leverage virtual environment
|
||||||
install-service install systemd core service
|
install-service install systemd core service
|
||||||
|
run runs a user script in the core virtual environment
|
||||||
test run core tests
|
test run core tests
|
||||||
test-emane run core emane tests
|
test-emane run core emane tests
|
||||||
test-mock run core tests using mock to avoid running as sudo
|
test-mock run core tests using mock to avoid running as sudo
|
||||||
uninstall uninstall core
|
uninstall uninstall core, scripts, service, virtual environment, and clean build directory
|
||||||
```
|
```
|
||||||
|
|
||||||
Example running the core-daemon task from the root of the repo:
|
Print help for a given task:
|
||||||
```shell
|
```shell
|
||||||
inv daemon
|
inv -h install
|
||||||
|
|
||||||
|
Usage: inv[oke] [--core-opts] install [--options] [other tasks here ...]
|
||||||
|
|
||||||
|
Docstring:
|
||||||
|
install core, poetry, scripts, service, and ospf mdr
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-d, --dev install development mode
|
||||||
|
-p STRING, --prefix=STRING prefix where scripts are installed, default is /usr/local
|
||||||
|
-v, --verbose enable verbose
|
||||||
|
```
|
||||||
|
|
||||||
|
Example running a core user script:
|
||||||
|
```shell
|
||||||
|
inv run /path/to/core/grpc/script.py
|
||||||
```
|
```
|
||||||
|
|
4
tasks.py
4
tasks.py
|
@ -360,7 +360,7 @@ def install_emane(c, verbose=False):
|
||||||
)
|
)
|
||||||
def uninstall(c, dev=False, verbose=False, prefix=DEFAULT_PREFIX):
|
def uninstall(c, dev=False, verbose=False, prefix=DEFAULT_PREFIX):
|
||||||
"""
|
"""
|
||||||
uninstall core
|
uninstall core, scripts, service, virtual environment, and clean build directory
|
||||||
"""
|
"""
|
||||||
hide = not verbose
|
hide = not verbose
|
||||||
p = Progress(verbose)
|
p = Progress(verbose)
|
||||||
|
@ -420,7 +420,7 @@ def daemon(c):
|
||||||
)
|
)
|
||||||
def run(c, file, sudo=False):
|
def run(c, file, sudo=False):
|
||||||
"""
|
"""
|
||||||
convenience for running a core related script
|
runs a user script in the core virtual environment
|
||||||
"""
|
"""
|
||||||
if not file:
|
if not file:
|
||||||
print("no script was provided")
|
print("no script was provided")
|
||||||
|
|
Loading…
Reference in a new issue