diff --git a/autotest/ins/primary.dat b/autotest/ins/primary.dat new file mode 100644 index 000000000..fe56c6230 --- /dev/null +++ b/autotest/ins/primary.dat @@ -0,0 +1,3 @@ +datetime,dif_bgs_H_mean +2017-07-22 16:00:00,0.0 +2017-07-22 17:00:00,-0.01093397575757582 \ No newline at end of file diff --git a/autotest/ins/primary.dat.ins b/autotest/ins/primary.dat.ins new file mode 100644 index 000000000..461c2f922 --- /dev/null +++ b/autotest/ins/primary.dat.ins @@ -0,0 +1,3 @@ +pif @ +@2017-07-22 16:00:00,@ !20170722_16_dif_wlev_bgs_H! +@2017-07-22 17:00:00,@ !20170722_17_dif_wlev_bgs_H! diff --git a/autotest/pst_from_tests.py b/autotest/pst_from_tests.py index ff316cf67..320b62d90 100644 --- a/autotest/pst_from_tests.py +++ b/autotest/pst_from_tests.py @@ -1303,7 +1303,7 @@ def mf6_freyberg_direct_test(): if __name__ == "__main__": #freyberg_test() #freyberg_prior_build_test() - #mf6_freyberg_test() - mf6_freyberg_shortnames_test() + mf6_freyberg_test() + #mf6_freyberg_shortnames_test() #mf6_freyberg_da_test() #mf6_freyberg_direct_test() diff --git a/autotest/pst_tests.py b/autotest/pst_tests.py index e96627d77..8266f3459 100644 --- a/autotest/pst_tests.py +++ b/autotest/pst_tests.py @@ -488,6 +488,11 @@ def try_process_ins_test(): import pandas as pd import pyemu + ins_file = os.path.join("ins","primary.dat.ins") + i = pyemu.pst_utils.InstructionFile(ins_file) + df2 = i.read_output_file(ins_file.replace(".ins", "")) + print(df2) + ins_file = os.path.join("utils", "BH.mt3d.processed.ins") i = pyemu.pst_utils.InstructionFile(ins_file) df2 = i.read_output_file(ins_file.replace(".ins","")) @@ -507,6 +512,7 @@ def try_process_ins_test(): + def sanity_check_test(): import os import pyemu @@ -864,14 +870,14 @@ def new_format_path_mechanics_test(): if __name__ == "__main__": - process_output_files_test() + #process_output_files_test() #change_limit_test() #new_format_test() #lt_gt_constraint_names_test() - csv_to_ins_test() + #csv_to_ins_test() #pst_from_flopy_geo_draw_test() #pst_from_flopy_specsim_draw_test() - #try_process_ins_test() + try_process_ins_test() # write_tables_test() #res_stats_test() # test_write_input_files() diff --git a/pyemu/pst/pst_utils.py b/pyemu/pst/pst_utils.py index d77e3575a..f909c67f5 100644 --- a/pyemu/pst/pst_utils.py +++ b/pyemu/pst/pst_utils.py @@ -1191,7 +1191,7 @@ def find_all(a_str, sub): yield start start += len(sub) midx = list(find_all(line,self._marker)) - midx.append(len(line)-1) + midx.append(len(line)) first =line[:midx[0]].strip() tokens = [] if len(first) > 0: