Skip to content

Commit 1c1574d

Browse files
Merge branch 'next' into feat/is_loadable
2 parents 7ecca76 + b05e1e1 commit 1c1574d

File tree

5 files changed

+109
-102
lines changed

5 files changed

+109
-102
lines changed

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,50 @@
22

33

44

5+
## v3.0.0-rc.10 (2023-12-15)
6+
7+
### Fix
8+
9+
* fix(dependencies): update ecosystem ([`cbed29d`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/cbed29dbf0e195f23ef89f7798a155d2c33a56fe))
10+
11+
### Unknown
12+
13+
* Merge pull request #52 from Geode-solutions/chore/update_ecosystem
14+
15+
fix(dependencies): update ecosystem ([`eabfe89`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/eabfe89d98db21f0087f1ca4569ff695e05c9f99))
16+
17+
* Merge pull request #51 from Geode-solutions/revert-49-feat/is_loadable
18+
19+
Revert "Feat/is loadable" ([`d0f03a7`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/d0f03a788c892ea80431d3aff3dadf7f3755240f))
20+
21+
* Revert "Feat/is loadable" ([`2aab775`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/2aab7755049c33843cc120618f1a94e32a3429f3))
22+
23+
24+
## v3.0.0-rc.9 (2023-12-15)
25+
26+
### Feature
27+
28+
* feat(tests): strenghten unit tests 2 ([`9c9ab87`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/9c9ab87bbef54c6524bb26f57d60d8d644c0f8b1))
29+
30+
* feat(tests): strenghten unit tests ([`03b0a00`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/03b0a0055b39a0ceaf3863a7f9a9be1314fa6d06))
31+
32+
* feat(list_geode_objects): test is_loadable
33+
34+
BREAKING CHANGE : arg extension -> file_absolute_path ([`4af7868`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/4af78686c761c1abba86a02df39fc9a75e40e151))
35+
36+
### Unknown
37+
38+
* Merge pull request #49 from Geode-solutions/feat/is_loadable
39+
40+
Feat/is loadable ([`3ee5c1e`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/3ee5c1e3a44d5e9b151564603e89dacb4eff3112))
41+
42+
* update requirements ([`9066879`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/9066879e7b037794bbded4184fdb29765261ebc7))
43+
44+
* Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWeb-Back into feat/is_loadable ([`2de6600`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/2de66004cc3acf735017f7aa41d985af9871bad3))
45+
46+
* update tests & deps ([`4fc793c`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/4fc793cdc1f791f30266706bfc05493f0ef87978))
47+
48+
549
## v3.0.0-rc.8 (2023-12-13)
650

