Draft
Conversation
cf98a07 to
ffc9b42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I noticed that carrier was set at the component level and should be explicitly set at bus level in case of multi-input/multi-output components in rl-institut/oemof-tabular-plugins#26 otherwise it leads to logical problems that a component has one carrier assigned although it deals with multiple carriers. This is needed for book-keeping of energy flows from different sectors.
It is possible without any changes to assign a carrier column to the
bus.csvresource, however it is not possible to not have acarriercolumn in resources based on Facades which havecarrieras an attribute.I experimented and saw that the fact that the
carrierattribute is required in the definition of the facades. It throws an error at this line if I try to instantiate a facade without providing a value for thecarrierattribute.Fixes #oemof-tabular-plugins/issues/26
Type of change
Right now I outline two suggestions in the two commits for discussion purposes, I will then reset the commits and implement an approved solution.
Suggestion 1:
Always provide carrier as an empty string if "carrier" not found in the kwargs to the facade. This is working well and is a two-liner fix but it is not elegant.
Suggestion 2:
Make carrier attribute optional and with a default value. This is more elegant but we need to change that in all facades
Please tick or delete options that are not relevant.
Checklist:
Please tick or delete options that are not relevant.
pre-commithooksExisting tests do not pass locally on latest
devbut they pass online