Universum icon indicating copy to clipboard operation
Universum copied to clipboard

Wrong default name of html log

Open k-dovgan opened this issue 3 years ago • 2 comments

Currently when using the -hl option without any further specification the name of a created file is default (instead of expected universum_log.html). Need to be expected, fixed and, maybe, covered by regression test

k-dovgan avatar Mar 24 '22 14:03 k-dovgan

This issue is related to https://github.com/Samsung/Universum/issues/703

dogbert911 avatar Mar 24 '22 15:03 dogbert911

The current problem can be solved by https://github.com/Samsung/Universum/pull/713, but a more general fix is needed to solve all similar situations (like https://github.com/Samsung/Universum/issues/703).

Root issue - subparser arguments override main parser arguments with the same name:

./test.py --arg value1 subparser --arg value2
Namespace(arg='value2')

The current solution of the root issue - https://github.com/Samsung/Universum/pull/715, appending the "default" parser. But the current solution leads to issues like this one, so it should be done in some other way.

A preliminary investigation shows the possible way to resolve it. Parser settings:

parser.add_argument("--arg", dest="main_arg")
subparser.add_argument("--arg", dest="subparser_arg")

Usage:

./test.py --arg value1 subparser --arg value2
Namespace(main_arg='value1', subparser_arg='value2')

Possible CLI help formatting issues can be resolved based on this StackOverflow information - https://stackoverflow.com/a/56595689

miltolstoy avatar Apr 25 '22 09:04 miltolstoy