-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add 'verbose' option #21
Conversation
Yes, I like this idea very much, this project needs more verbose output! However: Could you fix the tests and add documentation ? I also really like this to be based on the python logging framework, kindof similar to https://github.com/peritus/hashedassets/blob/e2e553562f651f443203a8254a4f563ffae85dcf/src/hashedassets/__init__.py#L249-254 (and the rest of the file). Also there are a few more lines where informing the user would make sense, we can expand on this. |
Sorry, it was a quick hack. I have fixed the tests and documentation in my last commit. I use the python logging module extensively in some of my projects, but they are mainly long running processes. I don't see the advantage of using the logging framework in a small and fast script like bumpversion. Currently, '--verbose' only causes the printing of the version strings. Certainly, it would be useful to show more info. |
The python3-tests are still failing on Travis (print is a function now http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function).. Using the python logging framework would make a future-proof implementation, especially since I want bumpversion to be usable as a library some time in the future. Also makes loglevel (or verbose-level for that matter) easy as pie. I'd love to merge a patch that really thinks about output to stderr and what (also machine readable, that is for other shell scripts) output should be in While I appreciate your quick hack efforts, I'd rather merge a more complete patch that adresses the aspect all in all to make bumpversion's stdout/stderr fun. |
Damn, I was calling py.test directly! Now I've installed tox and see the failing tests :( OK, compatibility seems to be a good reason for using the logging framework. |
The fresh version 0.4.0 (now on PyPI!) includes a new
|
This commit adds a 'verbose' optional argument to the CLI, which is very useful if you want to retrieve the version string from a script.
When used, the output will show something like this: