Skip to content

Commit d0b18df

Browse files
juliusroederChroxvi
authored andcommitted
5th debug level added. documentation and tests adjusted.
1 parent c634897 commit d0b18df

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

cotainr/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def add_arguments(cls, *, parser):
190190
help=(
191191
"increase the verbosity of the output from cotainr. "
192192
"Can be used multiple times: Once for subprocess output, "
193-
"twice for subprocess INFO, three times for DEBUG, "
194-
"and four times for TRACE"
193+
"twice for subprocess INFO, three times for VERBOSE, four times for DEBUG "
194+
"and five times for TRACE."
195195
),
196196
)
197197
verbose_quiet_group.add_argument(

cotainr/pack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@ def _conda_verbosity_arg(self):
402402
elif self._verbosity == 2:
403403
# Conda INFO
404404
return " -v"
405-
elif self._verbosity == 3:
405+
elif self._verbosity == 3 or self._verbosity == 4:
406406
# Conda DEBUG
407407
return " -vv"
408-
elif self._verbosity >= 4:
408+
elif self._verbosity >= 5:
409409
# Conda TRACE
410410
return " -vvv"
411411
else:

cotainr/tests/cli/test_build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ def test_CLI_subcommand_help_message(self, argparse_options_line, capsys):
475475
" completing the container build process\n"
476476
" --verbose, -v increase the verbosity of the output from cotainr. Can\n"
477477
" be used multiple times: Once for subprocess output,\n"
478-
" twice for subprocess INFO, three times for DEBUG, and\n"
479-
" four times for TRACE\n"
478+
" twice for subprocess INFO, three times for VERBOSE,\n"
479+
" four times for DEBUG and five times for TRACE.\n"
480480
" --quiet, -q do not show any non-CRITICAL output from cotainr\n"
481481
" --log-to-file create files containing all logging information shown\n"
482482
" on stdout/stderr\n"

cotainr/tests/container/test_singularity_sandbox.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,16 @@ def test_use_own_log_dispatcher(self, capsys, patch_disable_stream_subprocess):
364364
class Test_AddVerbosityArg:
365365
@pytest.mark.parametrize(
366366
["verbosity", "verbosity_arg"],
367-
[(-1, "-s"), (0, "-q"), (1, None), (2, None), (3, "-v"), (4, "-d"), (5, "-d")],
367+
[
368+
(-1, "-s"),
369+
(0, "-q"),
370+
(1, None),
371+
(2, None),
372+
(3, "-v"),
373+
(4, "-d"),
374+
(5, "-d"),
375+
(6, "-d"),
376+
],
368377
)
369378
def test_correct_mapping_of_verbosity(self, verbosity, verbosity_arg):
370379
sandbox = SingularitySandbox(base_image="my_base_image_6021")

cotainr/tests/pack/test_conda_install.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,15 @@ def test_unknown_arch_error(self, arch):
516516
class Test_CondaVerbosityArg:
517517
@pytest.mark.parametrize(
518518
["verbosity", "verbosity_arg"],
519-
[(-1, " -q"), (0, " -q"), (1, ""), (2, " -v"), (3, " -vv"), (4, " -vvv")],
519+
[
520+
(-1, " -q"),
521+
(0, " -q"),
522+
(1, ""),
523+
(2, " -v"),
524+
(3, " -vv"),
525+
(4, " -vv"),
526+
(5, " -vvv"),
527+
],
520528
)
521529
def test_correct_mapping_of_verbosity(
522530
self,

doc/development/tracing_logging.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ Within `cotainr`, we map the subcommand `--verbose` / `--quiet` flags to a `verb
7878
-v 1 INFO INFO <None> <None>
7979
-vv 2 DEBUG INFO <None> -v
8080
-vvv 3 DEBUG DEBUG -v -vv
81-
-vvvv 4 DEBUG DEBUG -d -vvv
81+
-vvvv 4 DEBUG DEBUG -d -vv
82+
-vvvvv 5 DEBUG DEBUG -d -vvv
8283
=================== ===================== ==================== =========================== ======================= =================
8384

8485
The subcommand `--verbose` / `--quiet` flags are mapped to a `verbosity` level as part of the parsing of the CLI arguments, e.g. as in :class:`cotainr.CLI.build.add_arguments`. Based on the `verbosity` level,

0 commit comments

Comments
 (0)