File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- opengeode-core==15.31.5
2- opengeode-io==7.4.8
3- opengeode-inspector==6.8.17
4- opengeode-geosciences==9.5.9
5- opengeode-geosciencesio==5.8.10
6- geode-common==33.19.0
7- geode-viewables==3.3.4
1+ opengeode-core==16.0.0
2+ opengeode-io==7.4.9
3+ opengeode-inspector==6.8.18
4+ opengeode-geosciences==9.5.10
5+ opengeode-geosciencesio==5.8.11
6+ geode-common==33.19.1
7+ geode-viewables==3.3.5
88flask[async]==3.1.2
99flask-cors==6.0.1
1010werkzeug==3.1.2
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ flask[async]>=3
1616 # flask-cors
1717flask-cors == 6.0.1
1818 # via -r requirements.in
19- geode-common == 33.19.0
19+ geode-common == 33.19.1
2020 # via
2121 # -r requirements.in
2222 # geode-viewables
23- geode-viewables == 3.3.4
23+ geode-viewables == 3.3.5
2424 # via -r requirements.in
2525itsdangerous >= 2
2626 # via flask
@@ -31,7 +31,7 @@ markupsafe>=3
3131 # flask
3232 # jinja2
3333 # werkzeug
34- opengeode-core == 15.31.5
34+ opengeode-core == 16.0.0
3535 # via
3636 # -r requirements.in
3737 # geode-common
@@ -40,16 +40,16 @@ opengeode-core==15.31.5
4040 # opengeode-geosciencesio
4141 # opengeode-inspector
4242 # opengeode-io
43- opengeode-geosciences == 9.5.9
43+ opengeode-geosciences == 9.5.10
4444 # via
4545 # -r requirements.in
4646 # geode-viewables
4747 # opengeode-geosciencesio
48- opengeode-geosciencesio == 5.8.10
48+ opengeode-geosciencesio == 5.8.11
4949 # via -r requirements.in
50- opengeode-inspector == 6.8.17
50+ opengeode-inspector == 6.8.18
5151 # via -r requirements.in
52- opengeode-io == 7.4.8
52+ opengeode-io == 7.4.9
5353 # via
5454 # -r requirements.in
5555 # geode-viewables
@@ -60,4 +60,3 @@ werkzeug==3.1.2
6060 # flask
6161 # flask-cors
6262
63- opengeodeweb-microservice == 1.* ,>= 1.0.15
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ def inspect_file() -> flask.Response:
184184 return flask .make_response ({"inspection_result" : inspection_result }, 200 )
185185
186186
187- def extract_inspector_result (inspection_data : Any ) -> object :
187+ def extract_inspector_result (inspection_data : Any ) -> dict [ str , Any ] :
188188 new_object = {}
189189
190190 if hasattr (inspection_data , "inspection_type" ):
@@ -195,14 +195,17 @@ def extract_inspector_result(inspection_data: Any) -> object:
195195 if child .startswith ("__" ) or child in [
196196 "inspection_type" ,
197197 "string" ,
198+ "nb_issues" ,
198199 ]:
199200 continue
200201 child_instance = getattr (inspection_data , child )
202+ if callable (child_instance ):
203+ continue
201204 child_object = extract_inspector_result (child_instance )
202205 new_object ["children" ].append (child_object )
203- if hasattr ( child_object , "nb_issues" ) :
204- new_object ["nb_issues" ] += child_object . nb_issues ()
205- else :
206+ if "nb_issues" in child_object :
207+ new_object ["nb_issues" ] += child_object [ " nb_issues" ]
208+ elif hasattr ( inspection_data , "description" ) :
206209 new_object ["title" ] = inspection_data .description ()
207210 nb_issues = inspection_data .nb_issues ()
208211 new_object ["nb_issues" ] = nb_issues
Original file line number Diff line number Diff line change @@ -215,11 +215,14 @@ def save_all_viewables_and_return_info(
215215 assert data .native_file is not None
216216 assert data .viewable_file is not None
217217 assert data .light_viewable_file is not None
218+ name = geode_object .identifier .name ()
219+ if not name :
220+ flask .abort (400 , "Geode object has no name defined." )
218221 return {
219222 "native_file" : data .native_file ,
220223 "viewable_file" : data .viewable_file ,
221224 "id" : data .id ,
222- "name" : geode_object . identifier . name () ,
225+ "name" : name ,
223226 "viewer_type" : data .viewer_object ,
224227 "binary_light_viewable" : binary_light_viewable .decode ("utf-8" ),
225228 "geode_object_type" : data .geode_object ,
Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ def test_input_output() -> None:
2626 if generic_geode_object .is_loadable (file_absolute_path ).value () == 0.0 :
2727 continue
2828 geode_object = generic_geode_object .load (file_absolute_path )
29- data_name = geode_object .identifier .name ()
29+ data_name = geode_object .identifier .name () or os .path .basename (
30+ file_absolute_path
31+ )
3032 if geode_object .is_viewable ():
3133 viewable_file_path = geode_object .save_viewable (
3234 os .path .join (os .path .abspath (f"./output" ), data_name )
You can’t perform that action at this time.
0 commit comments