OpenGeodeWeb-Back 5.4.0rc1__py3-none-any.whl → 5.4.0rc3__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.0rc3
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
- opengeodeweb_back/geode_functions.py,sha256=c6mgFoTxL4v2DeeqnZU2aBdEQcUCuOoBawnjLrIcm_s,8814
4
- opengeodeweb_back/geode_objects.py,sha256=_1BRL7sQbQMfryAUIY0jAfzRl_upYC9nWwpvF_IWh3A,23467
3
+ opengeodeweb_back/geode_functions.py,sha256=e13Ws4JDzPBxOUQfpOxjmxd7ZDj43-AsI8z8JsKDtG4,8824
4
+ opengeodeweb_back/geode_objects.py,sha256=hREwA-Qyi6YIVWhCu3HBnWMfLohPr9TpylVtZbJ2qyc,23658
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=oPFLxjTBgfxsjug4Qmn5YW_vlFOodAFl9H_aXDSO-24,11598
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.0rc3.dist-info/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
21
+ OpenGeodeWeb_Back-5.4.0rc3.dist-info/METADATA,sha256=H1dnILo3TO26Z7nSPuT5w44rCArRDWIzunKZ1XO8dJU,3059
22
+ OpenGeodeWeb_Back-5.4.0rc3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
23
+ OpenGeodeWeb_Back-5.4.0rc3.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
24
+ OpenGeodeWeb_Back-5.4.0rc3.dist-info/RECORD,,
@@ -76,8 +76,8 @@ def create_crs(
76
76
  )
77
77
 
78
78
 
79
- def is_model(geode_object: str):
80
- return geode_object_value(geode_object)["is_model"]
79
+ def get_object_type(geode_object: str):
80
+ return geode_object_value(geode_object)["object_type"]
81
81
 
82
82
 
83
83
  def is_3D(geode_object: str):
@@ -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 {
@@ -23,7 +28,7 @@ def geode_objects_dict():
23
28
  "convert": og_gs.convert_brep_coordinate_reference_system,
24
29
  "create": og.create_brep_coordinate_system,
25
30
  },
26
- "is_model": True,
31
+ "object_type": "model",
27
32
  "is_3D": True,
28
33
  "is_viewable": True,
29
34
  "save_viewable": g_v.save_viewable_brep,
@@ -45,7 +50,7 @@ def geode_objects_dict():
45
50
  "convert": og_gs.convert_section_coordinate_reference_system,
46
51
  "create": og.create_section_coordinate_system,
47
52
  },
48
- "is_model": True,
53
+ "object_type": "model",
49
54
  "is_3D": False,
50
55
  "is_viewable": True,
51
56
  "save_viewable": g_v.save_viewable_cross_section,
@@ -66,7 +71,7 @@ def geode_objects_dict():
66
71
  "convert": og_gs.convert_edged_curve_coordinate_reference_system2D,
67
72
  "create": og.create_edged_curve_coordinate_system2D,
68
73
  },
69
- "is_model": False,
74
+ "object_type": "mesh",
70
75
  "is_3D": False,
71
76
  "is_viewable": True,
72
77
  "save_viewable": g_v.save_viewable_edged_curve2D,
@@ -87,7 +92,7 @@ def geode_objects_dict():
87
92
  "convert": og_gs.convert_edged_curve_coordinate_reference_system3D,
88
93
  "create": og.create_edged_curve_coordinate_system3D,
89
94
  },
90
- "is_model": False,
95
+ "object_type": "mesh",
91
96
  "is_3D": True,
92
97
  "is_viewable": True,
93
98
  "save_viewable": g_v.save_viewable_edged_curve3D,
@@ -103,7 +108,7 @@ def geode_objects_dict():
103
108
  "is_saveable": og.is_graph_saveable,
104
109
  "save": og.save_graph,
105
110
  "builder": og.GraphBuilder.create,
106
- "is_model": False,
111
+ "object_type": "mesh",
107
112
  "is_3D": False,
108
113
  "is_viewable": True,
109
114
  },
@@ -122,7 +127,7 @@ def geode_objects_dict():
122
127
  "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
