Skip to content
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

Reform configuration loading in main.py #57

Open
richteer opened this issue Oct 25, 2016 · 2 comments
Open

Reform configuration loading in main.py #57

richteer opened this issue Oct 25, 2016 · 2 comments

Comments

@richteer
Copy link
Contributor

richteer commented Oct 25, 2016

The config.json is opened in more than one spot in main.py, including one case where a Halibot class is instantiated just to call _load_config().

This should all be factored out into a load_config() function in main.py, and _load_config() on the Halibot class should take in a dictionary as an argument instead.

Writes to config.json in main.py should stay as they are, probably.

There should be some kind of more-centralized configuration loading system, so main.py and Halibot use the same interface for loading/writing a config file.

@richteer richteer changed the title Move loading of config to main.py Reform configutarion loading in main.py Oct 27, 2016
@richteer richteer changed the title Reform configutarion loading in main.py Reform configuration loading in main.py Oct 27, 2016
@sjrct
Copy link
Member

sjrct commented Nov 1, 2016

Probably should have Halibot class manage config loading/writing. That way it can keep it up-to-date automatically for interactively adding/removing modules and agents. Perhaps automatically write the config out on exit.

@richteer
Copy link
Contributor Author

richteer commented Oct 1, 2018

Should we close this? I think we have address this already, plus PR #114 starts to go nuts with avoiding multiple config loads.

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

No branches or pull requests

2 participants