You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks good just the one structural comment. I think we can go further to collating some of these thing under one wrapper.
Move the init.py file into the core/data_structure folder I think. The contents of that file is 90% the check_process. I would rename the file to check_input.py. The other functions in that file can go onto the DataStructure object in data_structure/base.py except for get_git_summary which I would put in as a standalone function in the file. In my head the check_process function will eventually disappear as the validation moves onto the individual data structure objects. Right now we should just isolate it.
All of the functions in input.py can also move to the data structure. I would leave InputVariable and the associated dictionary where it is
It feels like all of these should be methods on the data structure as they all only take it as input.
data.parse_input_file(in_dat)
data.set_active_constraints()
data.set_device_type()
data.check_process()
data.run_summary() # maybe rename, its not running anything, suggestion "write_outfile_header"
you could also combine them into one call of data.setup(in_dat) or similar. Or even data.setup(InDat(filename=data.globals.fileprefix, update_obsolete=update_obsolete)) you could maybe do away with this whole function entirely if we do that. So you would just call some data.setup in initiailse
Activity