123
128
  "create": og.create_solid_mesh_coordinate_system3D,
124
129
  },
125
- "is_model": False,
130
+ "object_type": "mesh",
126
131
  "is_3D": True,
127
132
  "is_viewable": True,
128
133
  "save_viewable": g_v.save_viewable_hybrid_solid3D,
@@ -144,7 +149,7 @@ def geode_objects_dict():
144
149
  "convert": og_gs.convert_section_coordinate_reference_system,
145
150
  "create": og.create_section_coordinate_system,
146
151
  },
147
- "is_model": True,
152
+ "object_type": "model",
148
153
  "is_3D": False,
149
154
  "is_viewable": True,
150
155
  "save_viewable": g_v.save_viewable_implicit_cross_section,
@@ -166,7 +171,7 @@ def geode_objects_dict():
166
171
  "convert": og_gs.convert_brep_coordinate_reference_system,
167
172
  "create": og.create_brep_coordinate_system,
168
173
  },
169
- "is_model": True,
174
+ "object_type": "model",
170
175
  "is_3D": True,
171
176
  "is_viewable": True,
172
177
  "save_viewable": g_v.save_viewable_implicit_structural_model,
@@ -181,7 +186,7 @@ def geode_objects_dict():
181
186
  "load": og.load_light_regular_grid2D,
182
187
  "is_saveable": og.is_light_regular_grid_saveable2D,
183
188
  "save": og.save_light_regular_grid2D,
184
- "is_model": False,
189
+ "object_type": "mesh",
185
190
  "is_3D": False,
186
191
  "is_viewable": True,
187
192
  "save_viewable": g_v.save_viewable_light_regular_grid2D,
@@ -195,7 +200,7 @@ def geode_objects_dict():
195
200
  "load": og.load_light_regular_grid3D,
196
201
  "is_saveable": og.is_light_regular_grid_saveable3D,
197
202
  "save": og.save_light_regular_grid3D,
198
- "is_model": False,
203
+ "object_type": "mesh",
199
204
  "is_3D": True,
200
205
  "is_viewable": True,
201
206
  "save_viewable": g_v.save_viewable_light_regular_grid3D,
@@ -215,7 +220,7 @@ def geode_objects_dict():
215
220
  "convert": og_gs.convert_point_set_coordinate_reference_system2D,
216
221
  "create": og.create_point_set_coordinate_system2D,
217
222
  },
218
- "is_model": False,
223
+ "object_type": "mesh",
219
224
  "is_3D": False,
220
225
  "is_viewable": True,
221
226
  "save_viewable": g_v.save_viewable_point_set2D,
@@ -236,7 +241,7 @@ def geode_objects_dict():
236
241
  "convert": og_gs.convert_point_set_coordinate_reference_system3D,
237
242
  "create": og.create_point_set_coordinate_system3D,
238
243
  },
239
- "is_model": False,
244
+ "object_type": "mesh",
240
245
  "is_3D": True,
241
246
  "is_viewable": True,
242
247
  "save_viewable": g_v.save_viewable_point_set3D,
@@ -257,7 +262,7 @@ def geode_objects_dict():
257
262
  "convert": og_gs.convert_surface_mesh_coordinate_reference_system2D,
258
263
  "create": og.create_surface_mesh_coordinate_system2D,
259
264
  },
260
- "is_model": False,
265
+ "object_type": "mesh",
261
266
  "is_3D": False,
262
267
  "is_viewable": True,
263
268
  "save_viewable": g_v.save_viewable_polygonal_surface2D,
@@ -278,7 +283,7 @@ def geode_objects_dict():
278
283
  "convert": og_gs.convert_surface_mesh_coordinate_reference_system3D,
279
284
  "create": og.create_surface_mesh_coordinate_system3D,
280
285
  },
281
- "is_model": False,
286
+ "object_type": "mesh",
282
287
  "is_3D": True,
283
288
  "is_viewable": True,
284
289
  "save_viewable": g_v.save_viewable_polygonal_surface3D,
@@ -299,7 +304,7 @@ def geode_objects_dict():
299
304
  "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
300
305
  "create": og.create_solid_mesh_coordinate_system3D,
301
306
  },
302
- "is_model": False,
307
+ "object_type": "mesh",
303
308
  "is_3D": True,
304
309
  "is_viewable": True,
305
310
  "save_viewable": g_v.save_viewable_polyhedral_solid3D,
@@ -314,7 +319,7 @@ def geode_objects_dict():
314
319
  "load": og.load_raster_image2D,
315
320
  "is_saveable": og.is_raster_image_saveable2D,
316
321
  "save": og.save_raster_image2D,
317
- "is_model": False,
322
+ "object_type": "mesh",
318
323
  "is_3D": False,
319
324
  "is_viewable": False,
320
325
  "save_viewable": g_v.save_viewable_raster_image2D,
@@ -328,7 +333,7 @@ def geode_objects_dict():
328
333
  "load": og.load_raster_image3D,
329
334
  "is_saveable": og.is_raster_image_saveable3D,
330
335
  "save": og.save_raster_image3D,
331
- "is_model": False,
336
+ "object_type": "mesh",
332
337
  "is_3D": False,
333
338
  "is_viewable": False,
334
339
  "save_viewable": g_v.save_viewable_raster_image3D,
@@ -348,7 +353,7 @@ def geode_objects_dict():
348
353
  "convert": og_gs.convert_surface_mesh_coordinate_reference_system2D,
349
354
  "create": og.create_surface_mesh_coordinate_system2D,
350
355
  },
351
- "is_model": False,
356
+ "object_type": "mesh",
352
357
  "is_3D": False,
353
358
  "is_viewable": True,
354
359
  "save_viewable": g_v.save_viewable_regular_grid2D,
@@ -368,7 +373,7 @@ def geode_objects_dict():
368
373
  "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
369
374
  "create": og.create_surface_mesh_coordinate_system3D,
370
375
  },
371
- "is_model": False,
376
+ "object_type": "mesh",
372
377
  "is_3D": True,
373
378
  "is_viewable": True,
374
379
  "save_viewable": g_v.save_viewable_regular_grid3D,
@@ -388,7 +393,7 @@ def geode_objects_dict():
388
393
  "convert": og_gs.convert_section_coordinate_reference_system,
389
394
  "create": og.create_section_coordinate_system,
390
395
  },
391
- "is_model": True,
396
+ "object_type": "model",
392
397
  "is_3D": False,
393
398
  "is_viewable": True,
394
399
  "save_viewable": g_v.save_viewable_section,
@@ -410,7 +415,7 @@ def geode_objects_dict():
410
415
  "convert": og_gs.convert_brep_coordinate_reference_system,
411
416
  "create": og.create_brep_coordinate_system,
412
417
  },
413
- "is_model": True,
418
+ "object_type": "model",
414
419
  "is_3D": True,
415
420
  "is_viewable": True,
416
421
  "save_viewable": g_v.save_viewable_structural_model,
@@ -431,7 +436,7 @@ def geode_objects_dict():
431
436
  "convert": og_gs.convert_solid_mesh_coordinate_reference_system3D,
432
437
  "create": og.create_solid_mesh_coordinate_system3D,
433
438
  },
434
- "is_model": False,
439
+ "object_type": "mesh",
435
440
  "is_3D": True,
436
441
  "is_viewable": True,
437
442
  "save_viewable": g_v.save_viewable_tetrahedral_solid3D,
@@ -452,7 +457,7 @@ def geode_objects_dict():
452
457
  "convert": og_gs.convert_surface_mesh_coordinate_reference_system2D,
453
458
  "create": og.create_surface_mesh_coordinate_system2D,
454
459
  },
455
- "is_model": False,
460
+ "object_type": "mesh",
456
461
  "is_3D": False,
457
462
  "is_viewable": True,
458
463
  "save_viewable": g_v.save_viewable_triangulated_surface2D,
@@ -473,7 +478,7 @@ def geode_objects_dict():
473
478
  "convert": og_gs.convert_surface_mesh_coordinate_reference_system3D,
474
479
  "create": og.create_surface_mesh_coordinate_system3D,
475
480
  },
476
- "is_model": False,
481
+ "object_type": "mesh",
477
482
  "is_3D": True,
478
483
  "is_viewable": True,
479
484
  "save_viewable": g_v.save_viewable_triangulated_surface3D,
@@ -489,7 +494,7 @@ def geode_objects_dict():
489
494
  "is_saveable": og.is_vertex_set_saveable,
490
495
  "save": og.save_vertex_set,
491
496
  "builder": og.VertexSetBuilder.create,
492
- "is_model": False,
497
+ "object_type": "mesh",
493
498
  "is_3D": False,
494
499
  "is_viewable": False,
495
500
  },
@@ -260,6 +260,9 @@ def save_viewable_file():
260
260
  DATA_FOLDER_PATH,
261
261
  generated_id + "." + native_extension,
262
262
  )
263
+ object_type = geode_functions.get_object_type(
264
+ flask.request.json["input_geode_object"]
265
+ )
263
266
 
264
267
  native_file_name = os.path.basename(absolute_native_file_path)
265
268
  viewable_file_name = os.path.basename(saved_viewable_file_path)
@@ -269,6 +272,7 @@ def save_viewable_file():
269
272
  "native_file_name": native_file_name,
270
273
  "viewable_file_name": viewable_file_name,
271
274
  "id": generated_id,
275
+ "object_type": object_type,
272
276
  },
273
277
  200,
274
278
  )
@@ -304,6 +308,68 @@ def create_point():
304
308
  )
305
309
 
306
310
 
311
+ with open(
312
+ os.path.join(schemas, "vertex_attribute_names.json"),
313
+ "r",
314
+ ) as file:
315
+ vertex_attribute_names_json = json.load(file)
316
+
317
+
318
+ @routes.route(
319
+ vertex_attribute_names_json["route"],
320
+ methods=vertex_attribute_names_json["methods"],
321
+ )
322
+ def vertex_attribute_names():
323
+
324
+ UPLOAD_FOLDER = flask.current_app.config["UPLOAD_FOLDER"]
325
+ utils_functions.validate_request(flask.request, vertex_attribute_names_json)
326
+ file_absolute_path = os.path.join(
327
+ UPLOAD_FOLDER, werkzeug.utils.secure_filename(flask.request.json["filename"])
328
+ )
329
+ data = geode_functions.load(
330
+ flask.request.json["input_geode_object"], file_absolute_path
331
+ )
332
+ vertex_attribute_names = data.vertex_attribute_manager().attribute_names()
333
+
334
+ return flask.make_response(
335
+ {
336
+ "vertex_attribute_names": vertex_attribute_names,
337
+ },
338
+ 200,
339
+ )
340
+
341
+
342
+ with open(
343
+ os.path.join(schemas, "polygon_attribute_names.json"),
344
+ "r",
345
+ ) as file:
346
+ polygon_attribute_names_json = json.load(file)
347
+
348
+
349
+ @routes.route(
350
+ polygon_attribute_names_json["route"],
351
+ methods=polygon_attribute_names_json["methods"],
352
+ )
353
+ def polygon_attribute_names():
354
+
355
+ UPLOAD_FOLDER = flask.current_app.config["UPLOAD_FOLDER"]
356
+ utils_functions.validate_request(flask.request, vertex_attribute_names_json)
357
+ file_absolute_path = os.path.join(
358
+ UPLOAD_FOLDER, werkzeug.utils.secure_filename(flask.request.json["filename"])
359
+ )
360
+ data = geode_functions.load(
361
+ flask.request.json["input_geode_object"], file_absolute_path
362
+ )
363
+ polygon_attribute_names = data.polygon_attribute_manager().attribute_names()
364
+
365
+ return flask.make_response(
366
+ {
367
+ "polygon_attribute_names": polygon_attribute_names,
368
+ },
369
+ 200,
370
+ )
371
+
372
+
307
373
  with open(
308
374
  os.path.join(schemas, "ping.json"),
309
375
  "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
+ )