-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not init facade in adapter #47
Conversation
For now I only added a simple test to check if my new solution works. |
Now |
635c79d
to
22be101
Compare
data_adapter_oemof/adapters.py
Outdated
@classmethod | ||
def get_default_parameters(cls, struct: dict, mapper: Mapper) -> dict: | ||
def as_dict(self) -> dict: | ||
return self.facade_dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you want to keep the as_dict
attribute?
To me this appears a little confusing and like an extra step to just change the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only synthetic sugar. but i will remove it
""" | ||
Dispatchable Adapter | ||
""" | ||
|
||
type = "dispatchable" | ||
facade = facades.Dispatchable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have had this Version with facade as DataAdapter attribute before but I do not remember why we changed that.
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 To solve this issue a new function has been created in Mapper to do the job the Tests are still failing due to missing changes from dev. Should I merge dev into here? |
I will have a look today! |
No data_adapter test since it should be tested in data_adapter itself
To create a Mapper instance a adapter is neccessary but to create an adapter instance a mapper is neccessary as well. Therefore 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)
For
Looks nice - good idea! - I only renamed some names regarding your new namedtuple.
I rebased dev into this branch. |
a261a94
to
f28a453
Compare
By the way - nice job of joining year-related processes! 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