OpenGeodeWeb-Back 5.10.0rc22__py3-none-any.whl → 5.14.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opengeodeweb_back/app.py +173 -0
- opengeodeweb_back/app_config.py +1 -10
- opengeodeweb_back/geode_functions.py +44 -283
- opengeodeweb_back/geode_objects/__init__.py +61 -0
- opengeodeweb_back/geode_objects/geode_brep.py +102 -0
- opengeodeweb_back/geode_objects/geode_cross_section.py +75 -0
- opengeodeweb_back/geode_objects/geode_edged_curve2d.py +107 -0
- opengeodeweb_back/geode_objects/geode_edged_curve3d.py +107 -0
- opengeodeweb_back/geode_objects/geode_graph.py +76 -0
- opengeodeweb_back/geode_objects/geode_grid2d.py +30 -0
- opengeodeweb_back/geode_objects/geode_grid3d.py +30 -0
- opengeodeweb_back/geode_objects/geode_hybrid_solid3d.py +71 -0
- opengeodeweb_back/geode_objects/geode_implicit_cross_section.py +81 -0
- opengeodeweb_back/geode_objects/geode_implicit_structural_model.py +85 -0
- opengeodeweb_back/geode_objects/geode_light_regular_grid2d.py +72 -0
- opengeodeweb_back/geode_objects/geode_light_regular_grid3d.py +72 -0
- opengeodeweb_back/geode_objects/geode_mesh.py +19 -0
- opengeodeweb_back/geode_objects/geode_model.py +22 -0
- opengeodeweb_back/geode_objects/geode_object.py +78 -0
- opengeodeweb_back/geode_objects/geode_point_set2d.py +105 -0
- opengeodeweb_back/geode_objects/geode_point_set3d.py +105 -0
- opengeodeweb_back/geode_objects/geode_polygonal_surface2d.py +73 -0
- opengeodeweb_back/geode_objects/geode_polygonal_surface3d.py +73 -0
- opengeodeweb_back/geode_objects/geode_polyhedral_solid3d.py +73 -0
- opengeodeweb_back/geode_objects/geode_raster_image2d.py +83 -0
- opengeodeweb_back/geode_objects/geode_raster_image3d.py +83 -0
- opengeodeweb_back/geode_objects/geode_regular_grid2d.py +78 -0
- opengeodeweb_back/geode_objects/geode_regular_grid3d.py +78 -0
- opengeodeweb_back/geode_objects/geode_section.py +106 -0
- opengeodeweb_back/geode_objects/geode_solid_mesh3d.py +61 -0
- opengeodeweb_back/geode_objects/geode_structural_model.py +78 -0
- opengeodeweb_back/geode_objects/geode_surface_mesh2d.py +66 -0
- opengeodeweb_back/geode_objects/geode_surface_mesh3d.py +66 -0
- opengeodeweb_back/geode_objects/geode_tetrahedral_solid3d.py +73 -0
- opengeodeweb_back/geode_objects/geode_triangulated_surface2d.py +77 -0
- opengeodeweb_back/geode_objects/geode_triangulated_surface3d.py +77 -0
- opengeodeweb_back/geode_objects/geode_vertex_set.py +81 -0
- opengeodeweb_back/geode_objects/types.py +75 -0
- opengeodeweb_back/routes/blueprint_routes.py +352 -231
- opengeodeweb_back/routes/create/blueprint_create.py +121 -0
- opengeodeweb_back/routes/create/schemas/__init__.py +3 -0
- opengeodeweb_back/routes/create/schemas/create_aoi.json +45 -0
- opengeodeweb_back/routes/create/schemas/create_aoi.py +25 -0
- opengeodeweb_back/routes/create/schemas/create_point.json +29 -0
- opengeodeweb_back/routes/create/schemas/create_point.py +13 -0
- opengeodeweb_back/routes/create/schemas/create_voi.json +36 -0
- opengeodeweb_back/routes/create/schemas/create_voi.py +24 -0
- opengeodeweb_back/routes/models/blueprint_models.py +27 -27
- opengeodeweb_back/routes/models/schemas/__init__.py +2 -0
- opengeodeweb_back/routes/models/schemas/mesh_components.py +10 -0
- opengeodeweb_back/routes/models/schemas/vtm_component_indices.py +10 -0
- opengeodeweb_back/routes/schemas/__init__.py +17 -0
- opengeodeweb_back/routes/schemas/allowed_files.json +6 -8
- opengeodeweb_back/routes/schemas/allowed_files.py +10 -0
- opengeodeweb_back/routes/schemas/allowed_objects.json +1 -8
- opengeodeweb_back/routes/schemas/allowed_objects.py +10 -0
- opengeodeweb_back/routes/schemas/cell_attribute_names.json +13 -0
- opengeodeweb_back/routes/schemas/cell_attribute_names.py +10 -0
- opengeodeweb_back/routes/schemas/export_project.json +21 -0
- opengeodeweb_back/routes/schemas/export_project.py +12 -0
- opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json +2 -2
- opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py +11 -0
- opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json +2 -2
- opengeodeweb_back/routes/schemas/geographic_coordinate_systems.py +10 -0
- opengeodeweb_back/routes/schemas/import_project.json +10 -0
- opengeodeweb_back/routes/schemas/import_project.py +10 -0
- opengeodeweb_back/routes/schemas/inspect_file.json +2 -2
- opengeodeweb_back/routes/schemas/inspect_file.py +11 -0
- opengeodeweb_back/routes/schemas/kill.json +10 -0
- opengeodeweb_back/routes/schemas/kill.py +10 -0
- opengeodeweb_back/routes/schemas/missing_files.json +2 -2
- opengeodeweb_back/routes/schemas/missing_files.py +11 -0
- opengeodeweb_back/routes/schemas/ping.py +10 -0
- opengeodeweb_back/routes/schemas/polygon_attribute_names.py +10 -0
- opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py +10 -0
- opengeodeweb_back/routes/schemas/save_viewable_file.json +2 -2
- opengeodeweb_back/routes/schemas/save_viewable_file.py +11 -0
- opengeodeweb_back/routes/schemas/texture_coordinates.py +10 -0
- opengeodeweb_back/routes/schemas/upload_file.py +11 -0
- opengeodeweb_back/routes/schemas/vertex_attribute_names.py +10 -0
- opengeodeweb_back/test_utils.py +9 -3
- opengeodeweb_back/utils_functions.py +93 -88
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/METADATA +17 -22
- opengeodeweb_back-5.14.1.dist-info/RECORD +98 -0
- opengeodeweb_back-5.14.1.dist-info/entry_points.txt +2 -0
- opengeodeweb_back/geode_objects.py +0 -570
- opengeodeweb_back/routes/schemas/create_point.json +0 -29
- opengeodeweb_back-5.10.0rc22.dist-info/RECORD +0 -30
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/WHEEL +0 -0
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/licenses/LICENSE +0 -0
- {opengeodeweb_back-5.10.0rc22.dist-info → opengeodeweb_back-5.14.1.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
],
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
-
"
|
|
8
|
+
"geode_object_type": {
|
|
9
9
|
"type": "string",
|
|
10
10
|
"minLength": 1
|
|
11
11
|
},
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"required": [
|
|
18
|
-
"
|
|
18
|
+
"geode_object_type",
|
|
19
19
|
"filename"
|
|
20
20
|
],
|
|
21
21
|
"additionalProperties": false
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
],
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
-
"
|
|
8
|
+
"geode_object_type": {
|
|
9
9
|
"type": "string",
|
|
10
10
|
"minLength": 1
|
|
11
11
|
},
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"required": [
|
|
18
|
-
"
|
|
18
|
+
"geode_object_type",
|
|
19
19
|
"filename"
|
|
20
20
|
],
|
|
21
21
|
"additionalProperties": false
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from dataclasses_json import DataClassJsonMixin
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@dataclass
|
|
7
|
+
class UploadFile(DataClassJsonMixin):
|
|
8
|
+
def __post_init__(self) -> None:
|
|
9
|
+
print(self, flush=True)
|
|
10
|
+
|
|
11
|
+
filename: Optional[str] = None
|
opengeodeweb_back/test_utils.py
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
# Standard library imports
|
|
2
|
+
from typing import Callable, Any
|
|
2
3
|
|
|
3
4
|
# Third party imports
|
|
5
|
+
from flask.testing import FlaskClient
|
|
4
6
|
|
|
5
7
|
# Local application imports
|
|
6
8
|
|
|
9
|
+
JsonData = dict[str, Any]
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
|
|
12
|
+
def test_route_wrong_params(
|
|
13
|
+
client: FlaskClient, route: str, get_full_data: Callable[[], JsonData]
|
|
14
|
+
) -> None:
|
|
9
15
|
for key, value in get_full_data().items():
|
|
10
16
|
json = get_full_data()
|
|
11
17
|
json.pop(key)
|
|
12
18
|
response = client.post(route, json=json)
|
|
13
19
|
assert response.status_code == 400
|
|
14
|
-
error_description = response.
|
|
20
|
+
error_description = response.get_json()["description"]
|
|
15
21
|
assert "data must contain" in error_description
|
|
16
22
|
assert f"'{key}'" in error_description
|
|
17
23
|
|
|
@@ -19,6 +25,6 @@ def test_route_wrong_params(client, route, get_full_data):
|
|
|
19
25
|
json["dumb_key"] = "dumb_value"
|
|
20
26
|
response = client.post(route, json=json)
|
|
21
27
|
assert response.status_code == 400
|
|
22
|
-
error_description = response.
|
|
28
|
+
error_description = response.get_json()["description"]
|
|
23
29
|
assert "data must not contain" in error_description
|
|
24
30
|
assert "'dumb_key'" in error_description
|
|
@@ -4,8 +4,9 @@ import threading
|
|
|
4
4
|
import time
|
|
5
5
|
import zipfile
|
|
6
6
|
from collections.abc import Callable
|
|
7
|
-
from typing import Any
|
|
8
7
|
from concurrent.futures import ThreadPoolExecutor
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
9
10
|
|
|
10
11
|
# Third party imports
|
|
11
12
|
import flask
|
|
@@ -14,11 +15,15 @@ import importlib.metadata as metadata
|
|
|
14
15
|
import shutil
|
|
15
16
|
from werkzeug.exceptions import HTTPException
|
|
16
17
|
import werkzeug
|
|
18
|
+
from opengeodeweb_microservice.schemas import SchemaDict
|
|
19
|
+
from opengeodeweb_microservice.database.data import Data
|
|
20
|
+
from opengeodeweb_microservice.database.connection import get_session
|
|
17
21
|
|
|
18
22
|
# Local application imports
|
|
19
23
|
from . import geode_functions
|
|
20
|
-
from
|
|
21
|
-
from
|
|
24
|
+
from .geode_objects import geode_objects
|
|
25
|
+
from .geode_objects.types import GeodeObjectType
|
|
26
|
+
from .geode_objects.geode_object import GeodeObject
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
def increment_request_counter(current_app: flask.Flask) -> None:
|
|
@@ -41,13 +46,28 @@ def update_last_request_time(current_app: flask.Flask) -> None:
|
|
|
41
46
|
current_app.config.update(LAST_REQUEST_TIME=LAST_REQUEST_TIME)
|
|
42
47
|
|
|
43
48
|
|
|
49
|
+
def terminate_session(exception: BaseException | None) -> None:
|
|
50
|
+
session = flask.g.pop("session", None)
|
|
51
|
+
if session is None:
|
|
52
|
+
return
|
|
53
|
+
if exception is None:
|
|
54
|
+
session.commit()
|
|
55
|
+
else:
|
|
56
|
+
session.rollback()
|
|
57
|
+
session.close()
|
|
58
|
+
|
|
59
|
+
|
|
44
60
|
def before_request(current_app: flask.Flask) -> None:
|
|
45
61
|
increment_request_counter(current_app)
|
|
62
|
+
flask.g.session = get_session()
|
|
46
63
|
|
|
47
64
|
|
|
48
|
-
def teardown_request(
|
|
65
|
+
def teardown_request(
|
|
66
|
+
current_app: flask.Flask, exception: BaseException | None = None
|
|
67
|
+
) -> None:
|
|
49
68
|
decrement_request_counter(current_app)
|
|
50
69
|
update_last_request_time(current_app)
|
|
70
|
+
terminate_session(exception)
|
|
51
71
|
|
|
52
72
|
|
|
53
73
|
def kill_task(current_app: flask.Flask) -> None:
|
|
@@ -83,22 +103,23 @@ def versions(list_packages: list[str]) -> list[dict[str, str]]:
|
|
|
83
103
|
return list_with_versions
|
|
84
104
|
|
|
85
105
|
|
|
86
|
-
def validate_request(request: flask.Request, schema: dict[str,
|
|
106
|
+
def validate_request(request: flask.Request, schema: SchemaDict) -> dict[str, Any]:
|
|
87
107
|
json_data = request.get_json(force=True, silent=True)
|
|
88
108
|
|
|
89
109
|
if json_data is None:
|
|
90
110
|
json_data = {}
|
|
91
|
-
|
|
92
111
|
try:
|
|
93
112
|
validate = fastjsonschema.compile(schema)
|
|
94
113
|
validate(json_data)
|
|
95
114
|
except fastjsonschema.JsonSchemaException as e:
|
|
96
115
|
error_msg = str(e)
|
|
116
|
+
print("Validation failed:", error_msg, flush=True)
|
|
97
117
|
flask.abort(400, error_msg)
|
|
118
|
+
return json_data
|
|
98
119
|
|
|
99
120
|
|
|
100
121
|
def set_interval(
|
|
101
|
-
function: Callable[[
|
|
122
|
+
function: Callable[[flask.Flask], None], seconds: float, args: flask.Flask
|
|
102
123
|
) -> threading.Timer:
|
|
103
124
|
def function_wrapper() -> None:
|
|
104
125
|
set_interval(function, seconds, args)
|
|
@@ -115,14 +136,16 @@ def extension_from_filename(filename: str) -> str:
|
|
|
115
136
|
|
|
116
137
|
|
|
117
138
|
def send_file(
|
|
118
|
-
upload_folder: str, saved_files: str, new_file_name: str
|
|
139
|
+
upload_folder: str, saved_files: list[str], new_file_name: str
|
|
119
140
|
) -> flask.Response:
|
|
120
141
|
if len(saved_files) == 1:
|
|
121
142
|
mimetype = "application/octet-binary"
|
|
122
143
|
else:
|
|
123
144
|
mimetype = "application/zip"
|
|
124
145
|
new_file_name = os.path.splitext(new_file_name)[0] + ".zip"
|
|
125
|
-
with zipfile.ZipFile(
|
|
146
|
+
with zipfile.ZipFile(
|
|
147
|
+
os.path.join(os.path.abspath(upload_folder), new_file_name), "w"
|
|
148
|
+
) as zipObj:
|
|
126
149
|
for saved_file_path in saved_files:
|
|
127
150
|
zipObj.write(
|
|
128
151
|
saved_file_path,
|
|
@@ -130,7 +153,7 @@ def send_file(
|
|
|
130
153
|
)
|
|
131
154
|
|
|
132
155
|
response = flask.send_from_directory(
|
|
133
|
-
directory=upload_folder,
|
|
156
|
+
directory=os.path.abspath(upload_folder),
|
|
134
157
|
path=new_file_name,
|
|
135
158
|
as_attachment=True,
|
|
136
159
|
mimetype=mimetype,
|
|
@@ -142,15 +165,16 @@ def send_file(
|
|
|
142
165
|
|
|
143
166
|
|
|
144
167
|
def handle_exception(exception: HTTPException) -> flask.Response:
|
|
145
|
-
|
|
146
|
-
response
|
|
168
|
+
print("\033[91mError:\033[0m \033[91m" + str(exception) + "\033[0m", flush=True)
|
|
169
|
+
response = flask.jsonify(
|
|
147
170
|
{
|
|
148
171
|
"code": exception.code,
|
|
149
172
|
"name": exception.name,
|
|
150
|
-
"description": exception.description,
|
|
173
|
+
"description": exception.description or "An error occurred",
|
|
151
174
|
}
|
|
152
175
|
)
|
|
153
176
|
response.content_type = "application/json"
|
|
177
|
+
response.status_code = exception.code or 500
|
|
154
178
|
return response
|
|
155
179
|
|
|
156
180
|
|
|
@@ -162,88 +186,79 @@ def create_data_folder_from_id(data_id: str) -> str:
|
|
|
162
186
|
|
|
163
187
|
|
|
164
188
|
def save_all_viewables_and_return_info(
|
|
165
|
-
geode_object:
|
|
166
|
-
data:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
) -> dict[str, Any]:
|
|
170
|
-
if additional_files is None:
|
|
171
|
-
additional_files = []
|
|
172
|
-
|
|
173
|
-
data_entry = Data.create(
|
|
174
|
-
geode_object=geode_object,
|
|
175
|
-
input_file=input_file,
|
|
176
|
-
additional_files=additional_files,
|
|
177
|
-
)
|
|
178
|
-
data_path = create_data_folder_from_id(data_entry.id)
|
|
189
|
+
geode_object: GeodeObject,
|
|
190
|
+
data: Data,
|
|
191
|
+
data_path: str,
|
|
192
|
+
) -> dict[str, str | list[str]]:
|
|
179
193
|
with ThreadPoolExecutor() as executor:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
194
|
+
(native_files, viewable_path, light_path) = executor.map(
|
|
195
|
+
lambda args: args[0](args[1]),
|
|
196
|
+
[
|
|
197
|
+
(
|
|
198
|
+
geode_object.save,
|
|
199
|
+
os.path.join(
|
|
200
|
+
data_path, "native." + geode_object.native_extension()
|
|
201
|
+
),
|
|
202
|
+
),
|
|
203
|
+
(geode_object.save_viewable, os.path.join(data_path, "viewable")),
|
|
204
|
+
(
|
|
205
|
+
geode_object.save_light_viewable,
|
|
206
|
+
os.path.join(data_path, "light_viewable"),
|
|
207
|
+
),
|
|
208
|
+
],
|
|
186
209
|
)
|
|
187
|
-
|
|
188
|
-
geode_functions.save_viewable, geode_object, data, data_path, "viewable"
|
|
189
|
-
)
|
|
190
|
-
light_viewable_future = executor.submit(
|
|
191
|
-
geode_functions.save_light_viewable,
|
|
192
|
-
geode_object,
|
|
193
|
-
data,
|
|
194
|
-
data_path,
|
|
195
|
-
"light_viewable",
|
|
196
|
-
)
|
|
197
|
-
saved_light_viewable_file_path = light_viewable_future.result()
|
|
198
|
-
with open(saved_light_viewable_file_path, "rb") as f:
|
|
210
|
+
with open(light_path, "rb") as f:
|
|
199
211
|
binary_light_viewable = f.read()
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
session = get_session()
|
|
207
|
-
if session:
|
|
208
|
-
session.commit()
|
|
209
|
-
|
|
212
|
+
data.native_file = os.path.basename(native_files[0])
|
|
213
|
+
data.viewable_file = os.path.basename(viewable_path)
|
|
214
|
+
data.light_viewable_file = os.path.basename(light_path)
|
|
215
|
+
assert data.native_file is not None
|
|
216
|
+
assert data.viewable_file is not None
|
|
217
|
+
assert data.light_viewable_file is not None
|
|
210
218
|
return {
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"id":
|
|
214
|
-
"
|
|
219
|
+
"native_file": data.native_file,
|
|
220
|
+
"viewable_file": data.viewable_file,
|
|
221
|
+
"id": data.id,
|
|
222
|
+
"name": geode_object.identifier.name(),
|
|
223
|
+
"viewer_type": data.viewer_object,
|
|
215
224
|
"binary_light_viewable": binary_light_viewable.decode("utf-8"),
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
"additional_files":
|
|
225
|
+
"geode_object_type": data.geode_object,
|
|
226
|
+
"input_file": data.input_file or "",
|
|
227
|
+
"additional_files": data.additional_files or [],
|
|
219
228
|
}
|
|
220
229
|
|
|
221
230
|
|
|
222
231
|
def generate_native_viewable_and_light_viewable_from_object(
|
|
223
|
-
geode_object:
|
|
224
|
-
) -> dict[str,
|
|
225
|
-
|
|
232
|
+
geode_object: GeodeObject,
|
|
233
|
+
) -> dict[str, str | list[str]]:
|
|
234
|
+
data = Data.create(
|
|
235
|
+
geode_object=geode_object.geode_object_type(),
|
|
236
|
+
viewer_object=geode_object.viewer_type(),
|
|
237
|
+
)
|
|
238
|
+
data_path = create_data_folder_from_id(data.id)
|
|
239
|
+
return save_all_viewables_and_return_info(geode_object, data, data_path)
|
|
226
240
|
|
|
227
241
|
|
|
228
242
|
def generate_native_viewable_and_light_viewable_from_file(
|
|
229
|
-
|
|
230
|
-
) -> dict[str,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
243
|
+
geode_object_type: GeodeObjectType, input_file: str
|
|
244
|
+
) -> dict[str, str | list[str]]:
|
|
245
|
+
generic_geode_object = geode_objects[geode_object_type]
|
|
246
|
+
data = Data.create(
|
|
247
|
+
geode_object=geode_object_type,
|
|
248
|
+
viewer_object=generic_geode_object.viewer_type(),
|
|
249
|
+
input_file=input_file,
|
|
235
250
|
)
|
|
236
251
|
|
|
237
|
-
data_path = create_data_folder_from_id(
|
|
252
|
+
data_path = create_data_folder_from_id(data.id)
|
|
238
253
|
|
|
239
|
-
full_input_filename = geode_functions.upload_file_path(
|
|
254
|
+
full_input_filename = geode_functions.upload_file_path(input_file)
|
|
240
255
|
copied_full_path = os.path.join(
|
|
241
|
-
data_path, werkzeug.utils.secure_filename(
|
|
256
|
+
data_path, werkzeug.utils.secure_filename(input_file)
|
|
242
257
|
)
|
|
243
258
|
shutil.copy2(full_input_filename, copied_full_path)
|
|
244
259
|
|
|
245
260
|
additional_files_copied: list[str] = []
|
|
246
|
-
additional =
|
|
261
|
+
additional = generic_geode_object.additional_files(full_input_filename)
|
|
247
262
|
for additional_file in additional.mandatory_files + additional.optional_files:
|
|
248
263
|
if additional_file.is_missing:
|
|
249
264
|
continue
|
|
@@ -257,20 +272,10 @@ def generate_native_viewable_and_light_viewable_from_file(
|
|
|
257
272
|
shutil.copy2(source_path, dest_path)
|
|
258
273
|
additional_files_copied.append(additional_file.filename)
|
|
259
274
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
# Remplacer :
|
|
263
|
-
# database.session.delete(temp_data_entry)
|
|
264
|
-
# database.session.flush()
|
|
265
|
-
# Par :
|
|
266
|
-
session = get_session()
|
|
267
|
-
if session:
|
|
268
|
-
session.delete(temp_data_entry)
|
|
269
|
-
session.flush()
|
|
270
|
-
|
|
275
|
+
geode_object = generic_geode_object.load(copied_full_path)
|
|
276
|
+
data.additional_files = additional_files_copied
|
|
271
277
|
return save_all_viewables_and_return_info(
|
|
272
278
|
geode_object,
|
|
273
279
|
data,
|
|
274
|
-
|
|
275
|
-
additional_files=additional_files_copied,
|
|
280
|
+
data_path,
|
|
276
281
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OpenGeodeWeb-Back
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.14.1
|
|
4
4
|
Summary: OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
|
|
5
5
|
Author-email: Geode-solutions <team-web@geode-solutions.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
|
|
@@ -11,28 +11,23 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Requires-Python: <3.13,>=3.9
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: asgiref
|
|
15
|
-
Requires-Dist: blinker
|
|
16
|
-
Requires-Dist: click
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist: flask[async]==3.0.3
|
|
14
|
+
Requires-Dist: asgiref>=3
|
|
15
|
+
Requires-Dist: blinker>=1
|
|
16
|
+
Requires-Dist: click>=8
|
|
17
|
+
Requires-Dist: flask[async]>=3
|
|
19
18
|
Requires-Dist: flask-cors==6.0.1
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist: geode-
|
|
22
|
-
Requires-Dist:
|
|
23
|
-
Requires-Dist:
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist: opengeode-
|
|
28
|
-
Requires-Dist: opengeode-
|
|
29
|
-
Requires-Dist: opengeode-
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist: opengeodeweb-microservice==1.0.1rc4
|
|
33
|
-
Requires-Dist: sqlalchemy~=2.0
|
|
34
|
-
Requires-Dist: typing-extensions==4.15.0
|
|
35
|
-
Requires-Dist: werkzeug~=3.0
|
|
19
|
+
Requires-Dist: geode-common==33.11.3
|
|
20
|
+
Requires-Dist: geode-viewables==3.3.2
|
|
21
|
+
Requires-Dist: itsdangerous>=2
|
|
22
|
+
Requires-Dist: jinja2>=3
|
|
23
|
+
Requires-Dist: markupsafe>=3
|
|
24
|
+
Requires-Dist: opengeode-core==15.30.4
|
|
25
|
+
Requires-Dist: opengeode-geosciences==9.5.5
|
|
26
|
+
Requires-Dist: opengeode-geosciencesio==5.8.6
|
|
27
|
+
Requires-Dist: opengeode-inspector==6.8.6
|
|
28
|
+
Requires-Dist: opengeode-io==7.4.6
|
|
29
|
+
Requires-Dist: werkzeug==3.1.2
|
|
30
|
+
Requires-Dist: opengeodeweb-microservice==1.*,>=1.0.11
|
|
36
31
|
Dynamic: license-file
|
|
37
32
|
|
|
38
33
|
<h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
opengeodeweb_back/app.py,sha256=dKh_LIQPrak6Fb6FJvy5c0f--H9J4ELC95oFyhA8hWk,5430
|
|
3
|
+
opengeodeweb_back/app_config.py,sha256=z-omTiGj3-y0BZ1IchAM6EoTdC7vAX6B4OymEnuM0T4,843
|
|
4
|
+
opengeodeweb_back/geode_functions.py,sha256=8ThDrC-AnuSocQ_vlx5nipsHchl22iO3wZTXwgeBGGg,2710
|
|
5
|
+
opengeodeweb_back/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
|
|
6
|
+
opengeodeweb_back/test_utils.py,sha256=kFsEhWNaTKTSMMzvrfg7PqYC50AFnV1J2uL6iNyPix8,960
|
|
7
|
+
opengeodeweb_back/utils_functions.py,sha256=VIzWBfsqXMIULAOjpyiM8kI2ojPKIeubhveDWVCCqkk,9590
|
|
8
|
+
opengeodeweb_back/geode_objects/__init__.py,sha256=DDiMRx6fjss3RmJ_fyKwaG5M8Bc0Xc0f1ppPG8v3jPk,2713
|
|
9
|
+
opengeodeweb_back/geode_objects/geode_brep.py,sha256=_8UQ1Ay8p8VWH-m5KeLE9pg_-GSl6eKqKsWJ6c3FQ9M,3198
|
|
10
|
+
opengeodeweb_back/geode_objects/geode_cross_section.py,sha256=8xV4Wsq852Nm3jFIzo4AdGPO3OdxNy1JKonk5eSndbQ,2531
|
|
11
|
+
opengeodeweb_back/geode_objects/geode_edged_curve2d.py,sha256=MmO8YFvVKBMf0JduLcZN-WXFgF6mn-Lq-0-eKLfMWRM,3500
|
|
12
|
+
opengeodeweb_back/geode_objects/geode_edged_curve3d.py,sha256=OnLULXEF211ryytq8DWXgipwzNJ-pomg8QzdPU-FyeU,3499
|
|
13
|
+
opengeodeweb_back/geode_objects/geode_graph.py,sha256=uTCbLkha_La2wpjF9qzjOw4XEG5CizqXSmYMvJJ_dLk,2101
|
|
14
|
+
opengeodeweb_back/geode_objects/geode_grid2d.py,sha256=bQL6i_MB6ofOc-gBazVL7faU9csX_oaLqucOCN4u8HY,635
|
|
15
|
+
opengeodeweb_back/geode_objects/geode_grid3d.py,sha256=5Qx_EYJc41r2KLnFBYMQSokIp4nJE5A6jdp1NyAVKlY,634
|
|
16
|
+
opengeodeweb_back/geode_objects/geode_hybrid_solid3d.py,sha256=-xn3gONdCXN8LWPQgpV5OhewNfKzfhhtVidAQY8map4,2365
|
|
17
|
+
opengeodeweb_back/geode_objects/geode_implicit_cross_section.py,sha256=tvuRsNEQv81wGfxTvF_1PpNw5BszDI6IYbrEf9ZI-Rk,2881
|
|
18
|
+
opengeodeweb_back/geode_objects/geode_implicit_structural_model.py,sha256=4h9--CD49aVp5piq6m-im3z7IGX31KBpbsxXYEMjnhU,3057
|
|
19
|
+
opengeodeweb_back/geode_objects/geode_light_regular_grid2d.py,sha256=86PnOhRy8plNORPv5X6e4o2RmSyA0fH45ygz3dc3i4U,2545
|
|
20
|
+
opengeodeweb_back/geode_objects/geode_light_regular_grid3d.py,sha256=bmg1A9JCFsTeF-ftaU7fLTFqCpK3hwfCm6P6rURby48,2545
|
|
21
|
+
opengeodeweb_back/geode_objects/geode_mesh.py,sha256=mLe4w097qlngo7upcSkwnNbFBokKWnSx_Elx52wn1hI,452
|
|
22
|
+
opengeodeweb_back/geode_objects/geode_model.py,sha256=Ml9qXLlhpDWG_x34hYgxcYolWsAFl_ouJmnj1bD0WjQ,571
|
|
23
|
+
opengeodeweb_back/geode_objects/geode_object.py,sha256=7Mb3NjMSoNQ4NqPYRDZxygR8e0Bko-HSPYzsOcilabk,1886
|
|
24
|
+
opengeodeweb_back/geode_objects/geode_point_set2d.py,sha256=7SM8n198vEHlAok_dDhjFY_0Fv_NICDTIyZXbJAARgQ,3409
|
|
25
|
+
opengeodeweb_back/geode_objects/geode_point_set3d.py,sha256=2ZORpNZJzl_djazldUlLXHgLVnkORjsAm6NLzRq4DoU,3408
|
|
26
|
+
opengeodeweb_back/geode_objects/geode_polygonal_surface2d.py,sha256=NvlxVkWiV-LWwtA67I7VQ1UVsHtw_kHa7HvoKb5FQ1A,2550
|
|
27
|
+
opengeodeweb_back/geode_objects/geode_polygonal_surface3d.py,sha256=NnTDF449ep7VOWSBaP-zp57iBYQebfgK9Kc_v9niGIQ,2550
|
|
28
|
+
opengeodeweb_back/geode_objects/geode_polyhedral_solid3d.py,sha256=y7Uy6u0e_cuNhjja9jPkhCAEStGRzmHZtFXQKFsTo8Q,2513
|
|
29
|
+
opengeodeweb_back/geode_objects/geode_raster_image2d.py,sha256=rvmSD3i_fHz8RtG2NLBGrwogE1gUW6FZ1NXphYHr-Yk,2474
|
|
30
|
+
opengeodeweb_back/geode_objects/geode_raster_image3d.py,sha256=ocmOy7qgYsj8gEliUW9P3iF5ws36heEDY4urLnoYl-E,2473
|
|
31
|
+
opengeodeweb_back/geode_objects/geode_regular_grid2d.py,sha256=0Ro1ZtPsAvIqKBV4fEMLBpS6Jdt1ZJ7b9k9wMQqICeo,2639
|
|
32
|
+
opengeodeweb_back/geode_objects/geode_regular_grid3d.py,sha256=S_I9tm9G6EosJxQ6YvrfypDxJWOnB7Z9lyAXtCjNHok,2631
|
|
33
|
+
opengeodeweb_back/geode_objects/geode_section.py,sha256=BP-_Ydfyvt8utKEz6SwBo-0mylkV5HoPOegvWKL2IbI,3378
|
|
34
|
+
opengeodeweb_back/geode_objects/geode_solid_mesh3d.py,sha256=8PUBC7L22EKzebTx8XHIjOb3KJe9SOPP_h45s6AX4cc,1975
|
|
35
|
+
opengeodeweb_back/geode_objects/geode_structural_model.py,sha256=3W3RIHK7J5BGubQfCm2lp85qjS7Y7z1LmjVT2PYczzY,2680
|
|
36
|
+
opengeodeweb_back/geode_objects/geode_surface_mesh2d.py,sha256=f5Dnosjeua8NVnNipuLCjelKVqFYA8NfCHgTlXy_ZiA,2153
|
|
37
|
+
opengeodeweb_back/geode_objects/geode_surface_mesh3d.py,sha256=R0plNmUpDuAF8-aE-wBRSVz5R_g8rIUJPsgADl5pdNw,2152
|
|
38
|
+
opengeodeweb_back/geode_objects/geode_tetrahedral_solid3d.py,sha256=fUnHwVJukWcikUPMrNyaMW8V8oAjTlmN8HSqQsXmLZg,2544
|
|
39
|
+
opengeodeweb_back/geode_objects/geode_triangulated_surface2d.py,sha256=XkMqTyfU94LB7_mJEHTDr-jvJhegGf82w8xY7G5Etpg,2679
|
|
40
|
+
opengeodeweb_back/geode_objects/geode_triangulated_surface3d.py,sha256=USx61xlzyNRet3Z3XAosK2ZHJnALrsr_twJ1TKpuNdc,2679
|
|
41
|
+
opengeodeweb_back/geode_objects/geode_vertex_set.py,sha256=4oB-kwvp35dKDrLCCoHN1c7UI79GHBlmkFEfoOOUPvs,2367
|
|
42
|
+
opengeodeweb_back/geode_objects/types.py,sha256=agbK3nuwDIOwa-xFoYxWY43Upz_XyQFjLcZtWRcokTk,1708
|
|
43
|
+
opengeodeweb_back/routes/blueprint_routes.py,sha256=qC1OaanmS_H9Tnmdq4TfQ2uPhb3hYtnKMtPyAlSylv0,19118
|
|
44
|
+
opengeodeweb_back/routes/create/blueprint_create.py,sha256=eh4D8Dj_-Aps0ieewJ-f6XrEXO0aJbbxsKPLMr0G3zM,4229
|
|
45
|
+
opengeodeweb_back/routes/create/schemas/__init__.py,sha256=UyslqS2HwJX1hd2XGDB7jxJOP1i5HYWDP3bdoDGaTis,80
|
|
46
|
+
opengeodeweb_back/routes/create/schemas/create_aoi.json,sha256=cRrkyPiTaOV8rM8xQz99ieuhLktipvV5AisA2A7oqEU,972
|
|
47
|
+
opengeodeweb_back/routes/create/schemas/create_aoi.py,sha256=2AS00g7AjQqcebCl2-N6cLsOgYU0UnmGGqtHqDldf9c,485
|
|
48
|
+
opengeodeweb_back/routes/create/schemas/create_point.json,sha256=ddfDzWKj4cMYhF6oJzvRh0bpTiQo1hqLFODK-vJjxHQ,484
|
|
49
|
+
opengeodeweb_back/routes/create/schemas/create_point.py,sha256=FqDyZBzRAi_0Cv7r47bFfRz8wPRxspebYq4EisaM1-8,257
|
|
50
|
+
opengeodeweb_back/routes/create/schemas/create_voi.json,sha256=Y9zBXRXPsHWnkNY6PcpHQ8R4-qO_ywn6KXY-v_7Kpgk,810
|
|
51
|
+
opengeodeweb_back/routes/create/schemas/create_voi.py,sha256=_iu_vvNWRLnjiDUp_rKfvI2GjIdkoMaoPSXUc3m-S8c,501
|
|
52
|
+
opengeodeweb_back/routes/models/blueprint_models.py,sha256=ZKudPQWUJbRb7U71fzXwjbZ_e952hXc0Id11xLwuhH4,2122
|
|
53
|
+
opengeodeweb_back/routes/models/schemas/__init__.py,sha256=kNhYSdP7ti6BEalSO3fNfJJf_S7u0kEQDFRdBTDVNQY,68
|
|
54
|
+
opengeodeweb_back/routes/models/schemas/mesh_components.json,sha256=JmQUvpy7HpGS6FlThZLx1YjHqiInRTqUZ_Ft5MfOzEE,239
|
|
55
|
+
opengeodeweb_back/routes/models/schemas/mesh_components.py,sha256=SbuBkplhvdodqWU6FbiVEstnp0gCTokHv1nv4go34oo,219
|
|
56
|
+
opengeodeweb_back/routes/models/schemas/vtm_component_indices.json,sha256=0XILVxhAxi0RhQFDZZoUeGcAnBMroWz3kNJS7-6_dKQ,239
|
|
57
|
+
opengeodeweb_back/routes/models/schemas/vtm_component_indices.py,sha256=n4r3699N4aFWbCPlXQImxdQ7SyUjlQR001dbUwO6P50,224
|
|
58
|
+
opengeodeweb_back/routes/schemas/__init__.py,sha256=retWNAvQT3HgIaWyzn2JXUxk10lCC4x6ScDdXsKm214,564
|
|
59
|
+
opengeodeweb_back/routes/schemas/allowed_files.json,sha256=-CiTUZDGnwaBZB5Tfrx_YyDgqyh1qy34XuBtEz8cQiU,153
|
|
60
|
+
opengeodeweb_back/routes/schemas/allowed_files.py,sha256=ChVc0pZcoE5a-3a9stNg_4W7zLI8n6u8Yb_8Bja7I-U,214
|
|
61
|
+
opengeodeweb_back/routes/schemas/allowed_objects.json,sha256=MRoBem4GlZwxsFLUYzBgica7XeaB12KnKBFGHro1ZVA,245
|
|
62
|
+
opengeodeweb_back/routes/schemas/allowed_objects.py,sha256=QyH8VojA2s8ib3lDXsnXTEZOWFs4gf2KkLGS7A52XhU,225
|
|
63
|
+
opengeodeweb_back/routes/schemas/cell_attribute_names.json,sha256=GnxSjeMC42pBeWiSuP5E_jkTUIUqmkralrlje2cAefg,223
|
|
64
|
+
opengeodeweb_back/routes/schemas/cell_attribute_names.py,sha256=ntH71e691rgMZoTPoInBAFVZicerf5zSvO_FoRLK92A,223
|
|
65
|
+
opengeodeweb_back/routes/schemas/export_project.json,sha256=Du59q6UMidnHU3N_eCppMiOtpfG3zaSbaJvwektR19g,308
|
|
66
|
+
opengeodeweb_back/routes/schemas/export_project.py,sha256=Z1n5S9eq_TQ04c5eG3TcMwHKYdI__JqKoIyCPlD-xmE,282
|
|
67
|
+
opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json,sha256=1QOOg3tKt0LWPPpTScnjrsyCtW8_7SO4MhF4BsSii1U,369
|
|
68
|
+
opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py,sha256=9s592iSyCjYYDWKXi7jWOW9mGFu-9aelxCdAAo7ziqc,269
|
|
69
|
+
opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json,sha256=PsD4Tafvg9ZJPhqe7YgwnRuvEBEjouNKkcs9Gr5Z97E,277
|
|
70
|
+
opengeodeweb_back/routes/schemas/geographic_coordinate_systems.py,sha256=rj_LYcwSZlM3gMg3p9pI5Jz2_B4KJ1caqSDOc7iRiNQ,247
|
|
71
|
+
opengeodeweb_back/routes/schemas/import_project.json,sha256=c2hZYhfd8hjCvzME7ITiBGwSPX_O466JVcWak-DYbr8,154
|
|
72
|
+
opengeodeweb_back/routes/schemas/import_project.py,sha256=bjK9KdlkpC8kQFN6Ni8i9OIp9z8hE-mhPT0czTxyedo,215
|
|
73
|
+
opengeodeweb_back/routes/schemas/inspect_file.json,sha256=SQv9x-bmxh_6GZdLrOdIq2gKU9BZh6Gj5zi_6kEBOaQ,346
|
|
74
|
+
opengeodeweb_back/routes/schemas/inspect_file.py,sha256=awgjcsIpihL9Z2aJKQZoih9rSyHsIYUhyBmj44ftqXY,249
|
|
75
|
+
opengeodeweb_back/routes/schemas/kill.json,sha256=tZEv4TuTNNthet2MsxUPLV3ivW6tIGjYTfxd6Jl9zaM,144
|
|
76
|
+
opengeodeweb_back/routes/schemas/kill.py,sha256=DbQyF57NJ4BsOo7UbKzKwm5rERkphIAh28QVt2DJcA8,206
|
|
77
|
+
opengeodeweb_back/routes/schemas/missing_files.json,sha256=yUGS0T9ttlH5mJHZ10W1AdcExqESmnArzUDf8dfDwb0,347
|
|
78
|
+
opengeodeweb_back/routes/schemas/missing_files.py,sha256=04AgU9YZGQWVIvcGb_Ywka-yj8aMgPm-tznUVbAupBA,250
|
|
79
|
+
opengeodeweb_back/routes/schemas/ping.json,sha256=MhI5jtrjMsAsfIKEzdY8p1HyV9xv4O3hYfESWw6tkyE,162
|
|
80
|
+
opengeodeweb_back/routes/schemas/ping.py,sha256=_dAfbVQD_fJ-Sq4d1UEt4W0U6Sqv3WyWtgFpauUOtG4,206
|
|
81
|
+
opengeodeweb_back/routes/schemas/polygon_attribute_names.json,sha256=1BrpfjcbRL1ZOL4azHIHirqXIc8tpu4xGnMRFEMEshU,241
|
|
82
|
+
opengeodeweb_back/routes/schemas/polygon_attribute_names.py,sha256=Y_tCbn3Qt2uvm7T3cBbU0V0Xw0Qit0jvbsYP80fzTlU,226
|
|
83
|
+
opengeodeweb_back/routes/schemas/polyhedron_attribute_names.json,sha256=Tt6fWBGOWgxOVC-n76_JbOQcZ-Ss-foPghMrQOY-DIE,244
|
|
84
|
+
opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py,sha256=3JLVj5fwcR41YnHh4WHLy9PFWxGkb1X2Y2YJA9JYwH4,229
|
|
85
|
+
opengeodeweb_back/routes/schemas/save_viewable_file.json,sha256=5u-PRo_lZ3Dy7IB9Ed6HiBACvNa4zIVuXSRT6OJPR7Q,422
|
|
86
|
+
opengeodeweb_back/routes/schemas/save_viewable_file.py,sha256=orDXtY8360loyu_pcUOGLo0pH_5fq0aMio5q6wU8PCk,254
|
|
87
|
+
opengeodeweb_back/routes/schemas/texture_coordinates.json,sha256=2uQueIl1jOmxFG_gIi_vJETR4IurrwuSf8GAnzphk9g,237
|
|
88
|
+
opengeodeweb_back/routes/schemas/texture_coordinates.py,sha256=BdH2_DFyud_ic1NmxZpzoOrJUzwp1yJbCLVnoG8M-Js,223
|
|
89
|
+
opengeodeweb_back/routes/schemas/upload_file.json,sha256=LJ3U3L5ApKuQDVFIpVT_y2alq4HW_suTvZ3HUucNbhg,219
|
|
90
|
+
opengeodeweb_back/routes/schemas/upload_file.py,sha256=bnkk7qJNByXDeq_EiKCHfQaHUqDmzktLAL__ozyBr0A,266
|
|
91
|
+
opengeodeweb_back/routes/schemas/vertex_attribute_names.json,sha256=ECIflohiqPZNsflAdkfEzksL4we0JvZhIxUd84Ubctg,240
|
|
92
|
+
opengeodeweb_back/routes/schemas/vertex_attribute_names.py,sha256=tRFpdN-Nh4LbEpN0yM4H0DD1G_4ni0UAvpJ42qtSxwM,225
|
|
93
|
+
opengeodeweb_back-5.14.1.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
|
|
94
|
+
opengeodeweb_back-5.14.1.dist-info/METADATA,sha256=TPOPJWchIl0QHU8HOCmzbF8qd9TknPOcGR3VmIcqHIg,2663
|
|
95
|
+
opengeodeweb_back-5.14.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
96
|
+
opengeodeweb_back-5.14.1.dist-info/entry_points.txt,sha256=3W_t5GFc9ROHSIZ55IGvYU3DLHUFQmYOM4Bm9u3Z0cE,71
|
|
97
|
+
opengeodeweb_back-5.14.1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
|
|
98
|
+
opengeodeweb_back-5.14.1.dist-info/RECORD,,
|