From 9e9d52050d5dd8c47d60ff3abef249df7b08dad2 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 7 Oct 2026 16:53:37 +0200 Subject: [PATCH 1/3] feat(temporalAttributes): Handle time attributes with time_steps param --- opengeodeweb_back_schemas.json | 81 ++- opengeodeweb_back_typed_schemas.d.ts | 600 ++++++++++-------- .../routes/blueprint_routes.py | 69 +- .../routes/schemas/cell_attribute_names.json | 9 +- .../routes/schemas/cell_attribute_names.py | 1 + .../routes/schemas/edge_attribute_names.json | 9 +- .../routes/schemas/edge_attribute_names.py | 1 + .../model_component_edge_attribute_names.json | 9 +- .../model_component_edge_attribute_names.py | 1 + ...del_component_polygon_attribute_names.json | 9 +- ...model_component_polygon_attribute_names.py | 1 + ..._component_polyhedron_attribute_names.json | 9 +- ...el_component_polyhedron_attribute_names.py | 1 + ...odel_component_vertex_attribute_names.json | 9 +- .../model_component_vertex_attribute_names.py | 1 + .../schemas/polygon_attribute_names.json | 9 +- .../routes/schemas/polygon_attribute_names.py | 1 + .../schemas/polyhedron_attribute_names.json | 9 +- .../schemas/polyhedron_attribute_names.py | 1 + .../schemas/vertex_attribute_names.json | 9 +- .../routes/schemas/vertex_attribute_names.py | 1 + tests/data/time_series.og_psf3d | Bin 0 -> 1368 bytes tests/test_routes.py | 31 + 23 files changed, 565 insertions(+), 306 deletions(-) create mode 100644 tests/data/time_series.og_psf3d diff --git a/opengeodeweb_back_schemas.json b/opengeodeweb_back_schemas.json index 62d0cfda..d4492cd0 100644 --- a/opengeodeweb_back_schemas.json +++ b/opengeodeweb_back_schemas.json @@ -627,6 +627,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -637,7 +643,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -969,6 +976,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -979,7 +992,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -1046,6 +1060,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -1056,7 +1076,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -1156,6 +1177,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -1166,7 +1193,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -1243,6 +1271,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -1253,7 +1287,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -1330,6 +1365,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -1340,7 +1381,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -1417,6 +1459,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -1427,7 +1475,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -1745,6 +1794,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -1755,7 +1810,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } @@ -1822,6 +1878,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -1832,7 +1894,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/opengeodeweb_back_typed_schemas.d.ts b/opengeodeweb_back_typed_schemas.d.ts index 998c8a15..b0dc38d1 100644 --- a/opengeodeweb_back_typed_schemas.d.ts +++ b/opengeodeweb_back_typed_schemas.d.ts @@ -2,471 +2,476 @@ import type json from "./opengeodeweb_back_schemas.json"; export interface CreatePolygonalSurfaceParams { - name: string; - points: PolygonalSurfacePoint[]; - polygons: Array; + name: string; + points: PolygonalSurfacePoint[]; + polygons: Array; } export interface PolygonalSurfacePoint { - x: number; - y: number; - z: number; + x: number; + y: number; + z: number; } export interface CreatePolygonalSurfaceResponse { - binary_light_viewable?: string; - collection_components?: CreatePolygonalSurfaceResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: CreatePolygonalSurfaceResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: CreatePolygonalSurfaceResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: CreatePolygonalSurfaceResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface CreatePolygonalSurfaceResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface CreatePolygonalSurfaceResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface CreatePointSetParams { - name: string; - points: Point[]; + name: string; + points: Point[]; } export interface Point { - x: number; - y: number; - z: number; + x: number; + y: number; + z: number; } export interface CreatePointSetResponse { - binary_light_viewable?: string; - collection_components?: CreatePointSetResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: CreatePointSetResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: CreatePointSetResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: CreatePointSetResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface CreatePointSetResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface CreatePointSetResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface CreateEdgedCurveParams { - edges: Array; - name: string; - points: EdgedCurvePoint[]; + edges: Array; + name: string; + points: EdgedCurvePoint[]; } export interface EdgedCurvePoint { - x: number; - y: number; - z: number; + x: number; + y: number; + z: number; } export interface CreateEdgedCurveResponse { - binary_light_viewable?: string; - collection_components?: CreateEdgedCurveResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: CreateEdgedCurveResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: CreateEdgedCurveResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: CreateEdgedCurveResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface CreateEdgedCurveResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface CreateEdgedCurveResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface VertexAttributeNamesParams { - id: string; + id: string; } export interface VertexAttributeNamesResponse { - attributes: VertexAttributeNamesResponseAttribute[]; + attributes: VertexAttributeNamesResponseAttribute[]; } export interface VertexAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ValidateParams { - id: string; + id: string; } export interface ValidateResponse { - is_valid: boolean; - issues: string[]; - nb_issues: number; + is_valid: boolean; + issues: string[]; + nb_issues: number; } export interface UploadFileParams { - filename?: string; + filename?: string; } export interface UploadFileResponse { - message: string; + message: string; } export interface TextureCoordinatesParams { - id: string; + id: string; } export interface TextureCoordinatesResponse { - texture_coordinates: string[]; + texture_coordinates: string[]; } export interface SaveViewableFileParams { - filename: string; - geode_object_type: string; + filename: string; + geode_object_type: string; } export interface SaveViewableFileResponse { - binary_light_viewable?: string; - collection_components?: SaveViewableFileResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: SaveViewableFileResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: SaveViewableFileResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: SaveViewableFileResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface SaveViewableFileResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface SaveViewableFileResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface PolyhedronAttributeNamesParams { - id: string; + id: string; } export interface PolyhedronAttributeNamesResponse { - attributes: PolyhedronAttributeNamesResponseAttribute[]; + attributes: PolyhedronAttributeNamesResponseAttribute[]; } export interface PolyhedronAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface PolygonAttributeNamesParams { - id: string; + id: string; } export interface PolygonAttributeNamesResponse { - attributes: PolygonAttributeNamesResponseAttribute[]; + attributes: PolygonAttributeNamesResponseAttribute[]; } export interface PolygonAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } -export interface PingParams { -} +export interface PingParams {} export interface PingResponse { - message: string; + message: string; } export interface ModelComponentVertexAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentVertexAttributeNamesResponse { - attributes: ModelComponentVertexAttributeNamesResponseAttribute[]; + attributes: ModelComponentVertexAttributeNamesResponseAttribute[]; } export interface ModelComponentVertexAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ModelComponentPolyhedronAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentPolyhedronAttributeNamesResponse { - attributes: ModelComponentPolyhedronAttributeNamesResponseAttribute[]; + attributes: ModelComponentPolyhedronAttributeNamesResponseAttribute[]; } export interface ModelComponentPolyhedronAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ModelComponentPolygonAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentPolygonAttributeNamesResponse { - attributes: ModelComponentPolygonAttributeNamesResponseAttribute[]; + attributes: ModelComponentPolygonAttributeNamesResponseAttribute[]; } export interface ModelComponentPolygonAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ModelComponentEdgeAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentEdgeAttributeNamesResponse { - attributes: ModelComponentEdgeAttributeNamesResponseAttribute[]; + attributes: ModelComponentEdgeAttributeNamesResponseAttribute[]; } export interface ModelComponentEdgeAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface MissingFilesParams { - filename: string; - geode_object_type: string; + filename: string; + geode_object_type: string; } export interface MissingFilesResponse { - additional_files: string[]; - has_missing_files: boolean; - mandatory_files: string[]; + additional_files: string[]; + has_missing_files: boolean; + mandatory_files: string[]; } -export interface KillParams { -} +export interface KillParams {} export interface KillResponse { - message: string; + message: string; } -export interface ImportProjectParams { -} +export interface ImportProjectParams {} export interface ImportProjectResponse { - snapshot: { [key: string]: any }; + snapshot: { [key: string]: any }; } export interface GeographicCoordinateSystemsParams { - geode_object_type: string; + geode_object_type: string; } export interface GeographicCoordinateSystemsResponse { - crs_list: CRSList[]; + crs_list: CRSList[]; } export interface CRSList { - authority: string; - code: string; - name: string; + authority: string; + code: string; + name: string; } export interface GeodeObjectsAndOutputExtensionsParams { - filename: string; - geode_object_type: string; + filename: string; + geode_object_type: string; } export interface GeodeObjectsAndOutputExtensionsResponse { - geode_objects_and_output_extensions: { [key: string]: { [key: string]: boolean } }; + geode_objects_and_output_extensions: { [key: string]: { [key: string]: boolean } }; } export interface GeodeObjectInheritanceParams { - geode_object_type: string; + geode_object_type: string; } export interface GeodeObjectInheritanceResponse { - children: string[]; - parents: string[]; + children: string[]; + parents: string[]; } export interface ExportProjectParams { - filename: string; - snapshot: { [key: string]: any }; + filename: string; + snapshot: { [key: string]: any }; } export interface EdgeAttributeNamesParams { - id: string; + id: string; } export interface EdgeAttributeNamesResponse { - attributes: EdgeAttributeNamesResponseAttribute[]; + attributes: EdgeAttributeNamesResponseAttribute[]; } export interface EdgeAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface CellAttributeNamesParams { - id: string; + id: string; } export interface CellAttributeNamesResponse { - attributes: CellAttributeNamesResponseAttribute[]; + attributes: CellAttributeNamesResponseAttribute[]; } export interface CellAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface AllowedObjectsParams { - filename: string; + filename: string; } export interface AllowedObjectsResponse { - allowed_objects: { [key: string]: AllowedObject }; + allowed_objects: { [key: string]: AllowedObject }; } export interface AllowedObject { - is_loadable: number; - object_priority: number; + is_loadable: number; + object_priority: number; } -export interface AllowedFilesParams { -} +export interface AllowedFilesParams {} export interface AllowedFilesResponse { - extensions: string[]; + extensions: string[]; } export interface ErrorResponse { - code: number; - description: string; - name: string; + code: number; + description: string; + name: string; } // `__params` and `__response` only exist at type level, to infer request/response types from a schema. @@ -479,33 +484,68 @@ export type TypedSchema = { export interface Schemas { readonly opengeodeweb_back: { readonly create: { - readonly polygonal_surface: (typeof json)["opengeodeweb_back"]["create"]["polygonal_surface"] & TypedSchema; - readonly point_set: (typeof json)["opengeodeweb_back"]["create"]["point_set"] & TypedSchema; - readonly edged_curve: (typeof json)["opengeodeweb_back"]["create"]["edged_curve"] & TypedSchema; + readonly polygonal_surface: (typeof json)["opengeodeweb_back"]["create"]["polygonal_surface"] & + TypedSchema; + readonly point_set: (typeof json)["opengeodeweb_back"]["create"]["point_set"] & + TypedSchema; + readonly edged_curve: (typeof json)["opengeodeweb_back"]["create"]["edged_curve"] & + TypedSchema; }; - readonly vertex_attribute_names: (typeof json)["opengeodeweb_back"]["vertex_attribute_names"] & TypedSchema; - readonly validate: (typeof json)["opengeodeweb_back"]["validate"] & TypedSchema; - readonly upload_file: (typeof json)["opengeodeweb_back"]["upload_file"] & TypedSchema; - readonly texture_coordinates: (typeof json)["opengeodeweb_back"]["texture_coordinates"] & TypedSchema; - readonly save_viewable_file: (typeof json)["opengeodeweb_back"]["save_viewable_file"] & TypedSchema; - readonly polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["polyhedron_attribute_names"] & TypedSchema; - readonly polygon_attribute_names: (typeof json)["opengeodeweb_back"]["polygon_attribute_names"] & TypedSchema; - readonly ping: (typeof json)["opengeodeweb_back"]["ping"] & TypedSchema; - readonly model_component_vertex_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_vertex_attribute_names"] & TypedSchema; - readonly model_component_polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polyhedron_attribute_names"] & TypedSchema; - readonly model_component_polygon_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polygon_attribute_names"] & TypedSchema; - readonly model_component_edge_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_edge_attribute_names"] & TypedSchema; - readonly missing_files: (typeof json)["opengeodeweb_back"]["missing_files"] & TypedSchema; - readonly kill: (typeof json)["opengeodeweb_back"]["kill"] & TypedSchema; - readonly import_project: (typeof json)["opengeodeweb_back"]["import_project"] & TypedSchema; - readonly geographic_coordinate_systems: (typeof json)["opengeodeweb_back"]["geographic_coordinate_systems"] & TypedSchema; - readonly geode_objects_and_output_extensions: (typeof json)["opengeodeweb_back"]["geode_objects_and_output_extensions"] & TypedSchema; - readonly geode_object_inheritance: (typeof json)["opengeodeweb_back"]["geode_object_inheritance"] & TypedSchema; - readonly export_project: (typeof json)["opengeodeweb_back"]["export_project"] & TypedSchema; - readonly edge_attribute_names: (typeof json)["opengeodeweb_back"]["edge_attribute_names"] & TypedSchema; - readonly cell_attribute_names: (typeof json)["opengeodeweb_back"]["cell_attribute_names"] & TypedSchema; - readonly allowed_objects: (typeof json)["opengeodeweb_back"]["allowed_objects"] & TypedSchema; - readonly allowed_files: (typeof json)["opengeodeweb_back"]["allowed_files"] & TypedSchema; + readonly vertex_attribute_names: (typeof json)["opengeodeweb_back"]["vertex_attribute_names"] & + TypedSchema; + readonly validate: (typeof json)["opengeodeweb_back"]["validate"] & + TypedSchema; + readonly upload_file: (typeof json)["opengeodeweb_back"]["upload_file"] & + TypedSchema; + readonly texture_coordinates: (typeof json)["opengeodeweb_back"]["texture_coordinates"] & + TypedSchema; + readonly save_viewable_file: (typeof json)["opengeodeweb_back"]["save_viewable_file"] & + TypedSchema; + readonly polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["polyhedron_attribute_names"] & + TypedSchema; + readonly polygon_attribute_names: (typeof json)["opengeodeweb_back"]["polygon_attribute_names"] & + TypedSchema; + readonly ping: (typeof json)["opengeodeweb_back"]["ping"] & + TypedSchema; + readonly model_component_vertex_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_vertex_attribute_names"] & + TypedSchema< + ModelComponentVertexAttributeNamesParams, + ModelComponentVertexAttributeNamesResponse + >; + readonly model_component_polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polyhedron_attribute_names"] & + TypedSchema< + ModelComponentPolyhedronAttributeNamesParams, + ModelComponentPolyhedronAttributeNamesResponse + >; + readonly model_component_polygon_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polygon_attribute_names"] & + TypedSchema< + ModelComponentPolygonAttributeNamesParams, + ModelComponentPolygonAttributeNamesResponse + >; + readonly model_component_edge_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_edge_attribute_names"] & + TypedSchema; + readonly missing_files: (typeof json)["opengeodeweb_back"]["missing_files"] & + TypedSchema; + readonly kill: (typeof json)["opengeodeweb_back"]["kill"] & + TypedSchema; + readonly import_project: (typeof json)["opengeodeweb_back"]["import_project"] & + TypedSchema; + readonly geographic_coordinate_systems: (typeof json)["opengeodeweb_back"]["geographic_coordinate_systems"] & + TypedSchema; + readonly geode_objects_and_output_extensions: (typeof json)["opengeodeweb_back"]["geode_objects_and_output_extensions"] & + TypedSchema; + readonly geode_object_inheritance: (typeof json)["opengeodeweb_back"]["geode_object_inheritance"] & + TypedSchema; + readonly export_project: (typeof json)["opengeodeweb_back"]["export_project"] & + TypedSchema; + readonly edge_attribute_names: (typeof json)["opengeodeweb_back"]["edge_attribute_names"] & + TypedSchema; + readonly cell_attribute_names: (typeof json)["opengeodeweb_back"]["cell_attribute_names"] & + TypedSchema; + readonly allowed_objects: (typeof json)["opengeodeweb_back"]["allowed_objects"] & + TypedSchema; + readonly allowed_files: (typeof json)["opengeodeweb_back"]["allowed_files"] & + TypedSchema; }; } diff --git a/src/opengeodeweb_back/routes/blueprint_routes.py b/src/opengeodeweb_back/routes/blueprint_routes.py index 4e7d3bb9..a70e6bdb 100644 --- a/src/opengeodeweb_back/routes/blueprint_routes.py +++ b/src/opengeodeweb_back/routes/blueprint_routes.py @@ -244,15 +244,24 @@ def texture_coordinates( return schemas.TextureCoordinatesResponse(texture_coordinates=texture_coordinates) -def extract_valid_attribute_values( +def _attribute_ids_for_name( + attribute_manager: og.AttributeManager, attribute_name: str +) -> list[og.uuid]: + time_steps = attribute_manager.time_steps(attribute_name) + if time_steps: + return [time_step.attribute_id for time_step in time_steps] + attribute_ids = attribute_manager.attribute_ids_matching_name(attribute_name) + if not isinstance(attribute_ids, list) or not attribute_ids: + return [] + return attribute_ids[:1] + + +def _extract_valid_values_from_attribute( attribute_manager: og.AttributeManager, - attribute_name: str, + attribute_id: og.uuid, item_index: int, ) -> tuple[list[float], bool]: - attribute_ids = attribute_manager.attribute_ids_matching_name(attribute_name) - if not isinstance(attribute_ids, list): - return [], False - attribute = attribute_manager.find_generic_attribute(attribute_ids[0]) + attribute = attribute_manager.find_generic_attribute(attribute_id) if ( attribute is None or not attribute.is_genericable() @@ -291,21 +300,59 @@ def extract_valid_attribute_values( return valid_values, has_nan +def extract_valid_attribute_values( + attribute_manager: og.AttributeManager, + attribute_name: str, + item_index: int, +) -> tuple[list[float], bool]: + valid_values: list[float] = [] + has_nan = False + for attribute_id in _attribute_ids_for_name(attribute_manager, attribute_name): + step_values, step_has_nan = _extract_valid_values_from_attribute( + attribute_manager, attribute_id, item_index + ) + valid_values.extend(step_values) + has_nan = has_nan or step_has_nan + return valid_values, has_nan + + +def _common_time_steps( + attribute_managers: list[og.AttributeManager], attribute_name: str +) -> list[float] | None: + times = [ + time_step.time for time_step in attribute_managers[0].time_steps(attribute_name) + ] + for attribute_manager in attribute_managers[1:]: + other_times = [ + time_step.time + for time_step in attribute_manager.time_steps(attribute_name) + ] + if other_times != times: + return None + return times + + def attributes_metadata( manager: og.AttributeManager | list[og.AttributeManager], ) -> list[dict[str, str | int | float | bool | list[float]]]: attribute_managers = manager if isinstance(manager, list) else [manager] attributes: list[dict[str, str | int | float | bool | list[float]]] = [] first_manager = attribute_managers[0] + listed_time_series: set[str] = set() for id in first_manager.attribute_ids(): attribute = first_manager.find_generic_attribute(id) if attribute is None: continue attribute_name = attribute.name() - if attribute_name is None: + if attribute_name is None or attribute_name in listed_time_series: continue if not attribute.is_genericable() or not attribute.properties().transferable: continue + time_steps = _common_time_steps(attribute_managers, attribute_name) + if time_steps is None: + continue + if time_steps: + listed_time_series.add(attribute_name) nb_items = attribute.nb_items() min_values, max_values = [], [] attribute_has_nan = False @@ -323,16 +370,22 @@ def attributes_metadata( max_values.append(max(valid_values)) if not min_values or not max_values: continue + series_id = ( + first_manager.time_steps(attribute_name)[0].attribute_id.string() + if time_steps + else id.string() + ) attributes.append( { "attribute_name": attribute_name, - "attribute_id": id.string(), + "attribute_id": series_id, "nb_items": nb_items, "min_value": min(min_values), "max_value": max(max_values), "min_values": min_values, "max_values": max_values, "no_data": attribute_has_nan, + "time_steps": time_steps, } ) return attributes diff --git a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.json b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.json index 455c9b6f..3ad8852c 100644 --- a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.json @@ -52,6 +52,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -62,7 +68,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py index 3b92ff90..75e99c6c 100644 --- a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py @@ -26,6 +26,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.json b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.json index 275e06a5..b6375a20 100644 --- a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.json @@ -52,6 +52,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -62,7 +68,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py index 27ba229d..a65670a0 100644 --- a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py @@ -26,6 +26,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.json b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.json index 4b7e2ca9..22f40634 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.json @@ -62,6 +62,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -72,7 +78,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py index 770cb109..9cc301e5 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py @@ -27,6 +27,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.json b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.json index 174dbd26..8318ba04 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.json @@ -62,6 +62,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -72,7 +78,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py index fdc9036d..1ecdd6c7 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py @@ -27,6 +27,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.json b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.json index b4403082..ec4085cc 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.json @@ -62,6 +62,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -72,7 +78,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py index f0c11557..1b09c2b5 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py @@ -27,6 +27,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.json b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.json index e5a82e74..13cdc94f 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.json @@ -62,6 +62,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -72,7 +78,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py index 2b3be900..85bf8507 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py @@ -27,6 +27,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json index a069701b..0f0e044f 100644 --- a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json @@ -52,6 +52,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -62,7 +68,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py index 9fd8b771..2fe2a5a1 100644 --- a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py @@ -26,6 +26,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json index e527a2be..aed82bd2 100644 --- a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json @@ -52,6 +52,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -62,7 +68,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py index 58944b35..957ba2ef 100644 --- a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py @@ -26,6 +26,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json index 9939d854..eba134e8 100644 --- a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json +++ b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json @@ -52,6 +52,12 @@ }, "no_data": { "type": "boolean" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } } }, "required": [ @@ -62,7 +68,8 @@ "max_value", "min_values", "max_values", - "no_data" + "no_data", + "time_steps" ], "additionalProperties": false } diff --git a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py index 087c6f04..fbdc9090 100644 --- a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py @@ -26,6 +26,7 @@ def __post_init__(self) -> None: min_values: List[float] nb_items: int no_data: bool + time_steps: List[float] @dataclass diff --git a/tests/data/time_series.og_psf3d b/tests/data/time_series.og_psf3d new file mode 100644 index 0000000000000000000000000000000000000000..b60d3e771c863bdb793ca3258b64dac0547a61c4 GIT binary patch literal 1368 zcmZQ(W@2PyWMX7uVqsulU}IujC{VfoXxZtOZCSfE&sB?OmJ3TP%1lhkNp&nKDauSL zElCZ?q$&kIW}DoL$iVq|6pYGhz!WMRV4%qUs_Q5&CFlwX>c5?=<^!^rd>1Rx{} z6G%G)6C<1inge75-2`#U*##4Kn*5wzXv?aP;S}e@0JZ-7d}n5po$Pv|>=GE(2jpkwl^DAq?BT%F#>iFxQdP_d z_8`cU=m4h#3r-oR#0Pr3~Umu!s5c;^O=1Nj$fN)^mzu_%kKH6qo=Y-h}(Z zfsv65?p?TUM(&c-+=A4i#FEmYR1Ein(ijk!IDjbzQz&f)rOh2+uDRTlxF@DkxM4Fl zajtn_&&bFFcMV)OQLYhz+Aaa5WuUYI+%;GG>%NtyJfE@+U8dS)E*lggU3kv}*1wjNzD-#0%-9uCu literal 0 HcmV?d00001 diff --git a/tests/test_routes.py b/tests/test_routes.py index 24e56aca..aafb7141 100644 --- a/tests/test_routes.py +++ b/tests/test_routes.py @@ -352,6 +352,8 @@ def test_vertex_attribute_names(client: FlaskClient, test_id: str) -> None: assert "max_values" in attribute assert "no_data" in attribute assert isinstance(attribute["no_data"], bool) + assert "time_steps" in attribute + assert isinstance(attribute["time_steps"], list) print( f"[ATTRIBUTES]: ", [attribute["nb_items"] for attribute in attributes], @@ -778,6 +780,8 @@ def _assert_attributes_response(response: TestResponse) -> None: assert "max_values" in attribute assert "no_data" in attribute assert isinstance(attribute["no_data"], bool) + assert "time_steps" in attribute + assert isinstance(attribute["time_steps"], list) def test_model_component_vertex_attribute_names(client: FlaskClient) -> None: @@ -900,3 +904,30 @@ def test_component_id_length_is_strict(client: FlaskClient) -> None: model_id, _ = _load_brep_components(client) response = client.post(route, json={"id": model_id, "component_ids": ["a" * 32]}) assert response.status_code == 400 + + +def test_vertex_attribute_names_time_series(client: FlaskClient, test_id: str) -> None: + route = f"/opengeodeweb_back/vertex_attribute_names" + + with client.application.app_context(): + file = os.path.join(data_dir, "time_series.og_psf3d") + data = Data.create( + geode_id=DUMMY_GEODE_ID, + geode_object=GeodePolygonalSurface3D.geode_object_type(), + viewer_object=GeodePolygonalSurface3D.viewer_type(), + viewer_elements_type=GeodePolygonalSurface3D.viewer_elements_type(), + ) + data.native_file = file + session = get_session() + if session: + session.commit() + + data_path = geode_functions.data_file_path(data.id, data.native_file) + os.makedirs(os.path.dirname(data_path), exist_ok=True) + assert os.path.exists(data_path), f"File not found at {data_path}" + response = client.post(route, json={"id": data.id}) + assert response.status_code == 200 + attributes = response.get_json()["attributes"] + temperature = [a for a in attributes if a["attribute_name"] == "temperature"] + assert len(temperature) == 1 + assert temperature[0]["time_steps"] == [0.5, 1.0, 2.0] From 0801eae760100fbcc2ed8ff7af9bebe7d43921f5 Mon Sep 17 00:00:00 2001 From: MaxNumerique <144453705+MaxNumerique@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:21:01 +0000 Subject: [PATCH 2/3] Apply prepare changes --- opengeodeweb_back_typed_schemas.d.ts | 609 +++++++++--------- requirements.txt | 1 - .../routes/blueprint_routes.py | 3 +- 3 files changed, 290 insertions(+), 323 deletions(-) diff --git a/opengeodeweb_back_typed_schemas.d.ts b/opengeodeweb_back_typed_schemas.d.ts index b0dc38d1..80526eb8 100644 --- a/opengeodeweb_back_typed_schemas.d.ts +++ b/opengeodeweb_back_typed_schemas.d.ts @@ -2,476 +2,480 @@ import type json from "./opengeodeweb_back_schemas.json"; export interface CreatePolygonalSurfaceParams { - name: string; - points: PolygonalSurfacePoint[]; - polygons: Array; + name: string; + points: PolygonalSurfacePoint[]; + polygons: Array; } export interface PolygonalSurfacePoint { - x: number; - y: number; - z: number; + x: number; + y: number; + z: number; } export interface CreatePolygonalSurfaceResponse { - binary_light_viewable?: string; - collection_components?: CreatePolygonalSurfaceResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: CreatePolygonalSurfaceResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: CreatePolygonalSurfaceResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: CreatePolygonalSurfaceResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface CreatePolygonalSurfaceResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface CreatePolygonalSurfaceResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface CreatePointSetParams { - name: string; - points: Point[]; + name: string; + points: Point[]; } export interface Point { - x: number; - y: number; - z: number; + x: number; + y: number; + z: number; } export interface CreatePointSetResponse { - binary_light_viewable?: string; - collection_components?: CreatePointSetResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: CreatePointSetResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: CreatePointSetResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: CreatePointSetResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface CreatePointSetResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface CreatePointSetResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface CreateEdgedCurveParams { - edges: Array; - name: string; - points: EdgedCurvePoint[]; + edges: Array; + name: string; + points: EdgedCurvePoint[]; } export interface EdgedCurvePoint { - x: number; - y: number; - z: number; + x: number; + y: number; + z: number; } export interface CreateEdgedCurveResponse { - binary_light_viewable?: string; - collection_components?: CreateEdgedCurveResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: CreateEdgedCurveResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: CreateEdgedCurveResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: CreateEdgedCurveResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface CreateEdgedCurveResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface CreateEdgedCurveResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface VertexAttributeNamesParams { - id: string; + id: string; } export interface VertexAttributeNamesResponse { - attributes: VertexAttributeNamesResponseAttribute[]; + attributes: VertexAttributeNamesResponseAttribute[]; } export interface VertexAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ValidateParams { - id: string; + id: string; } export interface ValidateResponse { - is_valid: boolean; - issues: string[]; - nb_issues: number; + is_valid: boolean; + issues: string[]; + nb_issues: number; } export interface UploadFileParams { - filename?: string; + filename?: string; } export interface UploadFileResponse { - message: string; + message: string; } export interface TextureCoordinatesParams { - id: string; + id: string; } export interface TextureCoordinatesResponse { - texture_coordinates: string[]; + texture_coordinates: string[]; } export interface SaveViewableFileParams { - filename: string; - geode_object_type: string; + filename: string; + geode_object_type: string; } export interface SaveViewableFileResponse { - binary_light_viewable?: string; - collection_components?: SaveViewableFileResponseCollectionComponent[]; - geode_id: string; - geode_object_type: string; - id: string; - is_viewable: boolean; - mesh_components?: SaveViewableFileResponseMeshComponent[]; - name: string; - native_file: string; - nb_vertices?: number; - viewable_file?: string; - viewer_type: string; + binary_light_viewable?: string; + collection_components?: SaveViewableFileResponseCollectionComponent[]; + geode_id: string; + geode_object_type: string; + id: string; + is_viewable: boolean; + mesh_components?: SaveViewableFileResponseMeshComponent[]; + name: string; + native_file: string; + nb_vertices?: number; + viewable_file?: string; + viewer_type: string; } export interface SaveViewableFileResponseCollectionComponent { - geode_id: string; - is_active: boolean; - items: string[]; - name: string; - type: string; + geode_id: string; + is_active: boolean; + items: string[]; + name: string; + type: string; } export interface SaveViewableFileResponseMeshComponent { - boundaries: string[]; - geode_id: string; - internals: string[]; - is_active: boolean; - name: string; - type: string; - viewer_id: number; + boundaries: string[]; + geode_id: string; + internals: string[]; + is_active: boolean; + name: string; + type: string; + viewer_id: number; } export interface PolyhedronAttributeNamesParams { - id: string; + id: string; } export interface PolyhedronAttributeNamesResponse { - attributes: PolyhedronAttributeNamesResponseAttribute[]; + attributes: PolyhedronAttributeNamesResponseAttribute[]; } export interface PolyhedronAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface PolygonAttributeNamesParams { - id: string; + id: string; } export interface PolygonAttributeNamesResponse { - attributes: PolygonAttributeNamesResponseAttribute[]; + attributes: PolygonAttributeNamesResponseAttribute[]; } export interface PolygonAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } -export interface PingParams {} +export interface PingParams { +} export interface PingResponse { - message: string; + message: string; } export interface ModelComponentVertexAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentVertexAttributeNamesResponse { - attributes: ModelComponentVertexAttributeNamesResponseAttribute[]; + attributes: ModelComponentVertexAttributeNamesResponseAttribute[]; } export interface ModelComponentVertexAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ModelComponentPolyhedronAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentPolyhedronAttributeNamesResponse { - attributes: ModelComponentPolyhedronAttributeNamesResponseAttribute[]; + attributes: ModelComponentPolyhedronAttributeNamesResponseAttribute[]; } export interface ModelComponentPolyhedronAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ModelComponentPolygonAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentPolygonAttributeNamesResponse { - attributes: ModelComponentPolygonAttributeNamesResponseAttribute[]; + attributes: ModelComponentPolygonAttributeNamesResponseAttribute[]; } export interface ModelComponentPolygonAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface ModelComponentEdgeAttributeNamesParams { - component_ids: string[]; - id: string; + component_ids: string[]; + id: string; } export interface ModelComponentEdgeAttributeNamesResponse { - attributes: ModelComponentEdgeAttributeNamesResponseAttribute[]; + attributes: ModelComponentEdgeAttributeNamesResponseAttribute[]; } export interface ModelComponentEdgeAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface MissingFilesParams { - filename: string; - geode_object_type: string; + filename: string; + geode_object_type: string; } export interface MissingFilesResponse { - additional_files: string[]; - has_missing_files: boolean; - mandatory_files: string[]; + additional_files: string[]; + has_missing_files: boolean; + mandatory_files: string[]; } -export interface KillParams {} +export interface KillParams { +} export interface KillResponse { - message: string; + message: string; } -export interface ImportProjectParams {} +export interface ImportProjectParams { +} export interface ImportProjectResponse { - snapshot: { [key: string]: any }; + snapshot: { [key: string]: any }; } export interface GeographicCoordinateSystemsParams { - geode_object_type: string; + geode_object_type: string; } export interface GeographicCoordinateSystemsResponse { - crs_list: CRSList[]; + crs_list: CRSList[]; } export interface CRSList { - authority: string; - code: string; - name: string; + authority: string; + code: string; + name: string; } export interface GeodeObjectsAndOutputExtensionsParams { - filename: string; - geode_object_type: string; + filename: string; + geode_object_type: string; } export interface GeodeObjectsAndOutputExtensionsResponse { - geode_objects_and_output_extensions: { [key: string]: { [key: string]: boolean } }; + geode_objects_and_output_extensions: { [key: string]: { [key: string]: boolean } }; } export interface GeodeObjectInheritanceParams { - geode_object_type: string; + geode_object_type: string; } export interface GeodeObjectInheritanceResponse { - children: string[]; - parents: string[]; + children: string[]; + parents: string[]; } export interface ExportProjectParams { - filename: string; - snapshot: { [key: string]: any }; + filename: string; + snapshot: { [key: string]: any }; } export interface EdgeAttributeNamesParams { - id: string; + id: string; } export interface EdgeAttributeNamesResponse { - attributes: EdgeAttributeNamesResponseAttribute[]; + attributes: EdgeAttributeNamesResponseAttribute[]; } export interface EdgeAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface CellAttributeNamesParams { - id: string; + id: string; } export interface CellAttributeNamesResponse { - attributes: CellAttributeNamesResponseAttribute[]; + attributes: CellAttributeNamesResponseAttribute[]; } export interface CellAttributeNamesResponseAttribute { - attribute_id: string; - attribute_name: string; - max_value: number; - max_values: number[]; - min_value: number; - min_values: number[]; - nb_items: number; - no_data: boolean; - time_steps: number[]; + attribute_id: string; + attribute_name: string; + max_value: number; + max_values: number[]; + min_value: number; + min_values: number[]; + nb_items: number; + no_data: boolean; + time_steps: number[]; } export interface AllowedObjectsParams { - filename: string; + filename: string; } export interface AllowedObjectsResponse { - allowed_objects: { [key: string]: AllowedObject }; + allowed_objects: { [key: string]: AllowedObject }; } export interface AllowedObject { - is_loadable: number; - object_priority: number; + is_loadable: number; + object_priority: number; } -export interface AllowedFilesParams {} +export interface AllowedFilesParams { +} export interface AllowedFilesResponse { - extensions: string[]; + extensions: string[]; } export interface ErrorResponse { - code: number; - description: string; - name: string; + code: number; + description: string; + name: string; } // `__params` and `__response` only exist at type level, to infer request/response types from a schema. @@ -484,68 +488,33 @@ export type TypedSchema = { export interface Schemas { readonly opengeodeweb_back: { readonly create: { - readonly polygonal_surface: (typeof json)["opengeodeweb_back"]["create"]["polygonal_surface"] & - TypedSchema; - readonly point_set: (typeof json)["opengeodeweb_back"]["create"]["point_set"] & - TypedSchema; - readonly edged_curve: (typeof json)["opengeodeweb_back"]["create"]["edged_curve"] & - TypedSchema; + readonly polygonal_surface: (typeof json)["opengeodeweb_back"]["create"]["polygonal_surface"] & TypedSchema; + readonly point_set: (typeof json)["opengeodeweb_back"]["create"]["point_set"] & TypedSchema; + readonly edged_curve: (typeof json)["opengeodeweb_back"]["create"]["edged_curve"] & TypedSchema; }; - readonly vertex_attribute_names: (typeof json)["opengeodeweb_back"]["vertex_attribute_names"] & - TypedSchema; - readonly validate: (typeof json)["opengeodeweb_back"]["validate"] & - TypedSchema; - readonly upload_file: (typeof json)["opengeodeweb_back"]["upload_file"] & - TypedSchema; - readonly texture_coordinates: (typeof json)["opengeodeweb_back"]["texture_coordinates"] & - TypedSchema; - readonly save_viewable_file: (typeof json)["opengeodeweb_back"]["save_viewable_file"] & - TypedSchema; - readonly polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["polyhedron_attribute_names"] & - TypedSchema; - readonly polygon_attribute_names: (typeof json)["opengeodeweb_back"]["polygon_attribute_names"] & - TypedSchema; - readonly ping: (typeof json)["opengeodeweb_back"]["ping"] & - TypedSchema; - readonly model_component_vertex_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_vertex_attribute_names"] & - TypedSchema< - ModelComponentVertexAttributeNamesParams, - ModelComponentVertexAttributeNamesResponse - >; - readonly model_component_polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polyhedron_attribute_names"] & - TypedSchema< - ModelComponentPolyhedronAttributeNamesParams, - ModelComponentPolyhedronAttributeNamesResponse - >; - readonly model_component_polygon_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polygon_attribute_names"] & - TypedSchema< - ModelComponentPolygonAttributeNamesParams, - ModelComponentPolygonAttributeNamesResponse - >; - readonly model_component_edge_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_edge_attribute_names"] & - TypedSchema; - readonly missing_files: (typeof json)["opengeodeweb_back"]["missing_files"] & - TypedSchema; - readonly kill: (typeof json)["opengeodeweb_back"]["kill"] & - TypedSchema; - readonly import_project: (typeof json)["opengeodeweb_back"]["import_project"] & - TypedSchema; - readonly geographic_coordinate_systems: (typeof json)["opengeodeweb_back"]["geographic_coordinate_systems"] & - TypedSchema; - readonly geode_objects_and_output_extensions: (typeof json)["opengeodeweb_back"]["geode_objects_and_output_extensions"] & - TypedSchema; - readonly geode_object_inheritance: (typeof json)["opengeodeweb_back"]["geode_object_inheritance"] & - TypedSchema; - readonly export_project: (typeof json)["opengeodeweb_back"]["export_project"] & - TypedSchema; - readonly edge_attribute_names: (typeof json)["opengeodeweb_back"]["edge_attribute_names"] & - TypedSchema; - readonly cell_attribute_names: (typeof json)["opengeodeweb_back"]["cell_attribute_names"] & - TypedSchema; - readonly allowed_objects: (typeof json)["opengeodeweb_back"]["allowed_objects"] & - TypedSchema; - readonly allowed_files: (typeof json)["opengeodeweb_back"]["allowed_files"] & - TypedSchema; + readonly vertex_attribute_names: (typeof json)["opengeodeweb_back"]["vertex_attribute_names"] & TypedSchema; + readonly validate: (typeof json)["opengeodeweb_back"]["validate"] & TypedSchema; + readonly upload_file: (typeof json)["opengeodeweb_back"]["upload_file"] & TypedSchema; + readonly texture_coordinates: (typeof json)["opengeodeweb_back"]["texture_coordinates"] & TypedSchema; + readonly save_viewable_file: (typeof json)["opengeodeweb_back"]["save_viewable_file"] & TypedSchema; + readonly polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["polyhedron_attribute_names"] & TypedSchema; + readonly polygon_attribute_names: (typeof json)["opengeodeweb_back"]["polygon_attribute_names"] & TypedSchema; + readonly ping: (typeof json)["opengeodeweb_back"]["ping"] & TypedSchema; + readonly model_component_vertex_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_vertex_attribute_names"] & TypedSchema; + readonly model_component_polyhedron_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polyhedron_attribute_names"] & TypedSchema; + readonly model_component_polygon_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_polygon_attribute_names"] & TypedSchema; + readonly model_component_edge_attribute_names: (typeof json)["opengeodeweb_back"]["model_component_edge_attribute_names"] & TypedSchema; + readonly missing_files: (typeof json)["opengeodeweb_back"]["missing_files"] & TypedSchema; + readonly kill: (typeof json)["opengeodeweb_back"]["kill"] & TypedSchema; + readonly import_project: (typeof json)["opengeodeweb_back"]["import_project"] & TypedSchema; + readonly geographic_coordinate_systems: (typeof json)["opengeodeweb_back"]["geographic_coordinate_systems"] & TypedSchema; + readonly geode_objects_and_output_extensions: (typeof json)["opengeodeweb_back"]["geode_objects_and_output_extensions"] & TypedSchema; + readonly geode_object_inheritance: (typeof json)["opengeodeweb_back"]["geode_object_inheritance"] & TypedSchema; + readonly export_project: (typeof json)["opengeodeweb_back"]["export_project"] & TypedSchema; + readonly edge_attribute_names: (typeof json)["opengeodeweb_back"]["edge_attribute_names"] & TypedSchema; + readonly cell_attribute_names: (typeof json)["opengeodeweb_back"]["cell_attribute_names"] & TypedSchema; + readonly allowed_objects: (typeof json)["opengeodeweb_back"]["allowed_objects"] & TypedSchema; + readonly allowed_files: (typeof json)["opengeodeweb_back"]["allowed_files"] & TypedSchema; }; } diff --git a/requirements.txt b/requirements.txt index e8f95e30..c3f50fcd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -66,4 +66,3 @@ werkzeug==3.1.8 # flask # flask-cors -opengeodeweb-microservice==1.*,>=1.3.1 diff --git a/src/opengeodeweb_back/routes/blueprint_routes.py b/src/opengeodeweb_back/routes/blueprint_routes.py index a70e6bdb..5a979314 100644 --- a/src/opengeodeweb_back/routes/blueprint_routes.py +++ b/src/opengeodeweb_back/routes/blueprint_routes.py @@ -324,8 +324,7 @@ def _common_time_steps( ] for attribute_manager in attribute_managers[1:]: other_times = [ - time_step.time - for time_step in attribute_manager.time_steps(attribute_name) + time_step.time for time_step in attribute_manager.time_steps(attribute_name) ] if other_times != times: return None From 6a229fa93334cf973a83fb22924c79af2c349375 Mon Sep 17 00:00:00 2001 From: MaxNumerique <144453705+MaxNumerique@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:51:38 +0000 Subject: [PATCH 3/3] Apply prepare changes --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4be9286b..419f6e74 100644 --- a/requirements.txt +++ b/requirements.txt @@ -70,4 +70,3 @@ werkzeug==3.1.8 # flask # flask-cors -opengeodeweb-microservice==1.*,>=1.3.2rc1