Refactor main.py

- Update, clean, and improve code coverage on main.py
- Move bot trading logic into Freqtradebot() class
- Move unit tests to test_freqtradebot, add more coverage tests
This commit is contained in:
Gerald Lonlas
2018-02-04 01:21:16 -08:00
parent a8b8ab20b7
commit 4da033c7a2
7 changed files with 1997 additions and 1350 deletions

View File

@@ -21,12 +21,14 @@ class Configuration(object):
self.args = args
self.logger = Logger(name=__name__).get_logger()
self.config = self._load_config()
self.show_info()
def _load_config(self) -> Dict[str, Any]:
"""
Extract information for sys.argv and load the bot configuration
:return: Configuration dictionary
"""
self.logger.info('Using config: %s ...', self.args.config)
config = self._load_config_file(self.args.config)
# Add the strategy file to use