CodeSpaceHQ / MENGEL

A framework that applies machine learning algorithms and automates the process of finding the right algorithm for the job.
6 stars 1 forks source link

Configuration: Create configuration class #110

Closed asclines closed 8 years ago

asclines commented 8 years ago

Referencing #103 for design.

This file, configuration.py' will be a Python script that holds the classConfiguration` for holding all the data taken in by the XML file in #103.

The data from the XML file should be loaded into a dictionary. Not only does this allow for quicker access of information but it also separates the manipulation of configuration data from the configuration file. The loading of the XML file is covered in #111

asclines commented 8 years ago

One question that needs to be answered: Should this follow an OOP design where everything is broken into classes based on the layer they are at in the XML tree? Or should we look this more with a key-value pair mentality and use dictionaries to store the data?

When making this decision we need to consider:

asclines commented 8 years ago

Most of the data that is loaded from the configuration XML file will not be modified by the program. Maybe we could do a hybrid of objects and dictionaries depending on whether the data should be modifiable?

isaac-gs commented 8 years ago

Yeah I would say that the program should never modify any of this stuff outside of the configuration management tool.

In terms of the data, probably some combination of the two. In some situations we'll need a dictionary to make finding the data efficient, in others that won't be an issue

asclines commented 8 years ago

As of current, the configuration object is a singleton. I believe this meets the requirements to be a singleton as we at any point only want one instance of a configuration object per program run.