Breakthrough-Energy / PowerSimData

Simulation framework
https://breakthrough-energy.github.io/docs/
MIT License
52 stars 40 forks source link

fix: use correct set of profile names for validation #717

Closed jenhagg closed 1 year ago

jenhagg commented 1 year ago

Purpose

Fix the check we do on the profile name when we apply change table. Currently it will raise an error when we call, e.g. tp.get_profile("wind") for a scenario based on europe_tub, since the allowed values would be {'offwind-ac', 'offwind-dc', 'onwind'}. This is consistent with the usage of self.scale_keys in TransformProfile._get_renewable_profile.

What the code is doing

Update the set of allowed values and include the invalid argument in the error message so it's clear during a scenario workflow, where this method isn't called directly.

Testing

Ran a scenario for usa_tamu successfully. Similar for europe_tub except there are still subsequent errors, but not the one being fixed here.

Time estimate

5 min