-
Notifications
You must be signed in to change notification settings - Fork 42
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 logging configuration to app.py, related tests and Makefile. #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is perfect - thanks @ntoll 😄
CI wasn't building on this branch due to builds of PRs from forks being turned off. I've enabled that now, so on your next push CI should run.
Otherwise in terms of code style, we have flake8
running in CI, but since @kushaldas is a big proponent of black
, let's use black
😎 There are just a couple of minor flake8
linting issues that CI would flag in the diff, so let's add black
in another commit in this PR prior to merge. And after CI successfully runs on that commit, please go ahead and merge this in! 🎉
@@ -13,4 +13,7 @@ alembic = "*" | |||
[dev-packages] | |||
pytest = "*" | |||
pip-tools = "*" | |||
coverage = "*" | |||
pytest-cov = "*" | |||
pytest-random-order = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know about this pytest-random-order
plugin, looks pretty handy 👀
@redshiftzero We will have to use |
Hi folks... so I spent some time looking into In any case, I've just noticed Python 3.5... so no f-strings for me. ;-) I'll fix and the CI should pass. |
Also, I added |
All code should be formatted by |
I'm not sure this is a good idea. If code is poetry then black turns everything into a limerick ;-) (N.B. I like limericks, but not all the time). |
You're welcome. :-) |
securedrop_client/app.py
Outdated
@@ -76,4 +76,4 @@ def run(): | |||
- create a window for the app. | |||
""" | |||
configure_logging() | |||
logging.info(f'Starting SecureDrop Client {__version__}') | |||
logging.info('Starting SecureDrop Client {}'.format(__version__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can not tell you how much I want f-strings :(
Looks like Otherwise this looks great, mergin' |
Adds upgrade-pip makefile target
Use urljoin instead of string concat for urls. Thank you for the patch @vivekanand1101 👍
Fixes #6.
Heads up!
make check
)Question:
pycodestyle
andpyflakes
. I hear good things aboutblack
. I'd like to add code style checking to the automated tests, any opinions on what to use?I'm not precious about my code, so please don't hesitate to ask for changes! Thanks.