diff --git a/src/main/emme/toolbox/master_run.py b/src/main/emme/toolbox/master_run.py index 041cc8f19..158c4c836 100644 --- a/src/main/emme/toolbox/master_run.py +++ b/src/main/emme/toolbox/master_run.py @@ -1301,6 +1301,7 @@ def write_metadata(self, main_directory, scenario_title, select_link, username, ,"environment" : prod_env ,"network_path" : props["network"] ,"landuse_path" : props["landuse"] + ,"release_path" : props["release"] } _m.logbook_write("Created new scenario_guid: %s" % (datalake_metadata_dict['scenario_guid'])) got_id, scenario_id = self.get_scenario_id(datalake_metadata_dict['scenario_guid'], scenario_title, prod_env) diff --git a/src/main/python/datalake_exporter.py b/src/main/python/datalake_exporter.py index 5b56e4502..851b7fc14 100644 --- a/src/main/python/datalake_exporter.py +++ b/src/main/python/datalake_exporter.py @@ -115,7 +115,8 @@ def create_scenario_df(ts, EMME_metadata, parent_dir_name, output_path): "select_link" : [EMME_metadata["select_link"]], "sample_rate" : [EMME_metadata["sample_rate"]], "network_path" : [EMME_metadata["network_path"]], - "landuse_path" : [EMME_metadata["landuse_path"]] + "landuse_path" : [EMME_metadata["landuse_path"]], + "release_path" : [EMME_metadata["release_path"]] } meta_df = pd.DataFrame(metadata) diff --git a/src/main/python/pythonGUI/createStudyAndScenario.py b/src/main/python/pythonGUI/createStudyAndScenario.py index 7f598d0b9..e34f3ef36 100644 --- a/src/main/python/pythonGUI/createStudyAndScenario.py +++ b/src/main/python/pythonGUI/createStudyAndScenario.py @@ -68,8 +68,10 @@ def __init__(self, root, emme_version = "4.3.7", year = "2022", geo = "1", year_ divider=u"_"*200 if getattr(sys, 'frozen', False): self.releaseDir=os.path.abspath(os.path.join(os.path.dirname(sys.executable), '..', '..')) + self.version=os.path.basename(os.path.abspath(os.path.join(os.path.dirname(sys.executable), '..'))) else: self.releaseDir=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')) + self.version=os.path.basename(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))) self.defaultScenarioDir="T:\\STORAGE-63T\\2025RP_init_concept\\" self.defaultNetworkDir="T:\\projects\\sr15\\tned_etl\\2025RP_draft" self.defaultLandUseDir="T:\\projects\\sr15\\land_use\\2025RP_draft" @@ -80,7 +82,11 @@ def __init__(self, root, emme_version = "4.3.7", year = "2022", geo = "1", year_ self.buttonVar= tkinter.IntVar(root) self.yButton=tkinter.Radiobutton(body, text="Yes", variable=self.buttonVar, value=1, command=self.initStudy) self.nButton=tkinter.Radiobutton(body, text="No", variable=self.buttonVar, value=0,command=self.initStudy) - tkinter.Label(body, text=u"Release Version 15.2.0\n"+divider, font=("Helvetica", 11, 'bold'), width=50, fg='royal blue').grid(row=current_row,columnspan=5) + if self.version[:8] == "version_": + version_name = self.version[8:].replace("_",".",2) + else: + version_name = self.version + tkinter.Label(body, text=u"Release Version " + version_name + "\n"+divider, font=("Helvetica", 11, 'bold'), width=50, fg='royal blue').grid(row=current_row,columnspan=5) current_row += 1 tkinter.Label(body, text=u"Create an ABM Work Space", font=("Helvetica", 10, 'bold')).grid(row=current_row,columnspan=n_columns) current_row += 1 @@ -124,17 +130,6 @@ def __init__(self, root, emme_version = "4.3.7", year = "2022", geo = "1", year_ tkinter.Label(body, text=u"Create an ABM scenario", font=("Helvetica", 10, 'bold')).grid(row=current_row,columnspan=n_columns) current_row += 1 - #tkinter.Label(body, text=u"Version", font=("Helvetica", 8, 'bold')).grid(row=8) - #var = StringVar(root) - if getattr(sys, 'frozen', False): - self.version=os.path.basename(os.path.abspath(os.path.join(os.path.dirname(sys.executable), '..'))) - else: - self.version=os.path.basename(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..'))) - #optionList=["version_14_2_2"] - #option=tkinter.OptionMenu(body,var,*optionList,command=self.setversion) - #option.config(width=50) - #option.grid(row=8, column=1) - tkinter.Label(body, text=u"Emme Version", font=("Helvetica", 8, 'bold')).grid(row=current_row) var = tkinter.StringVar(root) #self.emme_version = "4.4.4.1" @@ -377,6 +372,7 @@ def executeBatch(self, type): self.update_property("geographyID = 1", "geographyID = " + self.geo.get()) self.update_property("network = NETWORK", "network = " + self.networkpath.get()) self.update_property("landuse = LANDUSE", "landuse = " + self.lupath.get()) + self.update_property("release = RELEASE", "release = " + self.releaseDir+"\\"+self.version) elif type=="study": studyyears = self.studyyears.get().split(',') exclude_file = self.studynetworkpath.get() + '\\exclude.txt' diff --git a/src/main/resources/sandag_abm.properties b/src/main/resources/sandag_abm.properties index a5da837c3..cc7dc8bee 100644 --- a/src/main/resources/sandag_abm.properties +++ b/src/main/resources/sandag_abm.properties @@ -1,6 +1,6 @@ ##SANDAG ABM Properties ##Software Version -version = version_15_2_0rc +release = RELEASE landuse = LANDUSE network = NETWORK ## geography ID