-
Notifications
You must be signed in to change notification settings - Fork 10
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
Gracefully upgrade settings.txt file #39
Comments
Maybe a version option in the settings.txt. It it's out of date than a new setting.txt is created and the old one is saved as settings.txt.save or something. |
sounds good. leaving it on the todo pile for the moment. concentrating on the 'help' and 'user' functionalities. |
Copied from reddit thread: On new version, existing (retained) settings should be preserved and reapplied to the newly generated settings.txt so preferences don't get lost between updates. If there is a bot breaking change that needs to be applied and handled manually by the dev/maintainer we could perhaps have a 'halt' boolean that will sys.exit() and print how to resolve the conflict to console. |
Has anyone made more work towards this being complete? I haven't seen a thread in the sub, so I'm just posting here. |
Nope. |
Poking this issue, too. Two questions: why is the configuration file a text file (as opposed to a YAML, or some other standard configuration format)? There are a lot of nice libraries for these other formats (such as pyyaml) that would make reading a configuration file trivial. If this is desired/interesting I can whip up a pull request. Second, why isn't the settings file under version control? |
As to why the settings file is not in yaml or something similar: I think it was originally, just because the settings file was small and no one saw a need for it. But as it grew larger, it just never got ported over to a better configuration library. It wasn't under version control I believe because the application itself creates the settings file if it doesn't exist. Not sure if that's a benefit or not. Here is the relevant pull request. If you feel that the process can be made better, a pull request would be welcomed. |
If needed settings cannot be found due to out of date settings file then store whatever setting scan be read and generate a new settings.txt containing the previously configured options.
There should also be a setting to force the regen of the file when needed.
Gets flipped back to False after one run.
Will need to be ignored if reading from settings.py like heroku bot does. (or maybe just let is fail trying?)
The text was updated successfully, but these errors were encountered: