Skip to content

Commit e0c48b9

Browse files
committed
Style improvement to remaining _desc()
Signed-off-by: Alexis Girault <agirault@nvidia.com>
1 parent 4a52612 commit e0c48b9

File tree

1 file changed

+39
-36
lines changed

1 file changed

+39
-36
lines changed

run

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,8 @@ install_cuda_dependencies_package() {
265265
}
266266

267267
# Setup the environment
268-
# Build HoloHub sample apps
269268
setup_desc() {
270-
echo ""
271-
echo "Install the required dependencies for HoloHub (sample applications)"
272-
echo "Usage: ./run setup"
273-
echo ""
269+
echo -e "${BOLD}Install the standard set of dependencies for HoloHub applications${NOCOLOR}"
274270
}
275271

276272
setup() {
@@ -403,16 +399,19 @@ setup() {
403399
#===========================================================================================
404400
# Lint
405401

406-
install_lint_deps_desc() { echo 'Install lint dependencies
402+
install_lint_deps_desc() {
403+
echo -e "
404+
${BOLD}Install lint dependencies${NOCOLOR}
407405
408-
This command will install the dependencies required to run the linting tools.
406+
This command will install the dependencies required to run the linting tools.
409407
410-
- Python linting: ruff, isort, black, mypy
411-
- CMake linting: cmakelint
412-
- C++ linting: cpplint, clang-format
413-
- Spelling: codespell
414-
'
408+
- Python linting: ruff, isort, black, mypy
409+
- CMake linting: cmakelint
410+
- C++ linting: cpplint, clang-format
411+
- Spelling: codespell
412+
"
415413
}
414+
416415
install_lint_deps() {
417416
# We use $(command) || exit_code=1 to run all linting tools, and exit
418417
# with failure after all commands were executed if any of them failed
@@ -431,18 +430,20 @@ install_lint_deps() {
431430
exit $exit_code
432431
}
433432

434-
lint_desc() { echo 'Lint the repository
433+
lint_desc() {
434+
echo -e "
435+
${BOLD}Lint the repository${NOCOLOR}
435436
436437
Python linting: black, isort, ruff
437438
C++ linting: cpplint
438439
CMake linting: cmakelint
439440
Spelling: codespell
440441
441-
Arguments:
442-
$@ - directories to lint (default: .)
442+
${CYAN}USAGE:${NOCOLOR} ./run lint <directories to lint (default: .)>
443443
444-
Options:
445-
--fix: to fix all linting errors'
444+
${CYAN}Options:${NOCOLOR}
445+
--fix: to fix all linting errors
446+
"
446447
}
447448

448449
lint() {
@@ -759,19 +760,20 @@ build() {
759760

760761
# Launch a sample app
761762
launch_desc() {
762-
echo ""
763-
echo "Launch command allowing to run application directly."
764-
echo "Usage: ./run launch <application_name> [language: cpp|python] [--extra_args <args>]"
765-
echo "Options:"
766-
echo " --extra_args <args> : additional arguments passed to the application command"
767-
echo " --nsys_profile : profile using Nsight Systems"
768-
echo " --verbose : output additional run command information to stdout"
769-
echo ""
770-
echo ""
771-
echo "Use './run list' first to list the available applications"
772-
echo "Note that applications might be listed but not built."
773-
echo "Make sure you ./run build the application first"
774-
echo ""
763+
echo -e "
764+
${BOLD}Run an application.${NOCOLOR}
765+
766+
${CYAN}USAGE:${NOCOLOR} ./run launch <application_name> [cpp|python] [options]
767+
768+
${CYAN}Options:${NOCOLOR}
769+
--extra_args <args> : additional arguments passed to the application command
770+
--nsys_profile : profile using Nsight Systems
771+
--verbose : output additional run command information to stdout
772+
773+
774+
Use './run list' or './run list_apps' to list the available applications.
775+
Make sure you call './run build <application_name>' to first build the application.
776+
"
775777
}
776778

777779

@@ -923,10 +925,11 @@ for k, v in obj[project_type]["run"].items():
923925
# Other options
924926

925927
list_desc() {
926-
echo ""
927-
echo "Display the list of applications to run."
928-
echo "Usage: ./run list"
929-
echo ""
928+
echo -e "
929+
${BOLD}Display the list of Holohub targets.${NOCOLOR}
930+
931+
Includes applications, operators, packages.
932+
"
930933
}
931934

932935
list_cmake_dir_options() {
@@ -987,7 +990,7 @@ clear_cache() {
987990
}
988991

989992
clear_cache_desc() {
990-
echo "Remove the build folders"
993+
echo -e "${BOLD}Remove the build folders${NOCOLOR}"
991994
}
992995

993996
parse_args() {
@@ -1055,7 +1058,7 @@ print_usage() {
10551058
echo " list : List all the available build targets"
10561059
echo " build <package|application|operator> : Build a specific package, application, or operator"
10571060
echo " launch <application> <language> : Run the application"
1058-
echo
1061+
echo
10591062
}
10601063

10611064
print_cmd_help_messages() {

0 commit comments

Comments
 (0)