Open ghost opened 9 years ago
:+1: good idea
@warren-oneill Basically, what I would like to do is:
Introduce a prefix + classname naming convention, e.g. EEXMetadata, EEXSource, EEXExchange, where not yet done in that way. EDIT: I see thats done, except for the DataGenerator class
3. Refactor assets, exchanges and sources by introducing a simple factory pattern. E.g. you could do exch = Exchange('EEX') rather than exch = EEXExchange(). By using the naming convention in (2.) the Exchange class creates the relevant objects, i.e. acts as a factory.
I have some code and ideas for the items above I will present in our meeting on Friday.
1) makes sense 2) Isn't that what I do? the only difference I can see is my prefix is not all caps. 3) whats the advantage of using this method?
@warren-oneill As we talked in our meeting, the scope of the refactoring focus on a strict separation of all db and query stuff from the exchange, metadata and source classes, including a clean use if session (see also: http://docs.sqlalchemy.org/en/latest/orm/session_basics.html#what-does-the-session-do ). Refactored code is in a separate branch.
Refactoring includes:
Still TODO:
Currently, store and db-views are imported in several Powerline modules. There should be one single module that contains all the dependencies to the other gg modules (db, messaging) to achive more loose coupling.