OpenGeodeWeb-Back 5.10.0rc17__py3-none-any.whl → 5.10.0rc19__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.
Potentially problematic release.
This version of OpenGeodeWeb-Back might be problematic. Click here for more details.
- opengeodeweb_back/utils_functions.py +42 -32
- {opengeodeweb_back-5.10.0rc17.dist-info → opengeodeweb_back-5.10.0rc19.dist-info}/METADATA +2 -2
- {opengeodeweb_back-5.10.0rc17.dist-info → opengeodeweb_back-5.10.0rc19.dist-info}/RECORD +6 -6
- {opengeodeweb_back-5.10.0rc17.dist-info → opengeodeweb_back-5.10.0rc19.dist-info}/WHEEL +0 -0
- {opengeodeweb_back-5.10.0rc17.dist-info → opengeodeweb_back-5.10.0rc19.dist-info}/licenses/LICENSE +0 -0
- {opengeodeweb_back-5.10.0rc17.dist-info → opengeodeweb_back-5.10.0rc19.dist-info}/top_level.txt +0 -0
|
@@ -5,6 +5,7 @@ import time
|
|
|
5
5
|
import zipfile
|
|
6
6
|
from collections.abc import Callable
|
|
7
7
|
from typing import Any
|
|
8
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
8
9
|
|
|
9
10
|
# Third party imports
|
|
10
11
|
import flask
|
|
@@ -175,38 +176,47 @@ def save_all_viewables_and_return_info(
|
|
|
175
176
|
additional_files=additional_files,
|
|
176
177
|
)
|
|
177
178
|
data_path = create_data_folder_from_id(data_entry.id)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
179
|
+
with ThreadPoolExecutor() as executor:
|
|
180
|
+
native_future = executor.submit(
|
|
181
|
+
geode_functions.save,
|
|
182
|
+
geode_object,
|
|
183
|
+
data,
|
|
184
|
+
data_path,
|
|
185
|
+
"native." + data.native_extension(),
|
|
186
|
+
)
|
|
187
|
+
viewable_future = executor.submit(
|
|
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:
|
|
199
|
+
binary_light_viewable = f.read()
|
|
200
|
+
saved_native_file_path = native_future.result()
|
|
201
|
+
saved_viewable_file_path = viewable_future.result()
|
|
202
|
+
data_entry.native_file_name = os.path.basename(saved_native_file_path[0])
|
|
203
|
+
data_entry.viewable_file_name = os.path.basename(saved_viewable_file_path)
|
|
204
|
+
data_entry.light_viewable = os.path.basename(saved_light_viewable_file_path)
|
|
205
|
+
|
|
206
|
+
session = get_session()
|
|
207
|
+
if session:
|
|
208
|
+
session.commit()
|
|
209
|
+
|
|
210
|
+
return {
|
|
211
|
+
"native_file_name": data_entry.native_file_name,
|
|
212
|
+
"viewable_file_name": data_entry.viewable_file_name,
|
|
213
|
+
"id": data_entry.id,
|
|
214
|
+
"object_type": geode_functions.get_object_type(geode_object),
|
|
215
|
+
"binary_light_viewable": binary_light_viewable.decode("utf-8"),
|
|
216
|
+
"geode_object": data_entry.geode_object,
|
|
217
|
+
"input_files": data_entry.input_file,
|
|
218
|
+
"additional_files": data_entry.additional_files,
|
|
219
|
+
}
|
|
210
220
|
|
|
211
221
|
|
|
212
222
|
def generate_native_viewable_and_light_viewable_from_object(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OpenGeodeWeb-Back
|
|
3
|
-
Version: 5.10.
|
|
3
|
+
Version: 5.10.0rc19
|
|
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
|
|
@@ -15,7 +15,7 @@ Requires-Dist: asgiref==3.*,>=3.9.2
|
|
|
15
15
|
Requires-Dist: blinker==1.*,>=1.9.0
|
|
16
16
|
Requires-Dist: click==8.*,>=8.3.0
|
|
17
17
|
Requires-Dist: fastjsonschema==2.*,>=2.21.1
|
|
18
|
-
Requires-Dist: flask[async]==3.0.3
|
|
18
|
+
Requires-Dist: flask[async]==3.*,>=3.0.3
|
|
19
19
|
Requires-Dist: flask-cors==6.*,>=6.0.1
|
|
20
20
|
Requires-Dist: flask-sqlalchemy==3.*,>=3.1.1
|
|
21
21
|
Requires-Dist: geode-common==33.11.0
|
|
@@ -4,7 +4,7 @@ opengeodeweb_back/geode_functions.py,sha256=NzELy9s6AETDnm7tyA_uM2N89zrfeLdblRhz
|
|
|
4
4
|
opengeodeweb_back/geode_objects.py,sha256=_NclGPa024kCwUHdORkFuXYtiZBmQpgq6sO3LRkBhe8,27776
|
|
5
5
|
opengeodeweb_back/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
|
|
6
6
|
opengeodeweb_back/test_utils.py,sha256=18AbRW9-tfKkPcmRGilTTHXI7S3armYyV7Vdy5UvUKM,794
|
|
7
|
-
opengeodeweb_back/utils_functions.py,sha256=
|
|
7
|
+
opengeodeweb_back/utils_functions.py,sha256=k8FpsHruaqnqyYgfwRC2JVvzoQrV5JgY7z5JJ7dhMgs,9180
|
|
8
8
|
opengeodeweb_back/routes/blueprint_routes.py,sha256=h_yfFC3ljH0KqFr5Ab_-IQYNB7VVRENwAMQk4NDsh18,11042
|
|
9
9
|
opengeodeweb_back/routes/models/blueprint_models.py,sha256=Jo9pUDeu1nO3_IbBiuHGk57cc4_fhwxjM0EKNyv1FT0,1874
|
|
10
10
|
opengeodeweb_back/routes/models/schemas/mesh_components.json,sha256=JmQUvpy7HpGS6FlThZLx1YjHqiInRTqUZ_Ft5MfOzEE,239
|
|
@@ -23,8 +23,8 @@ opengeodeweb_back/routes/schemas/save_viewable_file.json,sha256=pvvEdaC7bNASPMrl
|
|
|
23
23
|
opengeodeweb_back/routes/schemas/texture_coordinates.json,sha256=2uQueIl1jOmxFG_gIi_vJETR4IurrwuSf8GAnzphk9g,237
|
|
24
24
|
opengeodeweb_back/routes/schemas/upload_file.json,sha256=LJ3U3L5ApKuQDVFIpVT_y2alq4HW_suTvZ3HUucNbhg,219
|
|
25
25
|
opengeodeweb_back/routes/schemas/vertex_attribute_names.json,sha256=ECIflohiqPZNsflAdkfEzksL4we0JvZhIxUd84Ubctg,240
|
|
26
|
-
opengeodeweb_back-5.10.
|
|
27
|
-
opengeodeweb_back-5.10.
|
|
28
|
-
opengeodeweb_back-5.10.
|
|
29
|
-
opengeodeweb_back-5.10.
|
|
30
|
-
opengeodeweb_back-5.10.
|
|
26
|
+
opengeodeweb_back-5.10.0rc19.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
|
|
27
|
+
opengeodeweb_back-5.10.0rc19.dist-info/METADATA,sha256=DZXD_vYSpV51_xPLueg-W3XWtrJ9elYJkAIGPsN--nQ,2955
|
|
28
|
+
opengeodeweb_back-5.10.0rc19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
opengeodeweb_back-5.10.0rc19.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
|
|
30
|
+
opengeodeweb_back-5.10.0rc19.dist-info/RECORD,,
|
|
File without changes
|
{opengeodeweb_back-5.10.0rc17.dist-info → opengeodeweb_back-5.10.0rc19.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{opengeodeweb_back-5.10.0rc17.dist-info → opengeodeweb_back-5.10.0rc19.dist-info}/top_level.txt
RENAMED
|
File without changes
|