Closed henhuy closed 9 months ago
For now I only added a simple test to check if my new solution works. Other tests and implementations are not adopted and will fail
Now Adapter
class looks very empty and could almost be removed (mapper inside Adapter does most parts).
Maybe next time we should refactor even more...
Merged the "fix tests" updates from dev into here for easier maintenance and development:
Todos:
@henhuy Should I have a look into fixing the tests here or do you want to continue working on this issue?
Hey @FelixMau, would be nice if you could continue - as I'm deep into solph code, trying to implement TSAM... thx in advance!
To create a Mapper instance a adapter
is neccessary but to create an adapter
instance a mapper is neccessary as well since we wanted to change __init__
behaviour.
This circular behavior might be problematic and is not good style I believe, we should discuss solutions if there is capacity.
To solve this issue a new function has been created in Mapper to do the job the adapter
instance did before (giving out all names and types of occouring fields)
Tests are still failing due to missing changes from dev. Should I merge dev into here?
I will have a look today!
To create a Mapper instance a
adapter
is neccessary but to create anadapter
instance a mapper is neccessary as well since we wanted to change__init__
behaviour. This circular behavior might be problematic and is not good style I believe, we should discuss solutions if there is capacity.
For Mapper
instance only the class of Adapter
has to be given (not an instance) - so IMO this is not a problem. (If instance would have been needed, you are right this would cause cyclic problems!)
To solve this issue a new function has been created in Mapper to do the job the
adapter
instance did before (giving out all names and types of occouring fields)
Looks nice - good idea! - I only renamed some names regarding your new namedtuple.
Tests are still failing due to missing changes from dev. Should I merge dev into here?
I rebased dev into this branch.
By the way - nice job of joining year-related processes! Hope we can merge this soon. We are coming closer to our goal of building datapackage from databus data, I think.
We have to adapt "goal" CSVs, as non-given parameters are not set with default value from facade anymore by the adapter class (as they aren't necessary for setting up facade).
Closes #46