OpenGeodeWeb-Back 5.10.4rc2__py3-none-any.whl → 5.10.5rc1__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.

@@ -4,7 +4,6 @@ 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
9
8
 
10
9
  # Third party imports
@@ -112,7 +111,7 @@ def validate_request(request: flask.Request, schema: dict[str, str]) -> None:
112
111
 
113
112
 
114
113
  def set_interval(
115
- function: Callable[[Any], None], seconds: float, args: Any
114
+ function: Callable[[flask.Flask], None], seconds: float, args: flask.Flask
116
115
  ) -> threading.Timer:
117
116
  def function_wrapper() -> None:
118
117
  set_interval(function, seconds, args)
@@ -129,7 +128,7 @@ def extension_from_filename(filename: str) -> str:
129
128
 
130
129
 
131
130
  def send_file(
132
- upload_folder: str, saved_files: str, new_file_name: str
131
+ upload_folder: str, saved_files: list[str], new_file_name: str
133
132
  ) -> flask.Response:
134
133
  if len(saved_files) == 1:
135
134
  mimetype = "application/octet-binary"
@@ -177,19 +176,10 @@ def create_data_folder_from_id(data_id: str) -> str:
177
176
 
178
177
  def save_all_viewables_and_return_info(
179
178
  geode_object: str,
180
- data: Any,
181
- input_file: str | None = None,
182
- additional_files: list[str] | None = None,
183
- ) -> dict[str, Any]:
184
- if additional_files is None:
185
- additional_files = []
186
-
187
- data_entry = Data.create(
188
- geode_object=geode_object,
189
- input_file=input_file,
190
- additional_files=additional_files,
191
- )
192
- data_path = create_data_folder_from_id(data_entry.id)
179
+ data: object,
180
+ data_entry: Data,
181
+ data_path: str,
182
+ ) -> dict[str, str | list[str]]:
193
183
  with ThreadPoolExecutor() as executor:
