OpenGeodeWeb-Back 3.0.0rc10__tar.gz → 3.0.0rc11__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.
- {OpenGeodeWeb-Back-3.0.0rc10/src/OpenGeodeWeb_Back.egg-info → OpenGeodeWeb-Back-3.0.0rc11}/PKG-INFO +1 -1
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/pyproject.toml +1 -1
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO +1 -1
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/opengeodeweb_back/geode_functions.py +32 -24
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/opengeodeweb_back/geode_objects.py +21 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/tests/test_functions.py +63 -42
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/LICENSE +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/README.md +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/requirements.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/setup.cfg +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/OpenGeodeWeb_Back.egg-info/SOURCES.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/OpenGeodeWeb_Back.egg-info/dependency_links.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/OpenGeodeWeb_Back.egg-info/requires.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/OpenGeodeWeb_Back.egg-info/top_level.txt +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/opengeodeweb_back/__init__.py +0 -0
- {OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/opengeodeweb_back/inspector_functions.py +0 -0
{OpenGeodeWeb-Back-3.0.0rc10/src/OpenGeodeWeb_Back.egg-info → OpenGeodeWeb-Back-3.0.0rc11}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.0rc11
|
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
|
{OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11/src/OpenGeodeWeb_Back.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.0rc11
|
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
|
{OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/opengeodeweb_back/geode_functions.py
RENAMED
@@ -34,6 +34,10 @@ def missing_files(geode_object: str, file_absolute_path: str):
|
|
34
34
|
return geode_object_value(geode_object)["missing_files"](file_absolute_path)
|
35
35
|
|
36
36
|
|
37
|
+
def is_loadable(geode_object: str, file_absolute_path: str):
|
38
|
+
return geode_object_value(geode_object)["is_loadable"](file_absolute_path)
|
39
|
+
|
40
|
+
|
37
41
|
def load(geode_object: str, file_absolute_path: str):
|
38
42
|
return geode_object_value(geode_object)["load"](file_absolute_path)
|
39
43
|
|
@@ -109,18 +113,26 @@ def geode_object_output_extensions(geode_object: str):
|
|
109
113
|
return geode_object_output_list_creators
|
110
114
|
|
111
115
|
|
112
|
-
def
|
113
|
-
|
116
|
+
def filter_geode_objects(key: str = None):
|
117
|
+
geode_objects_filtered_list = []
|
114
118
|
for geode_object, value in geode_objects_dict().items():
|
115
|
-
if key != None:
|
119
|
+
if key != None and key != "":
|
116
120
|
if key in value:
|
117
121
|
if type(value[key]) == bool:
|
118
|
-
|
119
|
-
extensions_list += geode_object_input_extensions(geode_object)
|
122
|
+
geode_objects_filtered_list.append(geode_object)
|
120
123
|
else:
|
121
|
-
|
124
|
+
geode_objects_filtered_list.append(geode_object)
|
122
125
|
else:
|
123
|
-
|
126
|
+
geode_objects_filtered_list.append(geode_object)
|
127
|
+
geode_objects_filtered_list.sort()
|
128
|
+
return geode_objects_filtered_list
|
129
|
+
|
130
|
+
|
131
|
+
def list_input_extensions(key: str = None):
|
132
|
+
extensions_list = []
|
133
|
+
geode_objects_filtered_list = filter_geode_objects(key)
|
134
|
+
for geode_object in geode_objects_filtered_list:
|
135
|
+
extensions_list += geode_object_input_extensions(geode_object)
|
124
136
|
|
125
137
|
extensions_list = list(set(extensions_list))
|
126
138
|
extensions_list.sort()
|
@@ -131,23 +143,19 @@ def has_creator(geode_object: str, extension: str):
|
|
131
143
|
return input_factory(geode_object).has_creator(extension)
|
132
144
|
|
133
145
|
|
134
|
-
def list_geode_objects(
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
geode_objects_list.append(geode_object)
|
148
|
-
|
149
|
-
geode_objects_list.sort()
|
150
|
-
return geode_objects_list
|
146
|
+
def list_geode_objects(
|
147
|
+
file_absolute_path: str,
|
148
|
+
key: str = None,
|
149
|
+
):
|
150
|
+
return_dict = {}
|
151
|
+
file_extension = extension_from_filename(os.path.basename(file_absolute_path))
|
152
|
+
geode_objects_filtered_list = filter_geode_objects(key)
|
153
|
+
|
154
|
+
for geode_object in geode_objects_filtered_list:
|
155
|
+
if has_creator(geode_object, file_extension):
|
156
|
+
file_is_loadable = is_loadable(geode_object, file_absolute_path)
|
157
|
+
return_dict[geode_object] = {"is_loadable": file_is_loadable}
|
158
|
+
return return_dict
|
151
159
|
|
152
160
|
|
153
161
|
def geode_objects_output_extensions(geode_object: str, data):
|
{OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/opengeodeweb_back/geode_objects.py
RENAMED
@@ -12,6 +12,7 @@ def geode_objects_dict():
|
|
12
12
|
"input_factory": og.BRepInputFactory,
|
13
13
|
"output_factory": og.BRepOutputFactory,
|
14
14
|
"missing_files": og.check_brep_missing_files,
|
15
|
+
"is_loadable": og.is_brep_loadable,
|
15
16
|
"load": og.load_brep,
|
16
17
|
"is_saveable": og.is_brep_saveable,
|
17
18
|
"save": og.save_brep,
|
@@ -32,6 +33,7 @@ def geode_objects_dict():
|
|
32
33
|
"input_factory": og_gs.CrossSectionInputFactory,
|
33
34
|
"output_factory": og_gs.CrossSectionOutputFactory,
|
34
35
|
"missing_files": og_gs.check_cross_section_missing_files,
|
36
|
+
"is_loadable": og_gs.is_cross_section_loadable,
|
35
37
|
"load": og_gs.load_cross_section,
|
36
38
|
"is_saveable": og_gs.is_cross_section_saveable,
|
37
39
|
"save": og_gs.save_cross_section,
|
@@ -51,6 +53,7 @@ def geode_objects_dict():
|
|
51
53
|
"input_factory": og.EdgedCurveInputFactory2D,
|
52
54
|
"output_factory": og.EdgedCurveOutputFactory2D,
|
53
55
|
"missing_files": og.check_edged_curve_missing_files2D,
|
56
|
+
"is_loadable": og.is_edged_curve_loadable2D,
|
54
57
|
"load": og.load_edged_curve2D,
|
55
58
|
"is_saveable": og.is_edged_curve_saveable2D,
|
56
59
|
"save": og.save_edged_curve2D,
|
@@ -70,6 +73,7 @@ def geode_objects_dict():
|
|
70
73
|
"input_factory": og.EdgedCurveInputFactory3D,
|
71
74
|
"output_factory": og.EdgedCurveOutputFactory3D,
|
72
75
|
"missing_files": og.check_edged_curve_missing_files3D,
|
76
|
+
"is_loadable": og.is_edged_curve_loadable3D,
|
73
77
|
"load": og.load_edged_curve3D,
|
74
78
|
"is_saveable": og.is_edged_curve_saveable3D,
|
75
79
|
"save": og.save_edged_curve3D,
|
@@ -89,6 +93,7 @@ def geode_objects_dict():
|
|
89
93
|
"input_factory": og.GraphInputFactory,
|
90
94
|
"output_factory": og.GraphOutputFactory,
|
91
95
|
"missing_files": og.check_graph_missing_files,
|
96
|
+
"is_loadable": og.is_graph_loadable,
|
92
97
|
"load": og.load_graph,
|
93
98
|
"is_saveable": og.is_graph_saveable,
|
94
99
|
"save": og.save_graph,
|
@@ -101,6 +106,7 @@ def geode_objects_dict():
|
|
101
106
|
"input_factory": og.HybridSolidInputFactory3D,
|
102
107
|
"output_factory": og.HybridSolidOutputFactory3D,
|
103
108
|
"missing_files": og.check_hybrid_solid_missing_files3D,
|
109
|
+
"is_loadable": og.is_hybrid_solid_loadable3D,
|
104
110
|
"load": og.load_hybrid_solid3D,
|
105
111
|
"is_saveable": og.is_hybrid_solid_saveable3D,
|
106
112
|
"save": og.save_hybrid_solid3D,
|
@@ -120,6 +126,7 @@ def geode_objects_dict():
|
|
120
126
|
"input_factory": og.PointSetInputFactory2D,
|
121
127
|
"output_factory": og.PointSetOutputFactory2D,
|
122
128
|
"missing_files": og.check_point_set_missing_files2D,
|
129
|
+
"is_loadable": og.is_point_set_loadable2D,
|
123
130
|
"load": og.load_point_set2D,
|
124
131
|
"is_saveable": og.is_point_set_saveable2D,
|
125
132
|
"save": og.save_point_set2D,
|
@@ -139,6 +146,7 @@ def geode_objects_dict():
|
|
139
146
|
"input_factory": og.PointSetInputFactory3D,
|
140
147
|
"output_factory": og.PointSetOutputFactory3D,
|
141
148
|
"missing_files": og.check_point_set_missing_files3D,
|
149
|
+
"is_loadable": og.is_point_set_loadable3D,
|
142
150
|
"load": og.load_point_set3D,
|
143
151
|
"is_saveable": og.is_point_set_saveable3D,
|
144
152
|
"save": og.save_point_set3D,
|
@@ -158,6 +166,7 @@ def geode_objects_dict():
|
|
158
166
|
"input_factory": og.PolygonalSurfaceInputFactory2D,
|
159
167
|
"output_factory": og.PolygonalSurfaceOutputFactory2D,
|
160
168
|
"missing_files": og.check_polygonal_surface_missing_files2D,
|
169
|
+
"is_loadable": og.is_polygonal_surface_loadable2D,
|
161
170
|
"load": og.load_polygonal_surface2D,
|
162
171
|
"is_saveable": og.is_polygonal_surface_saveable2D,
|
163
172
|
"save": og.save_polygonal_surface2D,
|
@@ -177,6 +186,7 @@ def geode_objects_dict():
|
|
177
186
|
"input_factory": og.PolygonalSurfaceInputFactory3D,
|
178
187
|
"output_factory": og.PolygonalSurfaceOutputFactory3D,
|
179
188
|
"missing_files": og.check_polygonal_surface_missing_files3D,
|
189
|
+
"is_loadable": og.is_polygonal_surface_loadable3D,
|
180
190
|
"load": og.load_polygonal_surface3D,
|
181
191
|
"is_saveable": og.is_polygonal_surface_saveable3D,
|
182
192
|
"save": og.save_polygonal_surface3D,
|
@@ -196,6 +206,7 @@ def geode_objects_dict():
|
|
196
206
|
"input_factory": og.PolyhedralSolidInputFactory3D,
|
197
207
|
"output_factory": og.PolyhedralSolidOutputFactory3D,
|
198
208
|
"missing_files": og.check_polyhedral_solid_missing_files3D,
|
209
|
+
"is_loadable": og.is_polyhedral_solid_loadable3D,
|
199
210
|
"load": og.load_polyhedral_solid3D,
|
200
211
|
"is_saveable": og.is_polyhedral_solid_saveable3D,
|
201
212
|
"save": og.save_polyhedral_solid3D,
|
@@ -215,6 +226,7 @@ def geode_objects_dict():
|
|
215
226
|
"input_factory": og.RasterImageInputFactory2D,
|
216
227
|
"output_factory": og.RasterImageOutputFactory2D,
|
217
228
|
"missing_files": og.check_raster_image_missing_files2D,
|
229
|
+
"is_loadable": og.is_raster_image_loadable2D,
|
218
230
|
"load": og.load_raster_image2D,
|
219
231
|
"is_saveable": og.is_raster_image_saveable2D,
|
220
232
|
"save": og.save_raster_image2D,
|
@@ -227,6 +239,7 @@ def geode_objects_dict():
|
|
227
239
|
"input_factory": og.RasterImageInputFactory3D,
|
228
240
|
"output_factory": og.RasterImageOutputFactory3D,
|
229
241
|
"missing_files": og.check_raster_image_missing_files3D,
|
242
|
+
"is_loadable": og.is_raster_image_loadable3D,
|
230
243
|
"load": og.load_raster_image3D,
|
231
244
|
"is_saveable": og.is_raster_image_saveable3D,
|
232
245
|
"save": og.save_raster_image3D,
|
@@ -239,6 +252,7 @@ def geode_objects_dict():
|
|
239
252
|
"input_factory": og.RegularGridInputFactory2D,
|
240
253
|
"output_factory": og.RegularGridOutputFactory2D,
|
241
254
|
"missing_files": og.check_regular_grid_missing_files2D,
|
255
|
+
"is_loadable": og.is_regular_grid_loadable2D,
|
242
256
|
"load": og.load_regular_grid2D,
|
243
257
|
"is_saveable": og.is_regular_grid_saveable2D,
|
244
258
|
"save": og.save_regular_grid2D,
|
@@ -257,6 +271,7 @@ def geode_objects_dict():
|
|
257
271
|
"input_factory": og.RegularGridInputFactory3D,
|
258
272
|
"output_factory": og.RegularGridOutputFactory3D,
|
259
273
|
"missing_files": og.check_regular_grid_missing_files3D,
|
274
|
+
"is_loadable": og.is_regular_grid_loadable3D,
|
260
275
|
"load": og.load_regular_grid3D,
|
261
276
|
"is_saveable": og.is_regular_grid_saveable3D,
|
262
277
|
"save": og.save_regular_grid3D,
|
@@ -275,6 +290,7 @@ def geode_objects_dict():
|
|
275
290
|
"input_factory": og.SectionInputFactory,
|
276
291
|
"output_factory": og.SectionOutputFactory,
|
277
292
|
"missing_files": og.check_section_missing_files,
|
293
|
+
"is_loadable": og.is_section_loadable,
|
278
294
|
"load": og.load_section,
|
279
295
|
"is_saveable": og.is_section_saveable,
|
280
296
|
"save": og.save_section,
|
@@ -295,6 +311,7 @@ def geode_objects_dict():
|
|
295
311
|
"input_factory": og_gs.StructuralModelInputFactory,
|
296
312
|
"output_factory": og_gs.StructuralModelOutputFactory,
|
297
313
|
"missing_files": og_gs.check_structural_model_missing_files,
|
314
|
+
"is_loadable": og_gs.is_structural_model_loadable,
|
298
315
|
"load": og_gs.load_structural_model,
|
299
316
|
"is_saveable": og_gs.is_structural_model_saveable,
|
300
317
|
"save": og_gs.save_structural_model,
|
@@ -314,6 +331,7 @@ def geode_objects_dict():
|
|
314
331
|
"input_factory": og.TetrahedralSolidInputFactory3D,
|
315
332
|
"output_factory": og.TetrahedralSolidOutputFactory3D,
|
316
333
|
"missing_files": og.check_tetrahedral_solid_missing_files3D,
|
334
|
+
"is_loadable": og.is_tetrahedral_solid_loadable3D,
|
317
335
|
"load": og.load_tetrahedral_solid3D,
|
318
336
|
"is_saveable": og.is_tetrahedral_solid_saveable3D,
|
319
337
|
"save": og.save_tetrahedral_solid3D,
|
@@ -333,6 +351,7 @@ def geode_objects_dict():
|
|
333
351
|
"input_factory": og.TriangulatedSurfaceInputFactory2D,
|
334
352
|
"output_factory": og.TriangulatedSurfaceOutputFactory2D,
|
335
353
|
"missing_files": og.check_triangulated_surface_missing_files2D,
|
354
|
+
"is_loadable": og.is_triangulated_surface_loadable2D,
|
336
355
|
"load": og.load_triangulated_surface2D,
|
337
356
|
"is_saveable": og.is_triangulated_surface_saveable2D,
|
338
357
|
"save": og.save_triangulated_surface2D,
|
@@ -352,6 +371,7 @@ def geode_objects_dict():
|
|
352
371
|
"input_factory": og.TriangulatedSurfaceInputFactory3D,
|
353
372
|
"output_factory": og.TriangulatedSurfaceOutputFactory3D,
|
354
373
|
"missing_files": og.check_triangulated_surface_missing_files3D,
|
374
|
+
"is_loadable": og.is_triangulated_surface_loadable3D,
|
355
375
|
"load": og.load_triangulated_surface3D,
|
356
376
|
"is_saveable": og.is_triangulated_surface_saveable3D,
|
357
377
|
"save": og.save_triangulated_surface3D,
|
@@ -371,6 +391,7 @@ def geode_objects_dict():
|
|
371
391
|
"input_factory": og.VertexSetInputFactory,
|
372
392
|
"output_factory": og.VertexSetOutputFactory,
|
373
393
|
"missing_files": og.check_vertex_set_missing_files,
|
394
|
+
"is_loadable": og.is_vertex_set_loadable,
|
374
395
|
"load": og.load_vertex_set,
|
375
396
|
"is_saveable": og.is_vertex_set_saveable,
|
376
397
|
"save": og.save_vertex_set,
|
@@ -51,28 +51,33 @@ def test_missing_files():
|
|
51
51
|
assert type(additional_files) is list
|
52
52
|
|
53
53
|
|
54
|
+
def test_is_loadable():
|
55
|
+
for geode_object, value in geode_objects.geode_objects_dict().items():
|
56
|
+
input_extensions = geode_functions.geode_object_input_extensions(geode_object)
|
57
|
+
for input_extension in input_extensions:
|
58
|
+
file_absolute_path = os.path.abspath(f"tests/data/test.{input_extension}")
|
59
|
+
is_loadable = geode_functions.is_loadable(geode_object, file_absolute_path)
|
60
|
+
assert type(is_loadable) is bool
|
61
|
+
|
62
|
+
|
54
63
|
def test_load():
|
55
64
|
for geode_object, value in geode_objects.geode_objects_dict().items():
|
56
65
|
print(f"\n{geode_object=}")
|
57
66
|
input_extensions = geode_functions.geode_object_input_extensions(geode_object)
|
58
67
|
for input_extension in input_extensions:
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
f"tests/data/test.{input_extension}"
|
72
|
-
)
|
73
|
-
|
68
|
+
print(f"\t{input_extension=}")
|
69
|
+
missing_files = geode_functions.missing_files(
|
70
|
+
geode_object, f"tests/data/test.{input_extension}"
|
71
|
+
)
|
72
|
+
has_missing_files = missing_files.has_missing_files()
|
73
|
+
if has_missing_files:
|
74
|
+
mandatory_files = missing_files.mandatory_files
|
75
|
+
print(f"\t\t{mandatory_files=}")
|
76
|
+
additional_files = missing_files.additional_files
|
77
|
+
print(f"\t\t{additional_files=}")
|
78
|
+
file_apsolute_path = os.path.abspath(f"tests/data/test.{input_extension}")
|
79
|
+
if geode_functions.is_loadable(geode_object, file_apsolute_path):
|
74
80
|
data = geode_functions.load(geode_object, file_apsolute_path)
|
75
|
-
|
76
81
|
if "save_viewable" in value:
|
77
82
|
uu_id = str(uuid.uuid4()).replace("-", "")
|
78
83
|
viewable_file_path = geode_functions.save_viewable(
|
@@ -143,22 +148,19 @@ def test_geode_object_output_extensions():
|
|
143
148
|
print(f"\n{geode_object=}")
|
144
149
|
input_extensions = geode_functions.geode_object_input_extensions(geode_object)
|
145
150
|
for input_extension in input_extensions:
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
)
|
160
|
-
|
161
|
-
data = geode_functions.load(geode_object, file_apsolute_path)
|
151
|
+
print(f"\t{input_extension=}")
|
152
|
+
missing_files = geode_functions.missing_files(
|
153
|
+
geode_object, f"tests/data/test.{input_extension}"
|
154
|
+
)
|
155
|
+
has_missing_files = missing_files.has_missing_files()
|
156
|
+
if has_missing_files:
|
157
|
+
mandatory_files = missing_files.mandatory_files
|
158
|
+
print(f"\t\t{mandatory_files=}")
|
159
|
+
additional_files = missing_files.additional_files
|
160
|
+
print(f"\t\t{additional_files=}")
|
161
|
+
file_absolute_path = os.path.abspath(f"tests/data/test.{input_extension}")
|
162
|
+
if geode_functions.is_loadable(geode_object, file_absolute_path):
|
163
|
+
data = geode_functions.load(geode_object, file_absolute_path)
|
162
164
|
geode_objets_and_output_extensions = (
|
163
165
|
geode_functions.geode_objects_output_extensions(geode_object, data)
|
164
166
|
)
|
@@ -175,6 +177,16 @@ def test_geode_object_output_extensions():
|
|
175
177
|
assert type(output_extension_value["is_saveable"]) is bool
|
176
178
|
|
177
179
|
|
180
|
+
def test_filter_geode_objects():
|
181
|
+
filters_list = ["", "crs", "inspector", None]
|
182
|
+
|
183
|
+
for filter in filters_list:
|
184
|
+
geode_objects_filtered_list = geode_functions.filter_geode_objects(filter)
|
185
|
+
assert type(geode_objects_filtered_list) is list
|
186
|
+
for geode_object in geode_objects_filtered_list:
|
187
|
+
assert type(geode_object) is str
|
188
|
+
|
189
|
+
|
178
190
|
def test_list_input_extensions():
|
179
191
|
keys_array = ["crs", "inspector", None]
|
180
192
|
for geode_object, value in geode_objects.geode_objects_dict().items():
|
@@ -215,27 +227,36 @@ def test_list_geode_objects():
|
|
215
227
|
input_extensions = geode_functions.list_input_extensions(key)
|
216
228
|
for geode_object, value in geode_objects.geode_objects_dict().items():
|
217
229
|
for input_extension in input_extensions:
|
218
|
-
|
219
|
-
input_extension
|
230
|
+
file_absolute_path = os.path.abspath(
|
231
|
+
f"tests/data/test.{input_extension}"
|
232
|
+
)
|
233
|
+
return_dict = geode_functions.list_geode_objects(
|
234
|
+
file_absolute_path, key
|
220
235
|
)
|
221
|
-
assert type(
|
236
|
+
assert type(return_dict) is dict
|
222
237
|
|
223
238
|
if key != None:
|
224
|
-
assert len(
|
239
|
+
assert len(return_dict.keys()) > 0
|
225
240
|
for invalid_geode_object in invalid_geode_objects:
|
226
|
-
assert invalid_geode_object not in
|
241
|
+
assert invalid_geode_object not in return_dict.keys()
|
227
242
|
else:
|
228
|
-
assert len(
|
243
|
+
assert len(return_dict.keys()) >= 1
|
244
|
+
for input_geode_object, input_extension_dict in return_dict.items():
|
245
|
+
assert type(input_extension_dict) is dict
|
246
|
+
for (
|
247
|
+
input_extension,
|
248
|
+
input_extension_value,
|
249
|
+
) in input_extension_dict.items():
|
250
|
+
assert type(input_extension_value) is bool
|
229
251
|
|
230
252
|
|
231
253
|
def test_geode_objects_output_extensions():
|
232
254
|
for geode_object, value in geode_objects.geode_objects_dict().items():
|
233
255
|
input_extensions = geode_functions.geode_object_input_extensions(geode_object)
|
234
256
|
for input_extension in input_extensions:
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
)
|
257
|
+
file_absolute_path = f"tests/data/test.{input_extension}"
|
258
|
+
if geode_functions.is_loadable(geode_object, file_absolute_path):
|
259
|
+
data = geode_functions.load(geode_object, file_absolute_path)
|
239
260
|
geode_objects_and_output_extensions = (
|
240
261
|
geode_functions.geode_objects_output_extensions(geode_object, data)
|
241
262
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{OpenGeodeWeb-Back-3.0.0rc10 → OpenGeodeWeb-Back-3.0.0rc11}/src/opengeodeweb_back/__init__.py
RENAMED
File without changes
|
File without changes
|