Addition of rspecs to balanced mekko's #181
Open
+196
−0
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.
Goes together with:
ETSource PR
In the model we have 6 mekko figures that should be balanced since they show the balance between supply and demand in a specific sector.
These are:
mekko_of_co2_demand_supply.yml (Demand and supply of Captured CO2 (CCUS))
agriculture_local_heat_mekko.yml (Supply and demand of heat from local CHP'S)
industrial_heat_mekko.yml (Industrial steam network supply and demand)
mekko_of_hydrogen_network.yml (Supply and demand of the central hydrogen network)
mekko_of_ammonia_demand_supply.yml (Supply and demand of ammonia)
mekko_of_kerosene_demand_supply.yml (Supply and demand of kerosene)
This PR adds an rspec that checks whether these figures are balanced.
As of now the hydrogen mekko is not balanced, so this figure is skipped.
In addition it adds an rspec that reads the queries that are mentioned in the files of the figures, checks whether they are on the demand or supply side of the graph, and puts the demand and supply queries of each graph in a seperate querie.
The queries that are created by this are then used in the rspec.
The file for the rspec is automatically generated by this script as well.
When there are any changes to the mekko's we simply run this spec and we have an updated test as well.