cal-adapt / climakitae

A Python toolkit for retrieving, visualizing, and performing scientific analyses with data from the Cal-Adapt Analytics Engine.
https://climakitae.readthedocs.io
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Including param validation for SCE pilot #410

Closed claalmve closed 1 month ago

claalmve commented 1 month ago

Description of PR

Summary of changes and related issue Including parameter validation for SCE pilot. This should make the code more readable. Additionally, cava_data now catches multiple logic errors at once, allowing the user to fix multiple issues at once rather than fixing them one by one.

WIP: Catching multiple input validation errors at once. I.e. inputting meannn for metric_calc and Dynamicallll for downscaling_method will only show the meannn as an issue. Once that is addressed, then it shows Dynamicallll as an issue.

Type of change

Checklist:

Tianchi-Liu commented 1 month ago

I am not aware of any usage of param that’s more appropriate here. Looks like CavaParams helps to capture inputs to cava_data that are not intended to be supported. The introduction of param makes input validation much more efficient👍

Tianchi-Liu commented 1 month ago

It’d be great if users are asked to clarify their intention if they set approach="time" but also provided a warming level.