Implement local/system configs#126
Merged
Merged
Conversation
sjrct
force-pushed
the
local-system-configs
branch
from
February 5, 2019 02:39
78b1a15 to
a960744
Compare
System config lives in the source directory. Added a special variable to halibot configs. If this was not done, then there would no way to keep the system config pointing to the source package path without doing some subsitution or something in install.sh, which is not ideal as it would not work out-of-the-box, only after installation.
richteer
reviewed
Feb 6, 2019
| def _load_config(self): | ||
| # Special values expanded inside of configs | ||
| specials = { | ||
| 'HALDIR': HALDIR |
Member
Author
There was a problem hiding this comment.
I was thinking HALPATH might be better, but you have convinced me otherwise.
richteer
reviewed
Feb 6, 2019
| text = Template(f.read()).safe_substitute(**specials) | ||
| self.config.set_system(json.loads(text)) | ||
| except FileNotFoundError as _: | ||
| self.log.info("No sytem config loaded.") |
Contributor
|
Largely looks good to me. I think we should go ahead and merge this one so some of the other recent changes can get merged on top of this one now. I'll approve the changes but won't merge yet in case you want to fix that typo. Otherwise, just go ahead and merge, not a bit deal. |
richteer
approved these changes
Feb 6, 2019
sytem -> system
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds support for separate local and system configs. The principle use case is for globally installed packages that can be accessed by anyone.
Had to add a special variable to halibot configs. If this was not done, then there would no way to keep the system config pointing to the source package path without doing some substitution or something in install.sh, which is not ideal as it would not work out-of-the-box, only after installation.
Fixes #122 and fixes #121.