feat: climate risk from cmip cordex - #18
Conversation
ChristianBeilschmidt
left a comment
There was a problem hiding this comment.
Konnte das aus Gründen (Karte) nicht anwenden. Aber hier schon mal meine Kommentare.
| volumeMounts: | ||
| - name: pgdata | ||
| mountPath: /var/lib/postgresql/data | ||
| mountPath: /var/lib/postgresql/18/docker |
There was a problem hiding this comment.
Warum ist das anders, obwohl sich sonst nichts an der Container-Config geändert hat?
There was a problem hiding this comment.
There was a problem hiding this comment.
Also ich hab das nochmal versucht aber mit dem neusten Image geht das einfach nicht anders :(
ChristianBeilschmidt
left a comment
There was a problem hiding this comment.
Ich konnte jetzt erst einmal nur Code-only anschauen. Müssen noch mal wegen der Daten sprechen.
| /// Name of a row property that carries the cell color (hex) for this column. | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub color_field: Option<String>, | ||
| /// Name of a row property that carries a ready-to-display label for this column. | ||
| /// When set, the frontend renders it instead of the raw value. | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub label_field: Option<String>, |
There was a problem hiding this comment.
Check: Sind das validate table schema Felder (https://datapackage.org/standard/table-schema/)
There was a problem hiding this comment.
ich hab das nochmal neu gemacht / machen lassen. Es müsste jetzt korrekt sein
There was a problem hiding this comment.
das nutzt ja jetzt dieses extra Pofil: CLIMATE_RISK_TABLE_SCHEMA_PROFILE das wurde in c00f12a eingebaut aber hat sich weiter entwickelt. ist in "/backend/Src/profile.rs"
| String, | ||
| Number, | ||
| Integer, | ||
| Percentage, |
There was a problem hiding this comment.
Es gibt keinen Percentage-Typ bei TableSchema: https://datapackage.org/standard/table-schema/#field-types
There was a problem hiding this comment.
Percentage ist jetzt nur noch ein Units-Helfer und taucht nicht mehr als Table-Schema-Feld-Typ auf. Die Prozent-Anzeige (z.B. "+10 days (+20 %)") läuft über die biois-Extension (labelField/colorField).
There was a problem hiding this comment.
es gibt jetzt dafür das extra Schema
| <mat-chip class="cell-content"> | ||
| <span | ||
| class="color-dot" | ||
| [style.background-color]="element[column.colorField]" |
There was a problem hiding this comment.
Irgendwie fühlt es sich falsch an, eine Spalte mit Farbwerten zu haben.
Evtl. finden wir andere Felder für Metadaten oder müssen eine Extension machen (https://datapackage.org/standard/extensions/).
There was a problem hiding this comment.
Die Farb-/Label-Werte sind jetzt hiddenFields und über eine Table-Schema-Extension (biois.display mit kind/labelField/colorField) an die Datenfelder gebunden. Keine sichtbare Farbwert-Spalte mehr.
ChristianBeilschmidt
left a comment
There was a problem hiding this comment.
Alles bis auf Tabelle
| pub min: f64, | ||
| pub max: f64, | ||
| #[serde(skip_serializing_if = "Option::is_none")] | ||
| pub occurrence_probability: Option<f64>, |
There was a problem hiding this comment.
Der Typ serialisiert doch nach String.
| // Resolve nullable primitives like {"anyOf": [{"$ref": ...}, {"type": "null"}]} to their type | ||
| if (!type && (schema.anyOf || schema.oneOf)) { | ||
| const branches = (schema.anyOf ?? schema.oneOf) as JSONSchema[]; | ||
| const nonNull = branches.find( | ||
| (branch) => | ||
| typeof branch !== 'object' || | ||
| branch === null || | ||
| (branch as BaseJSONSchema)['type'] !== 'null', | ||
| ); | ||
| if (nonNull) { | ||
| const resolved = resolveSchemaRef(schema, nonNull); | ||
| const resolvedType = | ||
| typeof resolved === 'object' && resolved !== null | ||
| ? (resolved as BaseJSONSchema)['type'] | ||
| : undefined; | ||
| if ( | ||
| resolvedType === 'string' || | ||
| resolvedType === 'number' || | ||
| resolvedType === 'integer' || | ||
| resolvedType === 'boolean' | ||
| ) { | ||
| return typeFromSchema(resolved); | ||
| } | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
aber sollte man das dann nicht da unten machen, wenn man einmal festgestellt hat !type? Dann macht man mit items das da oben und ohne return FieldType.NestedJson;
| if (typeof example === 'string') return example; | ||
| } | ||
|
|
||
| return firstEnumOrFallback(schema, fallback); |
| @if (type() === FieldType.Boolean) { | ||
| <mat-checkbox [checked]="value()" (change)="value.set($event.checked)" | ||
| >True/False</mat-checkbox | ||
| > | ||
| } @else { |
There was a problem hiding this comment.
Das beantwortet nicht die Frage; evtl. eigene Component?
…y→Days rename - Consolidate 56 tests to 39 via table-driven tests (item 9) - Move tests inline into mod.rs, types.rs, compute.rs, workflow.rs; delete tests.rs (item 10) - Document DAYS_PER_JULIAN_YEAR constant (item 11) - Rename Day → Days to reserve Day for a future concrete calendar day type - Extract boolean-field component (item 7) - Move nullable schema resolution to !type guard (item 5) - Add JSDoc to firstEnumOrFallback (item 6) - Add doc comment to nearest_containing (item 1) - Rename to BioISTableSchemaExtension (item 2) - Remove #[allow(clippy::too_many_lines)] via build_inputs/build_outputs extraction (item 3) - Extract model_display_name helper (item 4)
… extracted logging helpers, docs
…putation id tracking, DbHandle processor
# Conflicts: # backend/src/handler.rs # backend/src/processes/climate_risk/compute.rs # backend/src/processes/climate_risk/mod.rs # backend/src/processes/climate_risk/types.rs # backend/src/processes/climate_risk/workflow.rs # backend/src/processes/parameters/data_resource.rs # backend/src/processes/parameters/mod.rs # backend/src/processes/parameters/units.rs # backend/src/server.rs # frontend/src/app/create/create.component.spec.ts # frontend/src/app/create/schema-info.ts # frontend/src/app/create/simple-form-field.ts
|
|
||
| import { ClimateRiskInputs } from '../models/ClimateRiskInputs'; | ||
| import { Response } from '../models/Response'; | ||
| import { HttpFile } from '../http/http'; |
|
|
||
| import { ClimateRiskInputs } from '../models/ClimateRiskInputs'; | ||
| import { DataResource } from '../models/DataResource'; | ||
| import { HttpFile } from '../http/http'; |
| import { CordexModel } from '../models/CordexModel'; | ||
| import { CordexRegion } from '../models/CordexRegion'; | ||
| import { PointGeoJsonInput } from '../models/PointGeoJsonInput'; | ||
| import { HttpFile } from '../http/http'; |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { HttpFile } from '../http/http'; |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { HttpFile } from '../http/http'; |
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| import { HttpFile } from '../http/http'; |
| import { ClimateRiskInputs } from '../models/ClimateRiskInputs'; | ||
| import { ClimateRiskOutputs } from '../models/ClimateRiskOutputs'; | ||
| import { ClimateRiskProcessParams } from '../models/ClimateRiskProcessParams'; | ||
| import { ClimateVariable } from '../models/ClimateVariable'; |
| import { Constraints7 } from '../models/Constraints7'; | ||
| import { Constraints8 } from '../models/Constraints8'; | ||
| import { Constraints9 } from '../models/Constraints9'; | ||
| import { CordexModel } from '../models/CordexModel'; |
| import { Constraints8 } from '../models/Constraints8'; | ||
| import { Constraints9 } from '../models/Constraints9'; | ||
| import { CordexModel } from '../models/CordexModel'; | ||
| import { CordexRegion } from '../models/CordexRegion'; |
| import { BiodiversitySensitiveAreasProcessParams } from '../models/BiodiversitySensitiveAreasProcessParams'; | ||
| import { BooleanField } from '../models/BooleanField'; | ||
| import { BoundingBox } from '../models/BoundingBox'; | ||
| import { ClimateRiskInputs } from '../models/ClimateRiskInputs'; |
…a hints The new climate-risk module dropped overall backend coverage below main (87.7% vs 89.7%): its API-facing paths are covered by DB-backed tests, but the pure aggregation/workflow-building logic was not. - tests for build_workflows filtering, run_limited ordering/error handling, unpack_join_error formatting, aggregate_rows anomaly/raw-member handling, raw-ensemble sorting, input reflection into execute results, and the probability-class/region/scenario accessors - fix models_schema_with_hints: schemars emits the enum behind items.$ref + $defs, so looking for 'enum' inside 'items' silently no-op'd and the enumNames hints were never attached; enrich the referenced definition instead

No description provided.