-
Notifications
You must be signed in to change notification settings - Fork 9
Schema handling #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Schema handling #202
Conversation
| "era5-quantiles": { | ||
| "source": "athena", | ||
| "schema": "quantile_yearly", | ||
| "period_type": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the period_type is specific to schema, might want to consider move it as part of the schema constant
windwatts-ui/src/types/DataModel.ts
Outdated
| @@ -1,4 +1,4 @@ | |||
| export type DataModel = "wtk" | "era5" | "ensemble"; | |||
| export type DataModel = "wtk-timeseries" | "era5-quantiles" | "ensemble-quantiles"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add "era5-timeseries"?
windwatts-ui/src/utils/urlParams.ts
Outdated
|
|
||
| const dataModel = params.get("dataModel"); | ||
| if (dataModel === "era5" || dataModel === "wtk" || dataModel === "ensemble") { | ||
| if (dataModel === "era5-quantiles" || dataModel === "wtk-timeseries" || dataModel === "ensemble-quantiles" || dataModel === "era5-timeseries") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe consider check infer from an valid DATA_MODELS array
export const DATA_MODELS = [
"wtk-timeseries",
"era5-quantiles",
"ensemble-quantiles",
] as const;
instead of explicitly checking each possible value
Opened a PR to work on schema handling will add more notes here