@@ -70,56 +70,52 @@ def test_load():
7070 print (f"\n { geode_object = } " )
7171 input_extensions = geode_functions .geode_object_input_extensions (geode_object )
7272 for input_extension in input_extensions :
73- if input_extension not in ["grdecl" , "og_img3d" , "vti" , "vo" ]:
74- print (f"\t { input_extension = } " )
75- missing_files = geode_functions .missing_files (
76- geode_object , f"tests/data/test.{ input_extension } "
77- )
78- has_missing_files = missing_files .has_missing_files ()
79- if has_missing_files :
80- mandatory_files = missing_files .mandatory_files
81- print (f"\t \t { mandatory_files = } " )
82- additional_files = missing_files .additional_files
83- print (f"\t \t { additional_files = } " )
84- file_apsolute_path = os .path .abspath (
85- f"tests/data/test.{ input_extension } "
73+ # if input_extension not in ["grdecl", "og_img3d", "vti"]:
74+ print (f"\t { input_extension = } " )
75+ missing_files = geode_functions .missing_files (
76+ geode_object , f"tests/data/test.{ input_extension } "
77+ )
78+ has_missing_files = missing_files .has_missing_files ()
79+ if has_missing_files :
80+ mandatory_files = missing_files .mandatory_files
81+ print (f"\t \t { mandatory_files = } " )
82+ additional_files = missing_files .additional_files
83+ print (f"\t \t { additional_files = } " )
84+ file_apsolute_path = os .path .abspath (f"tests/data/test.{ input_extension } " )
85+
86+ data = geode_functions .load (geode_object , file_apsolute_path )
87+ geode_functions .geode_objects_output_extensions (geode_object )
88+ for (
89+ geode_object_and_output_extensions
90+ ) in geode_functions .geode_objects_output_extensions (geode_object ):
91+ output_geode_object = geode_object_and_output_extensions ["geode_object" ]
92+ print (f"\t \t { output_geode_object = } " )
93+ output_extensions = geode_functions .geode_object_output_extensions (
94+ geode_object
8695 )
8796
88- data = geode_functions .load (geode_object , file_apsolute_path )
89- geode_functions .geode_objects_output_extensions (geode_object )
90- for (
91- geode_object_and_output_extensions
92- ) in geode_functions .geode_objects_output_extensions (geode_object ):
93- output_geode_object = geode_object_and_output_extensions [
94- "geode_object"
95- ]
96- print (f"\t \t { output_geode_object = } " )
97- output_extensions = geode_functions .geode_object_output_extensions (
98- geode_object
99- )
100-
101- for output_extension in output_extensions :
102- print (f"\t \t \t { output_extension = } " )
103- uu_id = str (uuid .uuid4 ()).replace ("-" , "" )
104- filename = f"{ uu_id } .{ output_extension } "
105- if geode_functions .is_saveable (geode_object , data , filename ):
106- file_path = geode_functions .save (
97+ for output_extension in output_extensions :
98+ print (f"\t \t \t { output_extension = } " )
99+ uu_id = str (uuid .uuid4 ()).replace ("-" , "" )
100+ filename = f"{ uu_id } .{ output_extension } "
101+ if geode_functions .is_saveable (geode_object , data , filename ):
102+ file_path = geode_functions .save (
103+ geode_object ,
104+ data ,
105+ os .path .abspath (f"output" ),
106+ f"{ uu_id } .{ output_extension } " ,
107+ )
108+
109+ if "save_viewable" in value :
110+ uu_id = str (uuid .uuid4 ()).replace ("-" , "" )
111+ viewable_file_path = geode_functions .save_viewable (
107112 geode_object ,
108113 data ,
109114 os .path .abspath (f"output" ),
110- f" { uu_id } . { output_extension } " ,
115+ uu_id ,
111116 )
112117
113- if "save_viewable" in value :
114- uu_id = str (uuid .uuid4 ()).replace ("-" , "" )
115- viewable_file_path = geode_functions .save_viewable (
116- geode_object ,
117- data ,
118- os .path .abspath (f"output" ),
119- uu_id ,
120- )
121-
122- os .remove (viewable_file_path )
118+ os .remove (viewable_file_path )
123119
124120
125121def test_is_model ():
0 commit comments