OpenGeodeWeb-Back 5.4.0rc1__py3-none-any.whl → 5.4.0rc2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 5.4.0rc1
3
+ Version: 5.4.0rc2
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
@@ -13,32 +13,32 @@ Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: asgiref==3.8.1
15
15
  Requires-Dist: attrs==24.2.0
16
- Requires-Dist: blinker==1.8.2
16
+ Requires-Dist: blinker==1.9.0
17
17
  Requires-Dist: click==8.1.7
18
- Requires-Dist: flask[async]==3.0.3
18
+ Requires-Dist: flask[async]==3.1.0
19
19
  Requires-Dist: flask-cors==5.0.0
20
- Requires-Dist: geode-background==8.7.0
21
- Requires-Dist: geode-common==33.0.9
22
- Requires-Dist: geode-conversion==6.0.14
23
- Requires-Dist: geode-explicit==6.1.14
24
- Requires-Dist: geode-implicit==3.3.2
25
- Requires-Dist: geode-numerics==5.1.8
26
- Requires-Dist: geode-simplex==8.2.15
27
- Requires-Dist: geode-viewables==3.0.6
20
+ Requires-Dist: geode-background==8.7.5
21
+ Requires-Dist: geode-common==33.1.3
22
+ Requires-Dist: geode-conversion==6.0.18
23
+ Requires-Dist: geode-explicit==6.1.17
24
+ Requires-Dist: geode-implicit==3.3.5
25
+ Requires-Dist: geode-numerics==5.2.0
26
+ Requires-Dist: geode-simplex==8.2.18
27
+ Requires-Dist: geode-viewables==3.0.8
28
28
  Requires-Dist: itsdangerous==2.2.0
29
29
  Requires-Dist: jinja2==3.1.4
30
30
  Requires-Dist: jsonschema==4.23.0
31
31
  Requires-Dist: jsonschema-specifications==2024.10.1
32
32
  Requires-Dist: markupsafe==3.0.2
33
- Requires-Dist: opengeode-core==15.6.3
34
- Requires-Dist: opengeode-geosciences==8.1.1
35
- Requires-Dist: opengeode-geosciencesio==5.2.3
36
- Requires-Dist: opengeode-inspector==6.1.12
37
- Requires-Dist: opengeode-io==7.0.5
33
+ Requires-Dist: opengeode-core==15.6.7
34
+ Requires-Dist: opengeode-geosciences==8.2.0
35
+ Requires-Dist: opengeode-geosciencesio==5.3.2
36
+ Requires-Dist: opengeode-inspector==6.1.15
37
+ Requires-Dist: opengeode-io==7.0.7
38
38
  Requires-Dist: referencing==0.35.1
39
39
  Requires-Dist: rpds-py==0.21.0
40
40
  Requires-Dist: typing-extensions==4.12.2
41
- Requires-Dist: werkzeug==3.1.2
41
+ Requires-Dist: werkzeug==3.1.3
42
42
 
43
43
  <h1 align="center">OpenGeodeWeb-Back<sup><i>by Geode-solutions</i></sup></h1>
44
44
  <h3 align="center">OpenSource Python framework based on OpenGeode</h3>
@@ -1,9 +1,10 @@
1
1
  opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  opengeodeweb_back/app_config.py,sha256=bZIs0giTA0cYJJYbt25ZHYlHdsOy82h5xSxdOitgR4A,752
3
3
  opengeodeweb_back/geode_functions.py,sha256=c6mgFoTxL4v2DeeqnZU2aBdEQcUCuOoBawnjLrIcm_s,8814
4
- opengeodeweb_back/geode_objects.py,sha256=_1BRL7sQbQMfryAUIY0jAfzRl_upYC9nWwpvF_IWh3A,23467
4
+ opengeodeweb_back/geode_objects.py,sha256=CIZFu6cwlTW22xCs81KXzYz3aq9iv5X2KrwMGodF-HA,23546
5
+ opengeodeweb_back/test_utils.py,sha256=gvRPOzin4nI5TKuB-AFgIxcekTOYM4h7yUYk0tYIZFI,820
5
6
  opengeodeweb_back/utils_functions.py,sha256=18kp8M3bnrlu692qj-ymJJPA1hTpPjx_xl9oVi5qGyg,4120
6
- opengeodeweb_back/routes/blueprint_routes.py,sha256=GfBxliIUAhtrsCQTN8VjKvr7zle9nQ5VK7qAr3ygE78,9681
7
+ opengeodeweb_back/routes/blueprint_routes.py,sha256=DC1B634IgqpDzUvEqdz_H-uAkvme45amgJmCNPyP-90,11452
7
8
  opengeodeweb_back/routes/schemas/allowed_files.json,sha256=pRsGf39LiJpl3zEGLg4IqvRtm7iUx3Wq4Tb4tSFXGV0,234
8
9
  opengeodeweb_back/routes/schemas/allowed_objects.json,sha256=8JLtAI46eXeiJuiryS2geRVv0J1rGkFb87pRwtBZSZw,296
9
10
  opengeodeweb_back/routes/schemas/create_point.json,sha256=fqBOLRxpRtCVz1t7ottdfhSMREhqNFUHrQwamn-F7Ds,306
@@ -12,10 +13,12 @@ opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json,sha256=86QEB
12
13
  opengeodeweb_back/routes/schemas/inspect_file.json,sha256=7jmmLD2oZ2dxn5-2HqS6fU92eGM3FWBQdj3CjyYmGOA,285
13
14
  opengeodeweb_back/routes/schemas/missing_files.json,sha256=tJVdSM3CqYFZRC6eNW6Q3JG3RtoaZDxaZtbfx6djbX0,286
14
15
  opengeodeweb_back/routes/schemas/ping.json,sha256=MhI5jtrjMsAsfIKEzdY8p1HyV9xv4O3hYfESWw6tkyE,162
16
+ opengeodeweb_back/routes/schemas/polygon_attribute_names.json,sha256=y0qDZ0v3zkzYuM-9jfBXU0aTUnWz2w0gXqes9Xs7PgE,296
15
17
  opengeodeweb_back/routes/schemas/save_viewable_file.json,sha256=7BXO8vsQrmqyEQ2uycm2Ift_EY7a0KocvnGEjYrQFcQ,368
16
18
  opengeodeweb_back/routes/schemas/upload_file.json,sha256=sE6bxz3mJbSZlGmrnR_hZmcx0dvZGn3Wpnn6szRPxXQ,186
17
- OpenGeodeWeb_Back-5.4.0rc1.dist-info/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
18
- OpenGeodeWeb_Back-5.4.0rc1.dist-info/METADATA,sha256=g8J7rFO-X2L9tIo2h9Y2y4xRYRJfPoToXYbJnpqa5GI,3059
19
- OpenGeodeWeb_Back-5.4.0rc1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
20
- OpenGeodeWeb_Back-5.4.0rc1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
21
- OpenGeodeWeb_Back-5.4.0rc1.dist-info/RECORD,,
19
+ opengeodeweb_back/routes/schemas/vertex_attribute_names.json,sha256=wijww9z7vVUIr1_3hMnR5efpMfW2-o2-QvcO_MVDefE,295
20
+ OpenGeodeWeb_Back-5.4.0rc2.dist-info/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
21
+ OpenGeodeWeb_Back-5.4.0rc2.dist-info/METADATA,sha256=MYSQ49DSPWxT8vsApEt24Xo6Ozi4s95Gg-rhizjBFfs,3059
22
+ OpenGeodeWeb_Back-5.4.0rc2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
23
+ OpenGeodeWeb_Back-5.4.0rc2.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
24
+ OpenGeodeWeb_Back-5.4.0rc2.dist-info/RECORD,,
@@ -1,3 +1,6 @@
1
+ # Standard library imports
2
+
3
+ # Third party imports
1
4
  import opengeode as og
2
5
  import opengeode_io as og_io
3
6
  import opengeode_inspector as og_inspector
@@ -5,6 +8,8 @@ import opengeode_geosciences as og_gs
5
8
  import opengeode_geosciencesio as og_gs_io
6
9
  import geode_viewables as g_v
7
10
 
11
+ # Local application imports
12
+
8
13
 
9
14
  def geode_objects_dict():
