jdc = jdcfile.read()
params = jdc_to_dict(jdc, ["TELEMAC2D", "_F"])
- yacs_scheme = generate_yacs_study(params)
+ # Generation script string
+ python_script = generate_study_script(params)
+
+ # Computing name of the file (same as filePath)
file_dir, filename = os.path.split(filePath)
root, sfx = os.path.splitext(filename)
- python_file = os.path.join(file_dir,root+".xml")
+ python_file = os.path.join(file_dir,root+".py")
- python_script = generate_study_script(params)
+ # Writting to file
with open(python_file,'w') as pfile:
pfile.write(python_script)
jdc = jdcfile.read()
params = jdc_to_dict(jdc, ["TELEMAC2D", "_F"])
- yacs_scheme = generate_yacs_study(params)
+ # Generation YACS scheme
+ yacs_scheme = generate_study_yacs(params)
+
+ # Computing name of the file (same as filePath)
file_dir, filename = os.path.split(filePath)
root, sfx = os.path.splitext(filename)
yacs_file = os.path.join(file_dir,root+".xml")
- yacs_scheme = generate_study_yacs(params)
- yacs_scheme.saveScheme(yacs_file)
+ # Writting to file
+ yacs_scheme.saveSchema(yacs_file)
def find_or_create_coupling1d2d_case(self, filePath):
self.find_or_create_hydro_component()