-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make keyring lookup more flexible #267
Conversation
Codecov Report
@@ Coverage Diff @@
## master #267 +/- ##
==========================================
+ Coverage 81.04% 82.30% +1.26%
==========================================
Files 52 54 +2
Lines 4362 4589 +227
==========================================
+ Hits 3535 3777 +242
+ Misses 827 812 -15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Primary concern: need of test(s).
dandi/girder.py
Outdated
from keyring.backend import get_all_keyring | ||
from keyring.errors import InitError | ||
from keyring.util.platform_ import config_root | ||
from keyrings.alt.file import EncryptedKeyring |
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.
why not to import them all on top?
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.
or may be keep them here but we do need some unit (via mockups) and/or integration (do specify PYTHON_KEYRING_BACKEND
pointing to some pre-crafted file) test to verify this logic. It would also be sad if we miss the moment when keyring introduces some regression etc and we do not notice since no coverage here
@yarikoptic Tests added. |
@@ -73,6 +74,7 @@ style = | |||
pre-commit | |||
test = | |||
coverage | |||
pyfakefs ~= 4.0 |
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.
note to myself -- provides fs
fixture.
Seems to work nicely. One gotcha to keep in mind (add to our handbook) is that it would require to set the password for the encrypted keyring:
initiated dandi/handbook#6 |
Closes #263.