Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Output): use default HTML log name if '-hl' CLI parameter was last #713

Closed
wants to merge 1 commit into from

Conversation

miltolstoy
Copy link
Collaborator

The argument parser works differently depending on a CLI parameter position.
universum -hl ${other_params} -> settings.html_log == "universum_log.html"
universum ${other_params} -hl -> settings.html_log == "default"

Fix this to have a proper HTML log name regardless of CLI parameter position.
Resolves #711

@i-keliukh
Copy link
Contributor

In the description the "Output" should be lowercase.
However, this doesn't really matter because the fix should be generic to fix both issues #703 and #711.

@i-keliukh
Copy link
Contributor

The real source of these bugs is located in _add_default_parser function in

def _add_default_parser(self, args):
subparsers_action = self._get_subparsers_action()
if not subparsers_action:
return
if not self._needs_default_parser(subparsers_action, args):
return
default = "default"
subparsers_action.add_parser(default)
args.insert(len(args), default)

@miltolstoy
Copy link
Collaborator Author

Dropping this review because a more general fix is needed.
The same issue exists for other CLI arguments as well - #703. A more high-level CLI parser fix is required.

@miltolstoy miltolstoy closed this Apr 25, 2022
@miltolstoy miltolstoy deleted the html_log_cli_fix branch November 9, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong default name of html log
2 participants