MAIF / melusine

📧 Melusine: Use python to automatize your email processing workflow

Home Page:https://maif.github.io/melusine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cleanup Melusine Configurations

hugo-quantmetry opened this issue · comments

Description of Problem:
The way configs are handled in Melusine is not ideal:

  • A ConfigJsonReader class object is instanciated at the beggining of each module
  • The conf files are read multiple times
  • Using custom configurations is more complex than it should be
  • The csv format for the names file is not robust

Overview of the Solution:
The following changes are suggested:

  • Load the configs once and import them in modules with a simple import statement
  • Use an env variable to specify a folder containing custom configuration files
  • Change the format of the names file

Examples:

os.environ["MELUSINE_CONFIG_DIR"] = "path/to/custom/config/dir"
from melusine import config
print(config["words_list"])