Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Where to save user data #120

Open
jbasko opened this issue May 29, 2017 · 1 comment
Open

Where to save user data #120

jbasko opened this issue May 29, 2017 · 1 comment

Comments

@jbasko
Copy link
Owner

jbasko commented May 29, 2017

Config instance may want to be aware of where to save user changes when asked to.

See confuse library.

jbasko added a commit that referenced this issue Jun 7, 2017
@jbasko
Copy link
Owner Author

jbasko commented Jun 11, 2017

We now have load_sources setting. Maybe load_stores is better and then have dump_stores or write_stores?

Be mindful:

  • if you have a config tree of structure A(B(C)) then A.sources have precedence over B.sources and C.sources in loading values.
  • if you now make changes and want to save them, then where you will write them to depends on where you call writer from. If you call it from A then you can only reliably write to A.sources. Because B and C could be configs for some sub-component which should be runnable/configurable independently from A.
  • If A has no sources then you should write changes on the children Configs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant