OpenGeodeWeb-Back 5.3.2rc1__py3-none-any.whl → 5.4.0rc1__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.3.2rc1
3
+ Version: 5.4.0rc1
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,34 +11,34 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: asgiref ==3.8.1
15
- Requires-Dist: attrs ==24.2.0
16
- Requires-Dist: blinker ==1.8.2
17
- Requires-Dist: click ==8.1.7
18
- Requires-Dist: flask[async] ==3.0.3
19
- Requires-Dist: flask-cors ==5.0.0
20
- Requires-Dist: geode-background ==8.6.8
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.14
27
- Requires-Dist: geode-viewables ==3.0.6
28
- Requires-Dist: itsdangerous ==2.2.0
29
- Requires-Dist: jinja2 ==3.1.4
30
- Requires-Dist: jsonschema ==4.23.0
31
- Requires-Dist: jsonschema-specifications ==2024.10.1
32
- Requires-Dist: markupsafe ==3.0.2
33
- Requires-Dist: opengeode-core ==15.6.1
34
- Requires-Dist: opengeode-geosciences ==8.1.1
35
- Requires-Dist: opengeode-geosciencesio ==5.2.3
36
- Requires-Dist: opengeode-inspector ==6.1.10
37
- Requires-Dist: opengeode-io ==7.0.5
38
- Requires-Dist: referencing ==0.35.1
39
- Requires-Dist: rpds-py ==0.20.1
40
- Requires-Dist: typing-extensions ==4.12.2
41
- Requires-Dist: werkzeug ==3.1.2
14
+ Requires-Dist: asgiref==3.8.1
15
+ Requires-Dist: attrs==24.2.0
16
+ Requires-Dist: blinker==1.8.2
17
+ Requires-Dist: click==8.1.7
18
+ Requires-Dist: flask[async]==3.0.3
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
28
+ Requires-Dist: itsdangerous==2.2.0
29
+ Requires-Dist: jinja2==3.1.4
30
+ Requires-Dist: jsonschema==4.23.0
31
+ Requires-Dist: jsonschema-specifications==2024.10.1
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
38
+ Requires-Dist: referencing==0.35.1
39
+ Requires-Dist: rpds-py==0.21.0
40
+ Requires-Dist: typing-extensions==4.12.2
41
+ Requires-Dist: werkzeug==3.1.2
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,11 +1,12 @@
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=m1icB_E9SctF6LFoUDLxE0WseDy6wc1qNV6KeuBeEGo,8716
4
- opengeodeweb_back/geode_objects.py,sha256=IxUC5TBhwGZnazxPKYHO-Tepgp3kr6hFd_UE7kxIVZA,22452
3
+ opengeodeweb_back/geode_functions.py,sha256=c6mgFoTxL4v2DeeqnZU2aBdEQcUCuOoBawnjLrIcm_s,8814
4
+ opengeodeweb_back/geode_objects.py,sha256=_1BRL7sQbQMfryAUIY0jAfzRl_upYC9nWwpvF_IWh3A,23467
5
5
  opengeodeweb_back/utils_functions.py,sha256=18kp8M3bnrlu692qj-ymJJPA1hTpPjx_xl9oVi5qGyg,4120
6
- opengeodeweb_back/routes/blueprint_routes.py,sha256=X_VF8pfxxci8Ek37uLjIDJTh9ItNiufd52hoBfbi9q8,8596
6
+ opengeodeweb_back/routes/blueprint_routes.py,sha256=GfBxliIUAhtrsCQTN8VjKvr7zle9nQ5VK7qAr3ygE78,9681
7
7
  opengeodeweb_back/routes/schemas/allowed_files.json,sha256=pRsGf39LiJpl3zEGLg4IqvRtm7iUx3Wq4Tb4tSFXGV0,234
8
8
  opengeodeweb_back/routes/schemas/allowed_objects.json,sha256=8JLtAI46eXeiJuiryS2geRVv0J1rGkFb87pRwtBZSZw,296
9
+ opengeodeweb_back/routes/schemas/create_point.json,sha256=fqBOLRxpRtCVz1t7ottdfhSMREhqNFUHrQwamn-F7Ds,306
9
10
  opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json,sha256=0t4YhdKxDlzcLh85JU85z6Pn5h8wlXVt3Zi4ZhXXmTQ,308
10
11
  opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json,sha256=86QEBxAJXdMHulj2SyrxvAAwvyUq3mpKSazwASukeoM,242
11
12
  opengeodeweb_back/routes/schemas/inspect_file.json,sha256=7jmmLD2oZ2dxn5-2HqS6fU92eGM3FWBQdj3CjyYmGOA,285
@@ -13,8 +14,8 @@ opengeodeweb_back/routes/schemas/missing_files.json,sha256=tJVdSM3CqYFZRC6eNW6Q3
13
14
  opengeodeweb_back/routes/schemas/ping.json,sha256=MhI5jtrjMsAsfIKEzdY8p1HyV9xv4O3hYfESWw6tkyE,162
14
15
  opengeodeweb_back/routes/schemas/save_viewable_file.json,sha256=7BXO8vsQrmqyEQ2uycm2Ift_EY7a0KocvnGEjYrQFcQ,368
15
16
  opengeodeweb_back/routes/schemas/upload_file.json,sha256=sE6bxz3mJbSZlGmrnR_hZmcx0dvZGn3Wpnn6szRPxXQ,186
16
- OpenGeodeWeb_Back-5.3.2rc1.dist-info/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
17
- OpenGeodeWeb_Back-5.3.2rc1.dist-info/METADATA,sha256=_zlX0m_SkPlylvO21uBTe-BISAMIkLnCs2JksFFM7ZU,3087
18
- OpenGeodeWeb_Back-5.3.2rc1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
19
- OpenGeodeWeb_Back-5.3.2rc1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
20
- OpenGeodeWeb_Back-5.3.2rc1.dist-info/RECORD,,
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -15,6 +15,10 @@ def geode_object_value(geode_object: str):
15
15
  return geode_objects_dict()[geode_object]
16
16
 
17
17
 
18
+ def geode_object_class(geode_object: str):
19
+ return geode_object_value(geode_object)["class"]
20
+
21
+
18
22
  def input_factory(geode_object: str):
19
23
  return geode_object_value(geode_object)["input_factory"]
20
24
 
@@ -9,6 +9,7 @@ import geode_viewables as g_v
9
9
  def geode_objects_dict():
10
10
  return {
11
11
  "BRep": {
12
+ "class": og.BRep,
12
13
  "input_factory": og.BRepInputFactory,
13
14
  "output_factory": og.BRepOutputFactory,
14
15
  "missing_files": og.check_brep_missing_files,
@@ -30,6 +31,7 @@ def geode_objects_dict():
30
31
  },
31
32
  "CrossSection": {
32
33
  "parent": "Section",
34
+ "class": og_gs.CrossSection,
33
35
  "input_factory": og_gs.CrossSectionInputFactory,
34
36
  "output_factory": og_gs.CrossSectionOutputFactory,
35
37
  "missing_files": og_gs.check_cross_section_missing_files,
@@ -50,6 +52,7 @@ def geode_objects_dict():
50
52
  "inspector": og_inspector.inspect_section,
51
53
  },
52
54
  "EdgedCurve2D": {
55
+ "class": og.EdgedCurve2D,
53
56
  "input_factory": og.EdgedCurveInputFactory2D,
54
57
  "output_factory": og.EdgedCurveOutputFactory2D,
55
58
  "missing_files": og.check_edged_curve_missing_files2D,
@@ -70,6 +73,7 @@ def geode_objects_dict():
70
73
  "inspector": og_inspector.inspect_edged_curve2D,
71
74
  },
72
75
  "EdgedCurve3D": {
76
+ "class": og.EdgedCurve3D,
73
77
  "input_factory": og.EdgedCurveInputFactory3D,
74
78
  "output_factory": og.EdgedCurveOutputFactory3D,
75
79
  "missing_files": og.check_edged_curve_missing_files3D,
@@ -90,6 +94,7 @@ def geode_objects_dict():
90
94
  "inspector": og_inspector.inspect_edged_curve3D,
91
95
  },
92
96
  "Graph": {
97
+ "class": og.Graph,
93
98
  "input_factory": og.GraphInputFactory,
94
99
  "output_factory": og.GraphOutputFactory,
95
100
  "missing_files": og.check_graph_missing_files,
@@ -103,6 +108,7 @@ def geode_objects_dict():
103
108
  "is_viewable": True,
104
109
  },
105
110
  "HybridSolid3D": {
111
+ "class": og.HybridSolid3D,
106
112
  "input_factory": og.HybridSolidInputFactory3D,
107
113
  "output_factory": og.HybridSolidOutputFactory3D,
108
114
  "missing_files": og.check_hybrid_solid_missing_files3D,
@@ -124,6 +130,7 @@ def geode_objects_dict():
124
130
  },
125
131
  "ImplicitCrossSection": {
126
132
  "parent": "CrossSection",
133
+ "class": og_gs.ImplicitCrossSection,
127
134
  "input_factory": og_gs.ImplicitCrossSectionInputFactory,
128
135
  "output_factory": og_gs.ImplicitCrossSectionOutputFactory,
129
136
  "missing_files": og_gs.check_implicit_cross_section_missing_files,
@@ -145,6 +152,7 @@ def geode_objects_dict():
145
152
  },
146
153
  "ImplicitStructuralModel": {
147
154
  "parent": "StructuralModel",
155
+ "class": og_gs.ImplicitStructuralModel,
148
156
  "input_factory": og_gs.ImplicitStructuralModelInputFactory,
149
157
  "output_factory": og_gs.ImplicitStructuralModelOutputFactory,
150
158
  "missing_files": og_gs.check_implicit_structural_model_missing_files,
@@ -165,6 +173,7 @@ def geode_objects_dict():
165
173
  "inspector": og_inspector.inspect_brep,
166
174
  },
167
175
  "LightRegularGrid2D": {
176
+ "class": og.LightRegularGrid2D,
168
177
  "input_factory": og.LightRegularGridInputFactory2D,
169
178
  "output_factory": og.LightRegularGridOutputFactory2D,
170
179
  "missing_files": og.check_light_regular_grid_missing_files2D,
@@ -178,6 +187,7 @@ def geode_objects_dict():
178
187
  "save_viewable": g_v.save_viewable_light_regular_grid2D,
179
188
  },
180
189
  "LightRegularGrid3D": {
190
+ "class": og.LightRegularGrid3D,
181
191
  "input_factory": og.LightRegularGridInputFactory3D,
182
192
  "output_factory": og.LightRegularGridOutputFactory3D,
183
193
  "missing_files": og.check_light_regular_grid_missing_files3D,
@@ -191,6 +201,7 @@ def geode_objects_dict():
191
201
  "save_viewable": g_v.save_viewable_light_regular_grid3D,
192
202
  },
193
203
  "PointSet2D": {
204
+ "class": og.PointSet2D,
194
205
  "input_factory": og.PointSetInputFactory2D,
195
206
  "output_factory": og.PointSetOutputFactory2D,
196
207
  "missing_files": og.check_point_set_missing_files2D,
@@ -211,6 +222,7 @@ def geode_objects_dict():
211
222
  "inspector": og_inspector.inspect_point_set2D,
212
223
  },
213
224
  "PointSet3D": {
225
+ "class": og.PointSet3D,
214
226
  "input_factory": og.PointSetInputFactory3D,
215
227
  "output_factory": og.PointSetOutputFactory3D,
216
228
  "missing_files": og.check_point_set_missing_files3D,
@@ -231,6 +243,7 @@ def geode_objects_dict():
231
243
  "inspector": og_inspector.inspect_point_set3D,
232
244
  },
233
245
  "PolygonalSurface2D": {
246
+ "class": og.PolygonalSurface2D,
234
247
  "input_factory": og.PolygonalSurfaceInputFactory2D,
235
248
  "output_factory": og.PolygonalSurfaceOutputFactory2D,
236
249
  "missing_files": og.check_polygonal_surface_missing_files2D,
@@ -251,6 +264,7 @@ def geode_objects_dict():
251
264
  "inspector": og_inspector.inspect_surface2D,
252
265
  },
253
266
  "PolygonalSurface3D": {
267
+ "class": og.PolygonalSurface3D,
254
268
  "input_factory": og.PolygonalSurfaceInputFactory3D,
255
269
  "output_factory": og.PolygonalSurfaceOutputFactory3D,
256
270
  "missing_files": og.check_polygonal_surface_missing_files3D,
@@ -271,6 +285,7 @@ def geode_objects_dict():
271
285
  "inspector": og_inspector.inspect_surface3D,
272
286
  },
273
287
  "PolyhedralSolid3D": {
288
+ "class": og.PolyhedralSolid3D,
274
289
  "input_factory": og.PolyhedralSolidInputFactory3D,
275
290
  "output_factory": og.PolyhedralSolidOutputFactory3D,
276
291
  "missing_files": og.check_polyhedral_solid_missing_files3D,
@@ -291,6 +306,7 @@ def geode_objects_dict():
291
306
  "inspector": og_inspector.inspect_solid3D,
292
307
  },
293
308
  "RasterImage2D": {
309
+ "class": og.RasterImage2D,
294
310
  "input_factory": og.RasterImageInputFactory2D,
295
311
  "output_factory": og.RasterImageOutputFactory2D,
296
312
  "missing_files": og.check_raster_image_missing_files2D,
@@ -304,6 +320,7 @@ def geode_objects_dict():
304
320
  "save_viewable": g_v.save_viewable_raster_image2D,
305
321
  },
306
322
  "RasterImage3D": {
323
+ "class": og.RasterImage3D,
307
324
  "input_factory": og.RasterImageInputFactory3D,
308
325
  "output_factory": og.RasterImageOutputFactory3D,
309
326
  "missing_files": og.check_raster_image_missing_files3D,
@@ -317,6 +334,7 @@ def geode_objects_dict():
317
334
  "save_viewable": g_v.save_viewable_raster_image3D,
318
335
  },
319
336
  "RegularGrid2D": {
337
+ "class": og.RegularGrid2D,
320
338
  "input_factory": og.RegularGridInputFactory2D,
321
339
  "output_factory": og.RegularGridOutputFactory2D,
322
340
  "missing_files": og.check_regular_grid_missing_files2D,
@@ -336,6 +354,7 @@ def geode_objects_dict():
336
354
  "save_viewable": g_v.save_viewable_regular_grid2D,
337
355
  },
338
356
  "RegularGrid3D": {
357
+ "class": og.RegularGrid3D,
339
358
  "input_factory": og.RegularGridInputFactory3D,
340
359
  "output_factory": og.RegularGridOutputFactory3D,
341
360
  "missing_files": og.check_regular_grid_missing_files3D,
@@ -355,6 +374,7 @@ def geode_objects_dict():
355
374
  "save_viewable": g_v.save_viewable_regular_grid3D,
356
375
  },
357
376
  "Section": {
377
+ "class": og.Section,
358
378
  "input_factory": og.SectionInputFactory,
359
379
  "output_factory": og.SectionOutputFactory,
360
380
  "missing_files": og.check_section_missing_files,
@@ -376,6 +396,7 @@ def geode_objects_dict():
376
396
  },
377
397
  "StructuralModel": {
378
398
  "parent": "BRep",
399
+ "class": og_gs.StructuralModel,
379
400
  "input_factory": og_gs.StructuralModelInputFactory,
380
401
  "output_factory": og_gs.StructuralModelOutputFactory,
381
402
  "missing_files": og_gs.check_structural_model_missing_files,
@@ -396,6 +417,7 @@ def geode_objects_dict():
396
417
  "inspector": og_inspector.inspect_brep,
397
418
  },
398
419
  "TetrahedralSolid3D": {
420
+ "class": og.TetrahedralSolid3D,
399
421
  "input_factory": og.TetrahedralSolidInputFactory3D,
400
422
  "output_factory": og.TetrahedralSolidOutputFactory3D,
401
423
  "missing_files": og.check_tetrahedral_solid_missing_files3D,
@@ -416,6 +438,7 @@ def geode_objects_dict():
416
438
  "inspector": og_inspector.inspect_solid3D,
417
439
  },
418
440
  "TriangulatedSurface2D": {
441
+ "class": og.TriangulatedSurface2D,
419
442
  "input_factory": og.TriangulatedSurfaceInputFactory2D,
420
443
  "output_factory": og.TriangulatedSurfaceOutputFactory2D,
421
444
  "missing_files": og.check_triangulated_surface_missing_files2D,
@@ -436,6 +459,7 @@ def geode_objects_dict():
436
459
  "inspector": og_inspector.inspect_surface2D,
437
460
  },
438
461
  "TriangulatedSurface3D": {
462
+ "class": og.TriangulatedSurface3D,
439
463
  "input_factory": og.TriangulatedSurfaceInputFactory3D,
440
464
  "output_factory": og.TriangulatedSurfaceOutputFactory3D,
441
465
  "missing_files": og.check_triangulated_surface_missing_files3D,
@@ -456,6 +480,7 @@ def geode_objects_dict():
456
480
  "inspector": og_inspector.inspect_surface3D,
457
481
  },
458
482
  "VertexSet": {
483
+ "class": og.VertexSet,
459
484
  "input_factory": og.VertexSetInputFactory,
460
485
  "output_factory": og.VertexSetOutputFactory,
461
486
  "missing_files": og.check_vertex_set_missing_files,
@@ -5,9 +5,12 @@ import time
5
5
 
6
6
  # Third party imports
7
7
  import flask
8
- from .. import geode_functions, utils_functions
9
- import werkzeug
8
+ import opengeode
10
9
  import uuid
10
+ import werkzeug
11
+
12
+ # Local application imports
13
+ from .. import geode_functions, utils_functions
11
14
 
12
15
  routes = flask.Blueprint("routes", __name__)
13
16
 
@@ -271,6 +274,36 @@ def save_viewable_file():
271
274
  )
272
275
 
273
276
 
277
+ with open(os.path.join(schemas, "create_point.json"), "r") as file:
278
+ create_point_json = json.load(file)
279
+
280
+
281
+ @routes.route(create_point_json["route"], methods=create_point_json["methods"])
282
+ def create_point():
283
+ utils_functions.validate_request(flask.request, create_point_json)
284
+ DATA_FOLDER_PATH = flask.current_app.config["DATA_FOLDER_PATH"]
285
+ x = flask.request.json["x"]
286
+ y = flask.request.json["y"]
287
+ z = flask.request.json["z"]
288
+ class_ = geode_functions.geode_object_class("PointSet3D")
289
+ PointSet3D = class_.create()
290
+ builder = geode_functions.create_builder("PointSet3D", PointSet3D)
291
+ builder.create_point(opengeode.Point3D([x, y, z]))
292
+
293
+ generated_id = str(uuid.uuid4()).replace("-", "")
294
+ saved_viewable_file_path = geode_functions.save_viewable(
295
+ "PointSet3D", PointSet3D, DATA_FOLDER_PATH, generated_id
296
+ )
297
+
298
+ return flask.make_response(
299
+ {
300
+ "viewable_file_name": os.path.basename(saved_viewable_file_path),
301
+ "id": generated_id,
302
+ },
303
+ 200,
304
+ )
305
+
306
+
274
307
  with open(
275
308
  os.path.join(schemas, "ping.json"),
276
309
  "r",
@@ -0,0 +1,24 @@
1
+ {
2
+ "route": "/create_point",
3
+ "methods": [
4
+ "POST"
5
+ ],
6
+ "type": "object",
7
+ "properties": {
8
+ "x": {
9
+ "type": "number"
10
+ },
11
+ "y": {
12
+ "type": "number"
13
+ },
14
+ "z": {
15
+ "type": "number"
16
+ }
17
+ },
18
+ "required": [
19
+ "x",
20
+ "y",
21
+ "z"
22
+ ],
23
+ "additionalProperties": false
24
+ }