751
### Feature
@@ -42,12 +86,18 @@ Feat/is saveable ([`1636622`](https://github.com/Geode-solutions/OpenGeodeWeb-Ba
4286

4387
BREAKING CHANGE: geode_objects_output_extensions returns a dict ([`1948edd`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/1948eddad186904c4aecc63ed0ecbfa6780fa1b7))
4488

89+
### Feature
90+
91+
* feat(geode_functions): is_loadable key & function ([`27ef421`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/27ef421b945da827c7d65705e6149b2052ce4378))
92+
4593
### Unknown
4694

4795
* Merge pull request #45 from Geode-solutions/feat/is_saveable
4896

4997
feat(functions): add send_file function ([`b1d53a4`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/b1d53a4ab280b74fb4e39a318d26ccd309f7dc68))
5098

99+
* update unit tests ([`78fefe1`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/78fefe13186b96c6e15be6f61441d69a62b15e0a))
100+
51101

52102
## v3.0.0-rc.5 (2023-12-06)
53103

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55

66
[project]
77
name = "OpenGeodeWeb-Back"
8-
version = "3.0.0-rc.8"
8+
version = "3.0.0-rc.10"
99
dynamic = ["dependencies"]
1010
authors = [
1111
{ name="Geode-solutions", email="[email protected]" },

src/opengeodeweb_back/geode_functions.py

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ def missing_files(geode_object: str, file_absolute_path: str):
3434
return geode_object_value(geode_object)["missing_files"](file_absolute_path)
3535

3636

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-
4137
def load(geode_object: str, file_absolute_path: str):
4238
return geode_object_value(geode_object)["load"](file_absolute_path)
4339

@@ -135,28 +131,23 @@ def has_creator(geode_object: str, extension: str):
135131
return input_factory(geode_object).has_creator(extension)
136132

137133

138-
def list_geode_objects(
139-
file_absolute_path: str,
140-
key: str = None,
141-
):
142-
return_dict = {}
143-
file_extension = extension_from_filename(os.path.basename(file_absolute_path))
144-
134+
def list_geode_objects(extension: str, key: str = None):
135+
geode_objects_list = []
145136
for geode_object, value in geode_objects_dict().items():
146-
if has_creator(geode_object, file_extension):
147-
file_is_loadable = is_loadable(geode_object, file_absolute_path)
148-
if key != None:
149-
if key in value:
150-
if type(value[key]) == bool:
151-
if value[key] == True:
152-
return_dict[geode_object] = {
153-
"is_loadable": file_is_loadable
154-
}
155-
else:
156-
return_dict[geode_object] = {"is_loadable": file_is_loadable}
157-
else:
158-
return_dict[geode_object] = {"is_loadable": file_is_loadable}
159-
return return_dict
137+
if key != None:
138+
if key in value:
139+
if type(value[key]) == bool:
140+
if value[key] == True:
141+
if has_creator(geode_object, extension):
142+
geode_objects_list.append(geode_object)
143+
elif has_creator(geode_object, extension):
144+
geode_objects_list.append(geode_object)
145+
else:
146+
if has_creator(geode_object, extension):
147+
geode_objects_list.append(geode_object)
148+
149+
geode_objects_list.sort()
150+
return geode_objects_list
160151

161152

162153
def geode_objects_output_extensions(geode_object: str, data):

src/opengeodeweb_back/geode_objects.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def geode_objects_dict():
1212
"input_factory": og.BRepInputFactory,
1313
"output_factory": og.BRepOutputFactory,
1414
"missing_files": og.check_brep_missing_files,
15-
"is_loadable": og.is_brep_loadable,
1615
"load": og.load_brep,
1716
"is_saveable": og.is_brep_saveable,
1817
"save": og.save_brep,
@@ -33,7 +32,6 @@ def geode_objects_dict():
3332
"input_factory": og_gs.CrossSectionInputFactory,
3433
"output_factory": og_gs.CrossSectionOutputFactory,
3534
"missing_files": og_gs.check_cross_section_missing_files,
36-
"is_loadable": og_gs.is_cross_section_loadable,
3735
"load": og_gs.load_cross_section,
3836
"is_saveable": og_gs.is_cross_section_saveable,
3937
"save": og_gs.save_cross_section,
@@ -53,7 +51,6 @@ def geode_objects_dict():
5351
"input_factory": og.EdgedCurveInputFactory2D,
5452
"output_factory": og.EdgedCurveOutputFactory2D,
5553
"missing_files": og.check_edged_curve_missing_files2D,
56-
"is_loadable": og.is_edged_curve_loadable2D,
5754
"load": og.load_edged_curve2D,
5855
"is_saveable": og.is_edged_curve_saveable2D,
5956
"save": og.save_edged_curve2D,
@@ -73,7 +70,6 @@ def geode_objects_dict():
7370
"input_factory": og.EdgedCurveInputFactory3D,
7471
"output_factory": og.EdgedCurveOutputFactory3D,
7572
"missing_files": og.check_edged_curve_missing_files3D,
76-
"is_loadable": og.is_edged_curve_loadable3D,
7773
"load": og.load_edged_curve3D,
7874
"is_saveable": og.is_edged_curve_saveable3D,
7975
"save": og.save_edged_curve3D,
@@ -93,7 +89,6 @@ def geode_objects_dict():
9389
"input_factory": og.GraphInputFactory,
9490
"output_factory": og.GraphOutputFactory,
9591
"missing_files": og.check_graph_missing_files,
96-
"is_loadable": og.is_graph_loadable,
9792
"load": og.load_graph,
9893
"is_saveable": og.is_graph_saveable,
9994
"save": og.save_graph,
@@ -106,7 +101,6 @@ def geode_objects_dict():
106101
"input_factory": og.HybridSolidInputFactory3D,
107102
"output_factory": og.HybridSolidOutputFactory3D,
108103
"missing_files": og.check_hybrid_solid_missing_files3D,
109-
"is_loadable": og.is_hybrid_solid_loadable3D,
110104
"load": og.load_hybrid_solid3D,
111105
"is_saveable": og.is_hybrid_solid_saveable3D,
112106
"save": og.save_hybrid_solid3D,
@@ -126,7 +120,6 @@ def geode_objects_dict():
126120
"input_factory": og.PointSetInputFactory2D,
127121
"output_factory": og.PointSetOutputFactory2D,
128122
"missing_files": og.check_point_set_missing_files2D,
129-
"is_loadable": og.is_point_set_loadable2D,
130123
"load": og.load_point_set2D,
131124
"is_saveable": og.is_point_set_saveable2D,
132125
"save": og.save_point_set2D,
@@ -146,7 +139,6 @@ def geode_objects_dict():
146139
"input_factory": og.PointSetInputFactory3D,
147140
"output_factory": og.PointSetOutputFactory3D,
148141
"missing_files": og.check_point_set_missing_files3D,
149-
"is_loadable": og.is_point_set_loadable3D,
150142
"load": og.load_point_set3D,
151143
"is_saveable": og.is_point_set_saveable3D,
152144
"save": og.save_point_set3D,
@@ -166,7 +158,6 @@ def geode_objects_dict():
166158
"input_factory": og.PolygonalSurfaceInputFactory2D,
167159
"output_factory": og.PolygonalSurfaceOutputFactory2D,
168160
"missing_files": og.check_polygonal_surface_missing_files2D,
169-
"is_loadable": og.is_polygonal_surface_loadable2D,
170161
"load": og.load_polygonal_surface2D,
171162
"is_saveable": og.is_polygonal_surface_saveable2D,
172163
"save": og.save_polygonal_surface2D,
@@ -186,7 +177,6 @@ def geode_objects_dict():
186177
"input_factory": og.PolygonalSurfaceInputFactory3D,
187178
"output_factory": og.PolygonalSurfaceOutputFactory3D,
188179
"missing_files": og.check_polygonal_surface_missing_files3D,
189-
"is_loadable": og.is_polygonal_surface_loadable3D,
190180
"load": og.load_polygonal_surface3D,
191181
"is_saveable": og.is_polygonal_surface_saveable3D,
192182
"save": og.save_polygonal_surface3D,
@@ -206,7 +196,6 @@ def geode_objects_dict():
206196
"input_factory": og.PolyhedralSolidInputFactory3D,
207197
"output_factory": og.PolyhedralSolidOutputFactory3D,
208198
"missing_files": og.check_polyhedral_solid_missing_files3D,
209-
"is_loadable": og.is_polyhedral_solid_loadable3D,
210199
"load": og.load_polyhedral_solid3D,
211200
"is_saveable": og.is_polyhedral_solid_saveable3D,
212201
"save": og.save_polyhedral_solid3D,
@@ -226,7 +215,6 @@ def geode_objects_dict():
226215
"input_factory": og.RasterImageInputFactory2D,
227216
"output_factory": og.RasterImageOutputFactory2D,
228217
"missing_files": og.check_raster_image_missing_files2D,
229-
"is_loadable": og.is_raster_image_loadable2D,
230218
"load": og.load_raster_image2D,
231219
"is_saveable": og.is_raster_image_saveable2D,
232220
"save": og.save_raster_image2D,
@@ -239,7 +227,6 @@ def geode_objects_dict():
239227
"input_factory": og.RasterImageInputFactory3D,
240228
"output_factory": og.RasterImageOutputFactory3D,
241229
"missing_files": og.check_raster_image_missing_files3D,
242-
"is_loadable": og.is_raster_image_loadable3D,
243230
"load": og.load_raster_image3D,
244231
"is_saveable": og.is_raster_image_saveable3D,
245232
"save": og.save_raster_image3D,
@@ -252,7 +239,6 @@ def geode_objects_dict():
252239
"input_factory": og.RegularGridInputFactory2D,
253240
"output_factory": og.RegularGridOutputFactory2D,
254241
"missing_files": og.check_regular_grid_missing_files2D,
255-
"is_loadable": og.is_regular_grid_loadable2D,
256242
"load": og.load_regular_grid2D,
257243
"is_saveable": og.is_regular_grid_saveable2D,
258244
"save": og.save_regular_grid2D,
@@ -271,7 +257,6 @@ def geode_objects_dict():
271257
"input_factory": og.RegularGridInputFactory3D,
272258
"output_factory": og.RegularGridOutputFactory3D,
273259
"missing_files": og.check_regular_grid_missing_files3D,
274-
"is_loadable": og.is_regular_grid_loadable3D,
275260
"load": og.load_regular_grid3D,
276261
"is_saveable": og.is_regular_grid_saveable3D,
277262
"save": og.save_regular_grid3D,
@@ -290,7 +275,6 @@ def geode_objects_dict():
290275
"input_factory": og.SectionInputFactory,
291276
"output_factory": og.SectionOutputFactory,
292277
"missing_files": og.check_section_missing_files,
293-
"is_loadable": og.is_section_loadable,
294278
"load": og.load_section,
295279
"is_saveable": og.is_section_saveable,
296280
"save": og.save_section,
@@ -311,7 +295,6 @@ def geode_objects_dict():
311295
"input_factory": og_gs.StructuralModelInputFactory,
312296
"output_factory": og_gs.StructuralModelOutputFactory,
313297
"missing_files": og_gs.check_structural_model_missing_files,
314-
"is_loadable": og_gs.is_structural_model_loadable,
315298
"load": og_gs.load_structural_model,
316299
"is_saveable": og_gs.is_structural_model_saveable,
317300
"save": og_gs.save_structural_model,
@@ -331,7 +314,6 @@ def geode_objects_dict():
331314
"input_factory": og.TetrahedralSolidInputFactory3D,
332315
"output_factory": og.TetrahedralSolidOutputFactory3D,
333316
"missing_files": og.check_tetrahedral_solid_missing_files3D,
334-
"is_loadable": og.is_tetrahedral_solid_loadable3D,
335317
"load": og.load_tetrahedral_solid3D,
336318
"is_saveable": og.is_tetrahedral_solid_saveable3D,
337319
"save": og.save_tetrahedral_solid3D,
@@ -351,7 +333,6 @@ def geode_objects_dict():
351333
"input_factory": og.TriangulatedSurfaceInputFactory2D,
352334
"output_factory": og.TriangulatedSurfaceOutputFactory2D,
353335
"missing_files": og.check_triangulated_surface_missing_files2D,
354-
"is_loadable": og.is_triangulated_surface_loadable2D,
355336
"load": og.load_triangulated_surface2D,
356337
"is_saveable": og.is_triangulated_surface_saveable2D,
357338
"save": og.save_triangulated_surface2D,
@@ -371,7 +352,6 @@ def geode_objects_dict():
371352
"input_factory": og.TriangulatedSurfaceInputFactory3D,
372353
"output_factory": og.TriangulatedSurfaceOutputFactory3D,
373354
"missing_files": og.check_triangulated_surface_missing_files3D,
374-
"is_loadable": og.is_triangulated_surface_loadable3D,
375355
"load": og.load_triangulated_surface3D,
376356
"is_saveable": og.is_triangulated_surface_saveable3D,
377357
"save": og.save_triangulated_surface3D,
@@ -391,7 +371,6 @@ def geode_objects_dict():
391371
"input_factory": og.VertexSetInputFactory,
392372
"output_factory": og.VertexSetOutputFactory,
393373
"missing_files": og.check_vertex_set_missing_files,
394-
"is_loadable": og.is_vertex_set_loadable,
395374
"load": og.load_vertex_set,
396375
"is_saveable": og.is_vertex_set_saveable,
397376
"save": og.save_vertex_set,

0 commit comments

Comments
 (0)