Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions opengeodeweb_back_schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@
"title": "MeshComponent",
"type": "object",
"properties": {
"viewer_id": {
"title": "ViewerId",
"block_id": {
"title": "BlockId",
"type": "integer"
},
"geode_id": {
Expand Down Expand Up @@ -477,7 +477,7 @@
}
},
"required": [
"viewer_id",
"block_id",
"geode_id",
"name",
"type",
Expand Down Expand Up @@ -689,8 +689,8 @@
"title": "MeshComponent",
"type": "object",
"properties": {
"viewer_id": {
"title": "ViewerId",
"block_id": {
"title": "BlockId",
"type": "integer"
},
"geode_id": {
Expand Down Expand Up @@ -728,7 +728,7 @@
}
},
"required": [
"viewer_id",
"block_id",
"geode_id",
"name",
"type",
Expand Down Expand Up @@ -931,8 +931,8 @@
"title": "MeshComponent",
"type": "object",
"properties": {
"viewer_id": {
"title": "ViewerId",
"block_id": {
"title": "BlockId",
"type": "integer"
},
"geode_id": {
Expand Down Expand Up @@ -970,7 +970,7 @@
}
},
"required": [
"viewer_id",
"block_id",
"geode_id",
"name",
"type",
Expand Down Expand Up @@ -1195,8 +1195,8 @@
"title": "MeshComponent",
"type": "object",
"properties": {
"viewer_id": {
"title": "ViewerId",
"block_id": {
"title": "BlockId",
"type": "integer"
},
"geode_id": {
Expand Down Expand Up @@ -1234,7 +1234,7 @@
}
},
"required": [
"viewer_id",
"block_id",
"geode_id",
"name",
"type",
Expand Down Expand Up @@ -2330,8 +2330,8 @@
"title": "MeshComponent",
"type": "object",
"properties": {
"viewer_id": {
"title": "ViewerId",
"block_id": {
"title": "BlockId",
"type": "integer"
},
"geode_id": {
Expand Down Expand Up @@ -2369,7 +2369,7 @@
}
},
"required": [
"viewer_id",
"block_id",
"geode_id",
"name",
"type",
Expand Down
2 changes: 1 addition & 1 deletion opengeodeweb_back_typed_schemas.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type json from "./opengeodeweb_back_schemas.json";

import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types";
import type { AttributeInfo, AttributeName, CRS, CollectionComponent, Filename, MeshComponent, Point3D, ViewerId } from "@geode/opengeodeweb-back/schema_types";
import type { AttributeInfo, AttributeName, BlockId, CRS, CollectionComponent, Filename, MeshComponent, Point3D } from "@geode/opengeodeweb-back/schema_types";
import type { GeodeObjectType, ViewerObjectType } from "@geode/opengeodeweb-microservice/data_types";

export interface BasemapDeleteParams {
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,3 @@ werkzeug==3.1.8
# flask
# flask-cors

opengeodeweb-microservice==1.*,>=1.5.1
2 changes: 1 addition & 1 deletion src/opengeodeweb_back/routes/create/schemas/edged_curve.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from opengeodeweb_microservice.schema_types import DataId, GeodeId
from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId
from opengeodeweb_back.schema_types import BlockId, CRS, CollectionComponent, MeshComponent, Point3D
from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType
from pathlib import Path
from opengeodeweb_microservice.schemas import Route, load_schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from opengeodeweb_microservice.schema_types import DataId, GeodeId
from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, ViewerId
from opengeodeweb_back.schema_types import BlockId, CRS, CollectionComponent, MeshComponent
from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType
from pathlib import Path
from opengeodeweb_microservice.schemas import Route, load_schema
Expand Down
2 changes: 1 addition & 1 deletion src/opengeodeweb_back/routes/create/schemas/point_set.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from opengeodeweb_microservice.schema_types import DataId, GeodeId
from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId
from opengeodeweb_back.schema_types import BlockId, CRS, CollectionComponent, MeshComponent, Point3D
from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType
from pathlib import Path
from opengeodeweb_microservice.schemas import Route, load_schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from opengeodeweb_microservice.schema_types import DataId, GeodeId
from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId
from opengeodeweb_back.schema_types import BlockId, CRS, CollectionComponent, MeshComponent, Point3D
from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType
from pathlib import Path
from opengeodeweb_microservice.schemas import Route, load_schema
Expand Down
2 changes: 1 addition & 1 deletion src/opengeodeweb_back/routes/schemas/save_viewable_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from opengeodeweb_back.schema_types import CRS, CollectionComponent, Filename, MeshComponent, ViewerId
from opengeodeweb_back.schema_types import BlockId, CRS, CollectionComponent, Filename, MeshComponent
from opengeodeweb_microservice.schema_types import DataId, GeodeId
from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType
from pathlib import Path
Expand Down
12 changes: 6 additions & 6 deletions src/opengeodeweb_back/schema_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"type": "string",
"minLength": 1
},
"BlockId": {
"type": "integer"
},
"CRS": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -216,8 +219,8 @@
"MeshComponent": {
"type": "object",
"properties": {
"viewer_id": {
"title": "ViewerId",
"block_id": {
"title": "BlockId",
"type": "integer"
},
"geode_id": {
Expand Down Expand Up @@ -255,7 +258,7 @@
}
},
"required": [
"viewer_id",
"block_id",
"geode_id",
"name",
"type",
Expand Down Expand Up @@ -295,9 +298,6 @@
"default"
]
},
"ViewerId": {
"type": "integer"
},
"ViewerObjectType": {
"type": "string",
"enum": [
Expand Down
4 changes: 2 additions & 2 deletions src/opengeodeweb_back/schema_types.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by generate_schema_types.js from schema_types.json: do not edit

export type ViewerId = number;
export type BlockId = number;
export type AttributeName = string;
export type Filename = string;

Expand All @@ -26,13 +26,13 @@ export interface CRS {
}

export interface MeshComponent {
block_id: BlockId;
boundaries: GeodeId[];
geode_id: GeodeId;
internals: GeodeId[];
is_active: boolean;
name: string;
type: string;
viewer_id: ViewerId;
}

export interface CollectionComponent {
Expand Down
8 changes: 4 additions & 4 deletions src/opengeodeweb_back/schema_types.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ViewerId": {
"BlockId": {
"type": "integer"
},
"AttributeName": {
Expand Down Expand Up @@ -83,8 +83,8 @@
"MeshComponent": {
"type": "object",
"properties": {
"viewer_id": {
"title": "ViewerId"
"block_id": {
"title": "BlockId"
},
"geode_id": {
"title": "GeodeId"
Expand Down Expand Up @@ -112,7 +112,7 @@
}
},
"required": [
"viewer_id",
"block_id",
"geode_id",
"name",
"type",
Expand Down
6 changes: 3 additions & 3 deletions src/opengeodeweb_back/schema_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from opengeodeweb_microservice.schema_types import GeodeId
from opengeodeweb_microservice.schemas import print_dataclass

ViewerId = int
BlockId = int
AttributeName = str
Filename = str

Expand Down Expand Up @@ -49,13 +49,13 @@ class MeshComponent(DataClassJsonMixin):
def __post_init__(self) -> None:
print_dataclass(self)

block_id: BlockId
boundaries: list[GeodeId]
geode_id: GeodeId
internals: list[GeodeId]
is_active: bool
name: str
type: str
viewer_id: ViewerId


@dataclass
Expand All @@ -74,9 +74,9 @@ def __post_init__(self) -> None:
"CRS",
"AttributeInfo",
"AttributeName",
"BlockId",
"CollectionComponent",
"Filename",
"MeshComponent",
"Point3D",
"ViewerId",
]
4 changes: 2 additions & 2 deletions src/opengeodeweb_back/utils_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ def _mesh_components(model: GeodeModel, uuid_to_flat_index: dict[str, int]) -> l
component_name = component.name()
if not component_name:
component_name = geode_id
viewer_id = uuid_to_flat_index[geode_id]
block_id = uuid_to_flat_index[geode_id]
boundaries = model.boundaries(component_id)
boundaries_uuid = [boundary.id.string() for boundary in boundaries]
internals = model.internals(component_id)
internals_uuid = [internal.id.string() for internal in internals]
mesh_component_object = {
"viewer_id": viewer_id,
"block_id": block_id,
"geode_id": geode_id,
"name": component_name,
"type": component_type,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def test_model_components(client: FlaskClient) -> None:
for mesh_component in mesh_components:
assert isinstance(mesh_component, dict)
assert isinstance(mesh_component["geode_id"], str)
assert isinstance(mesh_component["viewer_id"], int)
assert isinstance(mesh_component["block_id"], int)
assert isinstance(mesh_component["name"], str)
assert isinstance(mesh_component["type"], str)
assert isinstance(mesh_component["boundaries"], list)
Expand Down
Loading