10
15
  return {
@@ -304,6 +304,68 @@ def create_point():
304
304
  )
305
305
 
306
306
 
307
+ with open(
308
+ os.path.join(schemas, "vertex_attribute_names.json"),
309
+ "r",
310
+ ) as file:
311
+ vertex_attribute_names_json = json.load(file)
312
+
313
+
314
+ @routes.route(
315
+ vertex_attribute_names_json["route"],
316
+ methods=vertex_attribute_names_json["methods"],
317
+ )
318
+ def vertex_attribute_names():
319
+
320
+ UPLOAD_FOLDER = flask.current_app.config["UPLOAD_FOLDER"]
321
+ utils_functions.validate_request(flask.request, vertex_attribute_names_json)
322
+ file_absolute_path = os.path.join(
323
+ UPLOAD_FOLDER, werkzeug.utils.secure_filename(flask.request.json["filename"])
324
+ )
325
+ data = geode_functions.load(
326
+ flask.request.json["input_geode_object"], file_absolute_path
327
+ )
328
+ vertex_attribute_names = data.vertex_attribute_manager().attribute_names()
329
+
330
+ return flask.make_response(
331
+ {
332
+ "vertex_attribute_names": vertex_attribute_names,
333
+ },
334
+ 200,
335
+ )
336
+
337
+
338
+ with open(
339
+ os.path.join(schemas, "polygon_attribute_names.json"),
340
+ "r",
341
+ ) as file:
342
+ polygon_attribute_names_json = json.load(file)
343
+
344
+
345
+ @routes.route(
346
+ polygon_attribute_names_json["route"],
347
+ methods=polygon_attribute_names_json["methods"],
348
+ )
349
+ def polygon_attribute_names():
350
+
351
+ UPLOAD_FOLDER = flask.current_app.config["UPLOAD_FOLDER"]
352
+ utils_functions.validate_request(flask.request, vertex_attribute_names_json)
353
+ file_absolute_path = os.path.join(
354
+ UPLOAD_FOLDER, werkzeug.utils.secure_filename(flask.request.json["filename"])
355
+ )
356
+ data = geode_functions.load(
357
+ flask.request.json["input_geode_object"], file_absolute_path
358
+ )
359
+ polygon_attribute_names = data.polygon_attribute_manager().attribute_names()
360
+
361
+ return flask.make_response(
362
+ {
363
+ "polygon_attribute_names": polygon_attribute_names,
364
+ },
365
+ 200,
366
+ )
367
+
368
+
307
369
  with open(
308
370
  os.path.join(schemas, "ping.json"),
309
371
  "r",
@@ -0,0 +1,15 @@
1
+ {
2
+ "route": "/polygon_attribute_names",
3
+ "methods": ["POST"],
4
+ "type": "object",
5
+ "properties": {
6
+ "input_geode_object": {
7
+ "type": "string"
8
+ },
9
+ "filename": {
10
+ "type": "string"
11
+ }
12
+ },
13
+ "required": ["input_geode_object", "filename"],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "route": "/vertex_attribute_names",
3
+ "methods": ["POST"],
4
+ "type": "object",
5
+ "properties": {
6
+ "input_geode_object": {
7
+ "type": "string"
8
+ },
9
+ "filename": {
10
+ "type": "string"
11
+ }
12
+ },
13
+ "required": ["input_geode_object", "filename"],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,25 @@
1
+ # Standard library imports
2
+
3
+ # Third party imports
4
+
5
+ # Local application imports
6
+
7
+
8
+ def test_route_wrong_params(client, route, get_full_data):
9
+ for key, value in get_full_data().items():
10
+ json = get_full_data()
11
+ json.pop(key)
12
+ response = client.post(route, json=json)
13
+ assert response.status_code == 400
14
+ error_description = response.json["description"]
15
+ assert error_description == f"Validation error: '{key}' is a required property"
16
+
17
+ json = get_full_data()
18
+ json["dumb_key"] = "dumb_value"
19
+ response = client.post(route, json=json)
20
+ assert response.status_code == 400
21
+ error_description = response.json["description"]
22
+ assert (
23
+ error_description
24
+ == "Validation error: Additional properties are not allowed ('dumb_key' was unexpected)"
25
+ )