194
184
  native_future = executor.submit(
195
185
  geode_functions.save,
@@ -230,22 +220,29 @@ def save_all_viewables_and_return_info(
230
220
 
231
221
 
232
222
  def generate_native_viewable_and_light_viewable_from_object(
233
- geode_object: str, data: Any
234
- ) -> dict[str, Any]:
235
- return save_all_viewables_and_return_info(geode_object, data, input_file="")
223
+ geode_object: str, data: object
224
+ ) -> dict[str, str | list[str]]:
225
+ data_entry = Data.create(
226
+ geode_object=geode_object,
227
+ viewer_object=geode_functions.get_object_type(geode_object),
228
+ input_file="",
229
+ additional_files=[],
230
+ )
231
+ data_path = create_data_folder_from_id(data_entry.id)
232
+ return save_all_viewables_and_return_info(geode_object, data, data_entry, data_path)
236
233
 
237
234
 
238
235
  def generate_native_viewable_and_light_viewable_from_file(
239
236
  geode_object: str, input_filename: str
240
- ) -> dict[str, Any]:
241
-
242
- temp_data_entry = Data.create(
237
+ ) -> dict[str, str | list[str]]:
238
+ data_entry = Data.create(
243
239
  geode_object=geode_object,
240
+ viewer_object=geode_functions.get_object_type(geode_object),
244
241
  input_file=input_filename,
245
242
  additional_files=[],
246
243
  )
247
244
 
248
- data_path = create_data_folder_from_id(temp_data_entry.id)
245
+ data_path = create_data_folder_from_id(data_entry.id)
249
246
 
250
247
  full_input_filename = geode_functions.upload_file_path(input_filename)
251
248
  copied_full_path = os.path.join(
@@ -270,9 +267,10 @@ def generate_native_viewable_and_light_viewable_from_file(
270
267
 
271
268
  data = geode_functions.load(geode_object, copied_full_path)
272
269
 
270
+ data_entry.additional_files = additional_files_copied
273
271
  return save_all_viewables_and_return_info(
274
272
  geode_object,
275
273
  data,
276
- input_file=input_filename,
277
- additional_files=additional_files_copied,
274
+ data_entry,
275
+ data_path,
278
276
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 5.10.4rc2
3
+ Version: 5.10.5rc1
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
@@ -27,7 +27,7 @@ Requires-Dist: opengeode-geosciencesio==5.8.0
27
27
  Requires-Dist: opengeode-inspector==6.8.1
28
28
  Requires-Dist: opengeode-io==7.4.0
29
29
  Requires-Dist: werkzeug==3.1.2
30
- Requires-Dist: opengeodeweb-microservice==1.*,>=1.0.4
30
+ Requires-Dist: opengeodeweb-microservice==1.*,>=1.0.5rc1
31
31
  Dynamic: license-file
32
32
 
33
33
  <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
@@ -5,7 +5,7 @@ opengeodeweb_back/geode_functions.py,sha256=NzELy9s6AETDnm7tyA_uM2N89zrfeLdblRhz
5
5
  opengeodeweb_back/geode_objects.py,sha256=_NclGPa024kCwUHdORkFuXYtiZBmQpgq6sO3LRkBhe8,27776
6
6
  opengeodeweb_back/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
7
7
  opengeodeweb_back/test_utils.py,sha256=18AbRW9-tfKkPcmRGilTTHXI7S3armYyV7Vdy5UvUKM,794
8
- opengeodeweb_back/utils_functions.py,sha256=iOOOccpxgjNS4KriwcG2VYDuYF6kAU0r297uXN00OSk,9265
8
+ opengeodeweb_back/utils_functions.py,sha256=tHU6VjyW-QwohDihdcoVSiD2TdGLeB0EtBjCorvVb8I,9327
9
9
  opengeodeweb_back/routes/blueprint_routes.py,sha256=eTEKwKt9qc6cH1MDQ3lwmcnzLLxU_W8cYwu8HcUbXxo,10998
10
10
  opengeodeweb_back/routes/models/blueprint_models.py,sha256=Jo9pUDeu1nO3_IbBiuHGk57cc4_fhwxjM0EKNyv1FT0,1874
11
11
  opengeodeweb_back/routes/models/schemas/mesh_components.json,sha256=JmQUvpy7HpGS6FlThZLx1YjHqiInRTqUZ_Ft5MfOzEE,239
@@ -25,9 +25,9 @@ opengeodeweb_back/routes/schemas/save_viewable_file.json,sha256=pvvEdaC7bNASPMrl
25
25
  opengeodeweb_back/routes/schemas/texture_coordinates.json,sha256=2uQueIl1jOmxFG_gIi_vJETR4IurrwuSf8GAnzphk9g,237
26
26
  opengeodeweb_back/routes/schemas/upload_file.json,sha256=LJ3U3L5ApKuQDVFIpVT_y2alq4HW_suTvZ3HUucNbhg,219
27
27
  opengeodeweb_back/routes/schemas/vertex_attribute_names.json,sha256=ECIflohiqPZNsflAdkfEzksL4we0JvZhIxUd84Ubctg,240
28
- opengeodeweb_back-5.10.4rc2.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
29
- opengeodeweb_back-5.10.4rc2.dist-info/METADATA,sha256=p903v6LSry-5lm4N7WTpAaUNTix732yhfdxRXHNGi-c,2665
30
- opengeodeweb_back-5.10.4rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- opengeodeweb_back-5.10.4rc2.dist-info/entry_points.txt,sha256=3W_t5GFc9ROHSIZ55IGvYU3DLHUFQmYOM4Bm9u3Z0cE,71
32
- opengeodeweb_back-5.10.4rc2.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
33
- opengeodeweb_back-5.10.4rc2.dist-info/RECORD,,
28
+ opengeodeweb_back-5.10.5rc1.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
29
+ opengeodeweb_back-5.10.5rc1.dist-info/METADATA,sha256=6LnIyanx13uNBllBS48qFz4J41ZJ7nAOZDnPu9nIyKs,2668
30
+ opengeodeweb_back-5.10.5rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ opengeodeweb_back-5.10.5rc1.dist-info/entry_points.txt,sha256=3W_t5GFc9ROHSIZ55IGvYU3DLHUFQmYOM4Bm9u3Z0cE,71
32
+ opengeodeweb_back-5.10.5rc1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
33
+ opengeodeweb_back-5.10.5rc1.dist-info/RECORD,,