pypsa-usa icon indicating copy to clipboard operation
pypsa-usa copied to clipboard

Add Assertion that carriers exist within eligible sets

Open ktehranchi opened this issue 1 year ago • 1 comments

Checklist

  • [X] I am using the current master branch
  • [X] I am running on an up-to-date pypsa-usa environment. Update via conda env update -f envs/environment.yaml

The Issue

If a user mistakenly places a conventional carrier in StorageUnits, instead of skipping it, we should set a warning that the carrier is not eligible.

Ideally, this happens early in each script, or in snakemake, so that the user gets the feedback immediately

Steps To Reproduce

No response

Expected Behavior

No response

Error Message

No response

Anything else?

No response

ktehranchi avatar Aug 14 '24 18:08 ktehranchi

I agree! Once we get to more stable configuration file(s) setup, it may be good to write some simple logic to validate the configuration file. Pydantic could be a good option (easy to setup and can handle conditional logic quite nicely)! That way we can just run the validation script once at the top of the workflow (maybe via the onstart command) so none of the checking has to happen in the scripts. :)

trevorb1 avatar Aug 14 '24 19:08 trevorb1