OpenGeodeWeb-Back 5.3.2rc1__tar.gz → 5.4.0rc2__tar.gz

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.
Files changed (34) hide show
  1. {opengeodeweb_back-5.3.2rc1/src/OpenGeodeWeb_Back.egg-info → opengeodeweb_back-5.4.0rc2}/PKG-INFO +18 -18
  2. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/pyproject.toml +1 -1
  3. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/requirements.txt +17 -17
  4. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO +18 -18
  5. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt +4 -0
  6. opengeodeweb_back-5.4.0rc2/src/OpenGeodeWeb_Back.egg-info/requires.txt +28 -0
  7. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/geode_functions.py +4 -0
  8. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/geode_objects.py +30 -0
  9. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/blueprint_routes.py +97 -2
  10. opengeodeweb_back-5.4.0rc2/src/opengeodeweb_back/routes/schemas/create_point.json +24 -0
  11. opengeodeweb_back-5.4.0rc2/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json +15 -0
  12. opengeodeweb_back-5.4.0rc2/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json +15 -0
  13. opengeodeweb_back-5.4.0rc2/src/opengeodeweb_back/test_utils.py +25 -0
  14. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/tests/test_geode_functions.py +5 -0
  15. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/tests/test_routes.py +97 -51
  16. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/tests/test_utils_functions.py +5 -0
  17. opengeodeweb_back-5.3.2rc1/src/OpenGeodeWeb_Back.egg-info/requires.txt +0 -28
  18. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/LICENSE +0 -0
  19. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/README.md +0 -0
  20. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/setup.cfg +0 -0
  21. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/OpenGeodeWeb_Back.egg-info/dependency_links.txt +0 -0
  22. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/OpenGeodeWeb_Back.egg-info/top_level.txt +0 -0
  23. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/__init__.py +0 -0
  24. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/app_config.py +0 -0
  25. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/allowed_files.json +0 -0
  26. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/allowed_objects.json +0 -0
  27. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json +0 -0
  28. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json +0 -0
  29. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/inspect_file.json +0 -0
  30. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/missing_files.json +0 -0
  31. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/ping.json +0 -0
  32. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/save_viewable_file.json +0 -0
  33. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/routes/schemas/upload_file.json +0 -0
  34. {opengeodeweb_back-5.3.2rc1 → opengeodeweb_back-5.4.0rc2}/src/opengeodeweb_back/utils_functions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 5.3.2rc1
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.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
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.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
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
- Requires-Dist: rpds-py==0.20.1
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>
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "OpenGeodeWeb-Back"
8
- version = "5.3.2-rc.1"
8
+ version = "5.4.0-rc.2"
9
9
  dynamic = ["dependencies"]
10
10
  authors = [
11
11
  { name="Geode-solutions", email="team-web@geode-solutions.com" },
@@ -10,22 +10,22 @@ attrs==24.2.0
10
10
  # via
11
11
  # jsonschema
12
12
  # referencing
13
- blinker==1.8.2
13
+ blinker==1.9.0
14
14
  # via flask
15
15
  click==8.1.7
16
16
  # via flask
17
- flask[async]==3.0.3
17
+ flask[async]==3.1.0
18
18
  # via
19
19
  # -r requirements.in
20
20
  # flask-cors
21
21
  flask-cors==5.0.0
22
22
  # via -r requirements.in
23
- geode-background==8.6.8
23
+ geode-background==8.7.5
24
24
  # via
25
25
  # geode-explicit
26
26
  # geode-implicit
27
27
  # geode-simplex
28
- geode-common==33.0.9
28
+ geode-common==33.1.3
29
29
  # via
30
30
  # -r requirements.in
31
31
  # geode-background
@@ -35,26 +35,26 @@ geode-common==33.0.9
35
35
  # geode-numerics
36
36
  # geode-simplex
37
37
  # geode-viewables
38
- geode-conversion==6.0.14
38
+ geode-conversion==6.0.18
39
39
  # via
40
40
  # geode-explicit
41
41
  # geode-implicit
42
- geode-explicit==6.1.14
42
+ geode-explicit==6.1.17
43
43
  # via
44
44
  # -r requirements.in
45
45
  # geode-implicit
46
- geode-implicit==3.3.2
46
+ geode-implicit==3.3.5
47
47
  # via -r requirements.in
48
- geode-numerics==5.1.8
48
+ geode-numerics==5.2.0
49
49
  # via
50
50
  # -r requirements.in
51
51
  # geode-implicit
52
52
  # geode-simplex
53
- geode-simplex==8.2.14
53
+ geode-simplex==8.2.18
54
54
  # via
55
55
  # -r requirements.in
56
56
  # geode-implicit
57
- geode-viewables==3.0.6
57
+ geode-viewables==3.0.8
58
58
  # via -r requirements.in
59
59
  itsdangerous==2.2.0
60
60
  # via flask
@@ -68,7 +68,7 @@ markupsafe==3.0.2
68
68
  # via
69
69
  # jinja2
70
70
  # werkzeug
71
- opengeode-core==15.6.1
71
+ opengeode-core==15.6.7
72
72
  # via
73
73
  # -r requirements.in
74
74
  # geode-background
@@ -83,23 +83,23 @@ opengeode-core==15.6.1
83
83
  # opengeode-geosciencesio
84
84
  # opengeode-inspector
85
85
  # opengeode-io
86
- opengeode-geosciences==8.1.1
86
+ opengeode-geosciences==8.2.0
87
87
  # via
88
88
  # -r requirements.in
89
89
  # geode-implicit
90
90
  # geode-viewables
91
91
  # opengeode-geosciencesio
92
- opengeode-geosciencesio==5.2.3
92
+ opengeode-geosciencesio==5.3.2
93
93
  # via
94
94
  # -r requirements.in
95
95
  # geode-implicit
96
- opengeode-inspector==6.1.10
96
+ opengeode-inspector==6.1.15
97
97
  # via
98
98
  # -r requirements.in
99
99
  # geode-explicit
100
100
  # geode-implicit
101
101
  # geode-simplex
102
- opengeode-io==7.0.5
102
+ opengeode-io==7.0.7
103
103
  # via
104
104
  # -r requirements.in
105
105
  # geode-implicit
@@ -109,13 +109,13 @@ referencing==0.35.1
109
109
  # via
110
110
  # jsonschema
111
111
  # jsonschema-specifications
112
- rpds-py==0.20.1
112
+ rpds-py==0.21.0
113
113
  # via
114
114
  # jsonschema
115
115
  # referencing
116
116
  typing-extensions==4.12.2
117
117
  # via asgiref
118
- werkzeug==3.1.2
118
+ werkzeug==3.1.3
119
119
  # via
120
120
  # -r requirements.in
121
121
  # flask
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenGeodeWeb-Back
3
- Version: 5.3.2rc1
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.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
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.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
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
- Requires-Dist: rpds-py==0.20.1
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>
@@ -11,17 +11,21 @@ src/opengeodeweb_back/__init__.py
11
11
  src/opengeodeweb_back/app_config.py
12
12
  src/opengeodeweb_back/geode_functions.py
13
13
  src/opengeodeweb_back/geode_objects.py
14
+ src/opengeodeweb_back/test_utils.py
14
15
  src/opengeodeweb_back/utils_functions.py
15
16
  src/opengeodeweb_back/routes/blueprint_routes.py
16
17
  src/opengeodeweb_back/routes/schemas/allowed_files.json
17
18
  src/opengeodeweb_back/routes/schemas/allowed_objects.json
19
+ src/opengeodeweb_back/routes/schemas/create_point.json
18
20
  src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.json
19
21
  src/opengeodeweb_back/routes/schemas/geographic_coordinate_systems.json
20
22
  src/opengeodeweb_back/routes/schemas/inspect_file.json
21
23
  src/opengeodeweb_back/routes/schemas/missing_files.json
22
24
  src/opengeodeweb_back/routes/schemas/ping.json
25
+ src/opengeodeweb_back/routes/schemas/polygon_attribute_names.json
23
26
  src/opengeodeweb_back/routes/schemas/save_viewable_file.json
24
27
  src/opengeodeweb_back/routes/schemas/upload_file.json
28
+ src/opengeodeweb_back/routes/schemas/vertex_attribute_names.json
25
29
  tests/test_geode_functions.py
26
30
  tests/test_routes.py
27
31
  tests/test_utils_functions.py
@@ -0,0 +1,28 @@
1
+ asgiref==3.8.1
2
+ attrs==24.2.0
3
+ blinker==1.9.0
4
+ click==8.1.7
5
+ flask[async]==3.1.0
6
+ flask-cors==5.0.0
7
+ geode-background==8.7.5
8
+ geode-common==33.1.3
9
+ geode-conversion==6.0.18
10
+ geode-explicit==6.1.17
11
+ geode-implicit==3.3.5
12
+ geode-numerics==5.2.0
13
+ geode-simplex==8.2.18
14
+ geode-viewables==3.0.8
15
+ itsdangerous==2.2.0
16
+ jinja2==3.1.4
17
+ jsonschema==4.23.0
18
+ jsonschema-specifications==2024.10.1
19
+ markupsafe==3.0.2
20
+ opengeode-core==15.6.7
21
+ opengeode-geosciences==8.2.0
22
+ opengeode-geosciencesio==5.3.2
23
+ opengeode-inspector==6.1.15
24
+ opengeode-io==7.0.7
25
+ referencing==0.35.1
26
+ rpds-py==0.21.0
27
+ typing-extensions==4.12.2
28
+ werkzeug==3.1.3
@@ -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
 
@@ -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,10 +8,13 @@ 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 {
11
16
  "BRep": {
17
+ "class": og.BRep,
12
18
  "input_factory": og.BRepInputFactory,
13
19
  "output_factory": og.BRepOutputFactory,
14
20
  "missing_files": og.check_brep_missing_files,
@@ -30,6 +36,7 @@ def geode_objects_dict():
30
36
  },
31
37
  "CrossSection": {
32
38
  "parent": "Section",
39
+ "class": og_gs.CrossSection,
33
40
  "input_factory": og_gs.CrossSectionInputFactory,
34
41
  "output_factory": og_gs.CrossSectionOutputFactory,
35
42
  "missing_files": og_gs.check_cross_section_missing_files,
@@ -50,6 +57,7 @@ def geode_objects_dict():
50
57
  "inspector": og_inspector.inspect_section,
51
58
  },
52
59
  "EdgedCurve2D": {
60
+ "class": og.EdgedCurve2D,
53
61
  "input_factory": og.EdgedCurveInputFactory2D,
54
62
  "output_factory": og.EdgedCurveOutputFactory2D,
55
63
  "missing_files": og.check_edged_curve_missing_files2D,
@@ -70,6 +78,7 @@ def geode_objects_dict():
70
78
  "inspector": og_inspector.inspect_edged_curve2D,
71
79
  },
72
80
  "EdgedCurve3D": {
81
+ "class": og.EdgedCurve3D,
73
82
  "input_factory": og.EdgedCurveInputFactory3D,
74
83
  "output_factory": og.EdgedCurveOutputFactory3D,
75
84
  "missing_files": og.check_edged_curve_missing_files3D,
@@ -90,6 +99,7 @@ def geode_objects_dict():
90
99
  "inspector": og_inspector.inspect_edged_curve3D,
91
100
  },
92
101
  "Graph": {
102
+ "class": og.Graph,
93
103
  "input_factory": og.GraphInputFactory,
94
104
  "output_factory": og.GraphOutputFactory,
95
105
  "missing_files": og.check_graph_missing_files,
@@ -103,6 +113,7 @@ def geode_objects_dict():
103
113
  "is_viewable": True,
104
114
  },
105
115
  "HybridSolid3D": {
116
+ "class": og.HybridSolid3D,
106
117
  "input_factory": og.HybridSolidInputFactory3D,
107
118
  "output_factory": og.HybridSolidOutputFactory3D,
108
119
  "missing_files": og.check_hybrid_solid_missing_files3D,
@@ -124,6 +135,7 @@ def geode_objects_dict():
124
135
  },
125
136
  "ImplicitCrossSection": {
126
137
  "parent": "CrossSection",
138
+ "class": og_gs.ImplicitCrossSection,
127
139
  "input_factory": og_gs.ImplicitCrossSectionInputFactory,
128
140
  "output_factory": og_gs.ImplicitCrossSectionOutputFactory,
129
141
  "missing_files": og_gs.check_implicit_cross_section_missing_files,
@@ -145,6 +157,7 @@ def geode_objects_dict():
145
157
  },
146
158
  "ImplicitStructuralModel": {
147
159
  "parent": "StructuralModel",
160
+ "class": og_gs.ImplicitStructuralModel,
148
161
  "input_factory": og_gs.ImplicitStructuralModelInputFactory,
149
162
  "output_factory": og_gs.ImplicitStructuralModelOutputFactory,
150
163
  "missing_files": og_gs.check_implicit_structural_model_missing_files,
@@ -165,6 +178,7 @@ def geode_objects_dict():
165
178
  "inspector": og_inspector.inspect_brep,
166
179
  },
167
180
  "LightRegularGrid2D": {
181
+ "class": og.LightRegularGrid2D,
168
182
  "input_factory": og.LightRegularGridInputFactory2D,
169
183
  "output_factory": og.LightRegularGridOutputFactory2D,
170
184
  "missing_files": og.check_light_regular_grid_missing_files2D,
@@ -178,6 +192,7 @@ def geode_objects_dict():
178
192
  "save_viewable": g_v.save_viewable_light_regular_grid2D,
179
193
  },
180
194
  "LightRegularGrid3D": {
195
+ "class": og.LightRegularGrid3D,
181
196
  "input_factory": og.LightRegularGridInputFactory3D,
182
197
  "output_factory": og.LightRegularGridOutputFactory3D,
183
198
  "missing_files": og.check_light_regular_grid_missing_files3D,
@@ -191,6 +206,7 @@ def geode_objects_dict():
191
206
  "save_viewable": g_v.save_viewable_light_regular_grid3D,
192
207
  },
193
208
  "PointSet2D": {
209
+ "class": og.PointSet2D,
194
210
  "input_factory": og.PointSetInputFactory2D,
195
211
  "output_factory": og.PointSetOutputFactory2D,
196
212
  "missing_files": og.check_point_set_missing_files2D,
@@ -211,6 +227,7 @@ def geode_objects_dict():
211
227
  "inspector": og_inspector.inspect_point_set2D,
212
228
  },
213
229
  "PointSet3D": {
230
+ "class": og.PointSet3D,
214
231
  "input_factory": og.PointSetInputFactory3D,
215
232
  "output_factory": og.PointSetOutputFactory3D,
216
233
  "missing_files": og.check_point_set_missing_files3D,
@@ -231,6 +248,7 @@ def geode_objects_dict():
231
248
  "inspector": og_inspector.inspect_point_set3D,
232
249
  },
233
250
  "PolygonalSurface2D": {
251
+ "class": og.PolygonalSurface2D,
234
252
  "input_factory": og.PolygonalSurfaceInputFactory2D,
235
253
  "output_factory": og.PolygonalSurfaceOutputFactory2D,
236
254
  "missing_files": og.check_polygonal_surface_missing_files2D,
@@ -251,6 +269,7 @@ def geode_objects_dict():
251
269
  "inspector": og_inspector.inspect_surface2D,
252
270
  },
253
271
  "PolygonalSurface3D": {
272
+ "class": og.PolygonalSurface3D,
254
273
  "input_factory": og.PolygonalSurfaceInputFactory3D,
255
274
  "output_factory": og.PolygonalSurfaceOutputFactory3D,
256
275
  "missing_files": og.check_polygonal_surface_missing_files3D,
@@ -271,6 +290,7 @@ def geode_objects_dict():
271
290
  "inspector": og_inspector.inspect_surface3D,
272
291
  },
273
292
  "PolyhedralSolid3D": {
293
+ "class": og.PolyhedralSolid3D,
274
294
  "input_factory": og.PolyhedralSolidInputFactory3D,
275
295
  "output_factory": og.PolyhedralSolidOutputFactory3D,
276
296
  "missing_files": og.check_polyhedral_solid_missing_files3D,
@@ -291,6 +311,7 @@ def geode_objects_dict():
291
311
  "inspector": og_inspector.inspect_solid3D,
292
312
  },
293
313
  "RasterImage2D": {
314
+ "class": og.RasterImage2D,
294
315
  "input_factory": og.RasterImageInputFactory2D,
295
316
  "output_factory": og.RasterImageOutputFactory2D,
296
317
  "missing_files": og.check_raster_image_missing_files2D,
@@ -304,6 +325,7 @@ def geode_objects_dict():
304
325
  "save_viewable": g_v.save_viewable_raster_image2D,
305
326
  },
306
327
  "RasterImage3D": {
328
+ "class": og.RasterImage3D,
307
329
  "input_factory": og.RasterImageInputFactory3D,
308
330
  "output_factory": og.RasterImageOutputFactory3D,
309
331
  "missing_files": og.check_raster_image_missing_files3D,
@@ -317,6 +339,7 @@ def geode_objects_dict():
317
339
  "save_viewable": g_v.save_viewable_raster_image3D,
318
340
  },
319
341
  "RegularGrid2D": {
342
+ "class": og.RegularGrid2D,
320
343
  "input_factory": og.RegularGridInputFactory2D,
321
344
  "output_factory": og.RegularGridOutputFactory2D,
322
345
  "missing_files": og.check_regular_grid_missing_files2D,
@@ -336,6 +359,7 @@ def geode_objects_dict():
336
359
  "save_viewable": g_v.save_viewable_regular_grid2D,
337
360
  },
338
361
  "RegularGrid3D": {
362
+ "class": og.RegularGrid3D,
339
363
  "input_factory": og.RegularGridInputFactory3D,
340
364
  "output_factory": og.RegularGridOutputFactory3D,
341
365
  "missing_files": og.check_regular_grid_missing_files3D,
@@ -355,6 +379,7 @@ def geode_objects_dict():
355
379
  "save_viewable": g_v.save_viewable_regular_grid3D,
356
380
  },
357
381
  "Section": {
382
+ "class": og.Section,
358
383
  "input_factory": og.SectionInputFactory,
359
384
  "output_factory": og.SectionOutputFactory,
360
385
  "missing_files": og.check_section_missing_files,
@@ -376,6 +401,7 @@ def geode_objects_dict():
376
401
  },
377
402
  "StructuralModel": {
378
403
  "parent": "BRep",
404
+ "class": og_gs.StructuralModel,
379
405
  "input_factory": og_gs.StructuralModelInputFactory,
380
406
  "output_factory": og_gs.StructuralModelOutputFactory,
381
407
  "missing_files": og_gs.check_structural_model_missing_files,
@@ -396,6 +422,7 @@ def geode_objects_dict():
396
422
  "inspector": og_inspector.inspect_brep,
397
423
  },
398
424
  "TetrahedralSolid3D": {
425
+ "class": og.TetrahedralSolid3D,
399
426
  "input_factory": og.TetrahedralSolidInputFactory3D,
400
427
  "output_factory": og.TetrahedralSolidOutputFactory3D,
401
428
  "missing_files": og.check_tetrahedral_solid_missing_files3D,
@@ -416,6 +443,7 @@ def geode_objects_dict():
416
443
  "inspector": og_inspector.inspect_solid3D,
417
444
  },
418
445
  "TriangulatedSurface2D": {
446
+ "class": og.TriangulatedSurface2D,
419
447
  "input_factory": og.TriangulatedSurfaceInputFactory2D,
420
448
  "output_factory": og.TriangulatedSurfaceOutputFactory2D,
421
449
  "missing_files": og.check_triangulated_surface_missing_files2D,
@@ -436,6 +464,7 @@ def geode_objects_dict():
436
464
  "inspector": og_inspector.inspect_surface2D,
437
465
  },
438
466
  "TriangulatedSurface3D": {
467
+ "class": og.TriangulatedSurface3D,
439
468
  "input_factory": og.TriangulatedSurfaceInputFactory3D,
440
469
  "output_factory": og.TriangulatedSurfaceOutputFactory3D,
441
470
  "missing_files": og.check_triangulated_surface_missing_files3D,
@@ -456,6 +485,7 @@ def geode_objects_dict():
456
485
  "inspector": og_inspector.inspect_surface3D,
457
486
  },
458
487
  "VertexSet": {
488
+ "class": og.VertexSet,
459
489
  "input_factory": og.VertexSetInputFactory,
460
490
  "output_factory": og.VertexSetOutputFactory,
461
491
  "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,98 @@ 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
+
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
+
274
369
  with open(
275
370
  os.path.join(schemas, "ping.json"),
276
371
  "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
+ }
@@ -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
+ )
@@ -1,5 +1,10 @@
1
+ # Standard library imports
1
2
  import os
2
3
  import uuid
4
+
5
+ # Third party imports
6
+
7
+ # Local application imports
3
8
  from src.opengeodeweb_back import geode_functions, geode_objects
4
9
 
5
10
 
@@ -1,17 +1,28 @@
1
- import os
1
+ # Standard library imports
2
2
  import base64
3
+ import os
4
+
5
+ # Third party imports
3
6
  from werkzeug.datastructures import FileStorage
4
7
 
8
+ # Local application imports
9
+ from src.opengeodeweb_back import test_utils
10
+
5
11
 
6
12
  def test_allowed_files(client):
7
13
  route = f"/allowed_files"
8
- response = client.post(route, json={"supported_feature": None})
14
+ get_full_data = lambda: {"supported_feature": "None"}
15
+ json = get_full_data()
16
+ response = client.post(route, json=json)
9
17
  assert response.status_code == 200
10
18
  extensions = response.json["extensions"]
11
19
  assert type(extensions) is list
12
20
  for extension in extensions:
13
21
  assert type(extension) is str
14
22
 
23
+ # Test all params
24
+ test_utils.test_route_wrong_params(client, route, get_full_data)
25
+
15
26
 
16
27
  def test_allowed_objects(client):
17
28
  route = f"/allowed_objects"
@@ -30,13 +41,8 @@ def test_allowed_objects(client):
30
41
  for allowed_object in allowed_objects:
31
42
  assert type(allowed_object) is str
32
43
 
33
- for key, value in get_full_data().items():
34
- json = get_full_data()
35
- json.pop(key)
36
- response = client.post(route, json=json)
37
- assert response.status_code == 400
38
- error_description = response.json["description"]
39
- assert error_description == f"Validation error: '{key}' is a required property"
44
+ # Test all params
45
+ test_utils.test_route_wrong_params(client, route, get_full_data)
40
46
 
41
47
 
42
48
  def test_upload_file(client):
@@ -58,11 +64,7 @@ def test_missing_files(client):
58
64
  }
59
65
 
60
66
  json = get_full_data()
61
- response = client.post(
62
- route,
63
- json=json,
64
- )
65
-
67
+ response = client.post(route, json=json)
66
68
  assert response.status_code == 200
67
69
  has_missing_files = response.json["has_missing_files"]
68
70
  mandatory_files = response.json["mandatory_files"]
@@ -71,33 +73,23 @@ def test_missing_files(client):
71
73
  assert type(mandatory_files) is list
72
74
  assert type(additional_files) is list
73
75
 
74
- for key, value in get_full_data().items():
75
- json = get_full_data()
76
- json.pop(key)
77
- response = client.post(route, json=json)
78
- assert response.status_code == 400
79
- error_description = response.json["description"]
80
- assert error_description == f"Validation error: '{key}' is a required property"
76
+ # Test all params
77
+ test_utils.test_route_wrong_params(client, route, get_full_data)
81
78
 
82
79
 
83
80
  def test_geographic_coordinate_systems(client):
84
81
  route = f"/geographic_coordinate_systems"
85
-
82
+ get_full_data = lambda: {"input_geode_object": "BRep"}
86
83
  # Normal test with geode_object 'BRep'
87
- response = client.post(route, json={"input_geode_object": "BRep"})
84
+ response = client.post(route, json=get_full_data())
88
85
  assert response.status_code == 200
89
86
  crs_list = response.json["crs_list"]
90
87
  assert type(crs_list) is list
91
88
  for crs in crs_list:
92
89
  assert type(crs) is dict
93
90
 
94
- # Test without geode_object
95
- response = client.post(route, json={})
96
- assert response.status_code == 400
97
- error_message = response.json["description"]
98
- assert (
99
- error_message == "Validation error: 'input_geode_object' is a required property"
100
- )
91
+ # Test all params
92
+ test_utils.test_route_wrong_params(client, route, get_full_data)
101
93
 
102
94
 
103
95
  def test_inspect_file(client):
@@ -117,13 +109,8 @@ def test_inspect_file(client):
117
109
  inspection_result = response.json["inspection_result"]
118
110
  assert type(inspection_result) is dict
119
111
 
120
- for key, value in get_full_data().items():
121
- json = get_full_data()
122
- json.pop(key)
123
- response = client.post(route, json=json)
124
- assert response.status_code == 400
125
- error_description = response.json["description"]
126
- assert error_description == f"Validation error: '{key}' is a required property"
112
+ # Test all params
113
+ test_utils.test_route_wrong_params(client, route, get_full_data)
127
114
 
128
115
 
129
116
  def test_geode_objects_and_output_extensions(client):
@@ -148,13 +135,8 @@ def test_geode_objects_and_output_extensions(client):
148
135
  assert type(value) is dict
149
136
  assert type(value["is_saveable"]) is bool
150
137
 
151
- # Test without input_geode_object
152
- response = client.post(route, json={})
153
- assert response.status_code == 400
154
- error_message = response.json["description"]
155
- assert (
156
- error_message == "Validation error: 'input_geode_object' is a required property"
157
- )
138
+ # Test all params
139
+ test_utils.test_route_wrong_params(client, route, get_full_data)
158
140
 
159
141
 
160
142
  def test_save_viewable_file(client):
@@ -178,10 +160,74 @@ def test_save_viewable_file(client):
178
160
  id = response.json["id"]
179
161
  assert type(id) is str
180
162
 
181
- for key, value in get_full_data().items():
182
- json = get_full_data()
183
- json.pop(key)
184
- response = client.post(route, json=json)
185
- assert response.status_code == 400
186
- error_description = response.json["description"]
187
- assert error_description == f"Validation error: '{key}' is a required property"
163
+ # Test all params
164
+ test_utils.test_route_wrong_params(client, route, get_full_data)
165
+
166
+
167
+ def test_vertex_attribute_names(client):
168
+ response = client.put(
169
+ f"/upload_file",
170
+ data={"file": FileStorage(open("./tests/vertex_attribute.vtp", "rb"))},
171
+ )
172
+ assert response.status_code == 201
173
+
174
+ route = f"/vertex_attribute_names"
175
+
176
+ def get_full_data():
177
+ return {
178
+ "input_geode_object": "PolygonalSurface3D",
179
+ "filename": "vertex_attribute.vtp",
180
+ }
181
+
182
+ # Normal test with filename 'vertex_attribute.vtp'
183
+ response = client.post(route, json=get_full_data())
184
+ assert response.status_code == 200
185
+ vertex_attribute_names = response.json["vertex_attribute_names"]
186
+ assert type(vertex_attribute_names) is list
187
+ for vertex_attribute_name in vertex_attribute_names:
188
+ assert type(vertex_attribute_name) is str
189
+
190
+ test_utils.test_route_wrong_params(client, route, get_full_data)
191
+
192
+
193
+ def test_polygon_attribute_names(client):
194
+ response = client.put(
195
+ f"/upload_file",
196
+ data={"file": FileStorage(open("./tests/polygon_attribute.vtp", "rb"))},
197
+ )
198
+ assert response.status_code == 201
199
+
200
+ route = f"/polygon_attribute_names"
201
+
202
+ def get_full_data():
203
+ return {
204
+ "input_geode_object": "PolygonalSurface3D",
205
+ "filename": "polygon_attribute.vtp",
206
+ }
207
+
208
+ # Normal test with filename 'vertex_attribute.vtp'
209
+ response = client.post(route, json=get_full_data())
210
+ assert response.status_code == 200
211
+ polygon_attribute_names = response.json["polygon_attribute_names"]
212
+ assert type(polygon_attribute_names) is list
213
+ for polygon_attribute_name in polygon_attribute_names:
214
+ assert type(polygon_attribute_name) is str
215
+
216
+ # Test all params
217
+ test_utils.test_route_wrong_params(client, route, get_full_data)
218
+
219
+
220
+ def test_create_point(client):
221
+ route = f"/create_point"
222
+ get_full_data = lambda: {"x": 1, "y": 2, "z": 3}
223
+
224
+ # Normal test with all keys
225
+ response = client.post(route, json=get_full_data())
226
+ assert response.status_code == 200
227
+ viewable_file_name = response.json["viewable_file_name"]
228
+ assert type(viewable_file_name) is str
229
+ id = response.json["id"]
230
+ assert type(id) is str
231
+
232
+ # Test all params
233
+ test_utils.test_route_wrong_params(client, route, get_full_data)
@@ -1,4 +1,9 @@
1
+ # Standard library imports
2
+
3
+ # Third party imports
1
4
  import flask
5
+
6
+ # Local application imports
2
7
  from src.opengeodeweb_back import utils_functions
3
8
 
4
9
 
@@ -1,28 +0,0 @@
1
- asgiref==3.8.1
2
- attrs==24.2.0
3
- blinker==1.8.2
4
- click==8.1.7
5
- flask[async]==3.0.3
6
- flask-cors==5.0.0
7
- geode-background==8.6.8
8
- geode-common==33.0.9
9
- geode-conversion==6.0.14
10
- geode-explicit==6.1.14
11
- geode-implicit==3.3.2
12
- geode-numerics==5.1.8
13
- geode-simplex==8.2.14
14
- geode-viewables==3.0.6
15
- itsdangerous==2.2.0
16
- jinja2==3.1.4
17
- jsonschema==4.23.0
18
- jsonschema-specifications==2024.10.1
19
- markupsafe==3.0.2
20
- opengeode-core==15.6.1
21
- opengeode-geosciences==8.1.1
22
- opengeode-geosciencesio==5.2.3
23
- opengeode-inspector==6.1.10
24
- opengeode-io==7.0.5
25
- referencing==0.35.1
26
- rpds-py==0.20.1
27
- typing-extensions==4.12.2
28
- werkzeug==3.1.2