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

Breaking: add verbose(), controlled with verbose #96

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gdubicki
Copy link
Member

@gdubicki gdubicki commented Nov 4, 2022

in setup() and make debug() controlled with debug in setup.

This will allow writing apps that have a more granular level of verbosity:

  • quiet (warning-fatal)
  • normal (info-fatal),
  • verbose (verbose-fatal),
  • debug (debug-fatal = all).

@gdubicki
Copy link
Member Author

gdubicki commented Nov 4, 2022

I think that this is the way it should be done.

Without this feature I had to do an ugly hack in my GitLabForm app where I used logging.debug() for the "debug" verbosity level and cli_ui.debug() imported as verbose() as the "verbose" level - see gitlabform/gitlabform@4610bd5.

@gdubicki
Copy link
Member Author

gdubicki commented Nov 4, 2022

Wdyt, @dmerejkowsky?

in `setup()` and make `debug()` controlled with `debug` in setup.

This will allow writing apps that have more granular level
of verbosity:
* quiet (warning-fatal)
* normal (info-fatal),
* verbose (verbose-fatal),
* debug (debug-fatal = all).
@gdubicki gdubicki force-pushed the separate_debug_and_verbose branch from 47bbf55 to d4746c5 Compare November 4, 2022 22:39
@gdubicki
Copy link
Member Author

If you are ok with such a change then I would add the appropriate docs and an upgrade guide, @dmerejkowsky.

I think that an image showing the levels and the verbosity levels would help. I prepared a draft of such an image:

python-cli-ui levels and verbosity

@gdubicki
Copy link
Member Author

gdubicki commented Nov 20, 2022

After giving it more thought, I would like to apply some of the philosophy of a more user-friendly software development process taken from here https://gitlabform.github.io/gitlabform/#stability to python-cli-ui and do this:

  • introduce a new argument for setup(), f.e. verbosity that will be the sole new way of configuring, well, the verbosity. I would make it an enum accepting: debug, verbose, normal and quiet.
  • make the old arguments debug and quiet work the same way as they do now did but log a warning when they are used, stating that it is deprecated and that it will go away in the next major version of this library.

@dmerejkowsky
Copy link
Collaborator

@gdubicki : sorry for the long delay - do you still want to work on this ? - your plan to do it in a non-breaking way looks like a good idea to me

@gdubicki
Copy link
Member Author

gdubicki commented Apr 6, 2024

Hi, @dmerejkowsky! Yes, I might want to get back to this.

PS Can you please add my PyPI account (gdubicki) as a maintainer for this project in PyPI? I would like make a 0.18.0 release with what's currently in the main branch. :)

@gdubicki
Copy link
Member Author

A gentle reminder, @dmerejkowsky :)

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.

2 participants