-
Notifications
You must be signed in to change notification settings - Fork 53
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 settings module #1044
Add settings module #1044
Conversation
✅ Deploy Preview for conda-store ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for conda-store canceled.
|
3b5eee6
to
1570e12
Compare
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.
Looks good, just one minor change and a bunch of annotations.
Thanks for this, it's going to make this much clearer for users 👍
d3f5349
to
69457d4
Compare
72d0870
to
69457d4
Compare
traitlets settings should not be persisted to the database instead load settings (in order of precedence): * read config from config file - deployment default * read config from settings db in order of specificity * global - set by admin * namespace * environment
Co-authored-by: Peyton Murray <[email protected]>
c656638
to
e29491d
Compare
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.
Minor changes. One question: should setting an invalid setting raise an exception? Right now if you set a setting that isn't real there's no way for you to know other than checking whether it is None
.
It should be throwing an error if the user is trying to set a setting that does not exist in the |
Co-authored-by: Peyton Murray <[email protected]>
2541e76
to
7e6d2ed
Compare
Fixes #1005
Description
This PR introduces a settings module for interacting with conda store settings. It also adds some documentation and enforces rules for how settings get merged at each of the different levels of abstraction that setting apply to.
There are multiple levels which settings config can be applied to conda store.
The most specific settings config will take precedence over the more general setting.
The introduction of this settings object will allow:
With this change, plugin authors will have better patterns for accessing settings. For example, consider the lock plugin which requires running a conda command
can now become
Pull request checklist