This repository was archived by the owner on Mar 9, 2021. It is now read-only.
Generate a JSON file as a durable config#34
Open
Victorystick wants to merge 1 commit into
Open
Conversation
Member
What do you mean by this? |
Contributor
Author
|
We're dynamically generating new python files in the Also, I prefer config files that aren't Turing Complete. |
Member
|
Aight, so the python module/json and where it lives are separate issues. If you want users to do configuration, python's ConfigParser/.ini is a bit easier to write. I've written a short python |
This was referenced Sep 14, 2017
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't generate Python code for config that sits alongside the rest of the code. Once the app is bundled á la #33, such files would no longer out live app updates.
Instead, opt for some other format, such as JSON. (Actual format for the config file is up for debate.)
The code converting
config.pyfiles tostreque.jsonfiles is temporary, and can be removed once the active deployments have migrated.