|
carputils
Doxygen code documentation for the python framework controlling openCARP
|
Class for global bundle object. More...
Public Member Functions | |
| def | __init__ (self) |
| def | create_bundle_folder (self) |
| Creates the bundle folder. More... | |
| def | prepopulate_bundle_folder (self) |
| Initialize clean bundle folder by copying content of 'Mesh' and 'external' folders, as well as files and folders listed in '.bundleinclude' file. More... | |
| def | cleanup_bundle_folder (self) |
| " Clean up an existing bundle before updating it: More... | |
| def | finalize_bundle (self, job_id=None) |
| Writes the protocol script in the bundle folder, modifies parameter files containing unresolved paths and creates a zip archive of the bundle if necessary. More... | |
| def | modify_par_file (self, par_file) |
| Modify parameter file in order for paths to be consistent in the bundle and put the input files given as parameters in the bundle. More... | |
| def | resolve_parfile_path (self, path, current_param=None, mesh=False) |
| Put the file targeted by 'path' into the bundle if necessary and returns the path to this file in the bundle. More... | |
| def | create_metadata_file (self) |
| Creates and writes the codemeta.json file related to the current experiment in the bundle. More... | |
| def | add_queued_simfiles (self) |
| Adds simfiles queued in self._simfiles_queue (with _store_simfile function) in the bundle and consequently modifies protocol script. More... | |
| def | check_found_simfiles (self) |
| Checks if any external files could be missing in the bundle for the experiment to run properly and raises adequate warnings. More... | |
Properties | |
| exp_file = property | |
| exp_filename = property | |
| exp_dir = property | |
| meshdir_name = property | |
| externaldir_name = property | |
| exp_name = property | |
| The name of the experiment, defined in the command line as an argument for the –bundle option. More... | |
| bundle_foldername = property | |
| bundle_dir = property | |
| protocol_script = property | |
| OCparams = property | |
| file_OCparams = property | |
Class for global bundle object.
When the bundle module is loaded, it is replaced by an instance of this class. Contains all useful data and functions for creating a self-contained bundle of the running experiment.
More information on how to create a bundle can be found in HOWTO_BUNDLE.md.
| def carputils.bundle.bundle.BundleModule.__init__ | ( | self | ) |
| def carputils.bundle.bundle.BundleModule.add_queued_simfiles | ( | self | ) |
Adds simfiles queued in self._simfiles_queue (with _store_simfile function) in the bundle and consequently modifies protocol script.
| def carputils.bundle.bundle.BundleModule.check_found_simfiles | ( | self | ) |
Checks if any external files could be missing in the bundle for the experiment to run properly and raises adequate warnings.
| def carputils.bundle.bundle.BundleModule.cleanup_bundle_folder | ( | self | ) |
" Clean up an existing bundle before updating it:
| def carputils.bundle.bundle.BundleModule.create_bundle_folder | ( | self | ) |
Creates the bundle folder.
| def carputils.bundle.bundle.BundleModule.create_metadata_file | ( | self | ) |
Creates and writes the codemeta.json file related to the current experiment in the bundle.
| def carputils.bundle.bundle.BundleModule.finalize_bundle | ( | self, | |
job_id = None |
|||
| ) |
Writes the protocol script in the bundle folder, modifies parameter files containing unresolved paths and creates a zip archive of the bundle if necessary.
Removes the bundle folder afterwards.
| def carputils.bundle.bundle.BundleModule.modify_par_file | ( | self, | |
| par_file | |||
| ) |
Modify parameter file in order for paths to be consistent in the bundle and put the input files given as parameters in the bundle.
| par_file | str Path to the parameter file to modify. |
| def carputils.bundle.bundle.BundleModule.prepopulate_bundle_folder | ( | self | ) |
Initialize clean bundle folder by copying content of 'Mesh' and 'external' folders, as well as files and folders listed in '.bundleinclude' file.
| def carputils.bundle.bundle.BundleModule.resolve_parfile_path | ( | self, | |
| path, | |||
current_param = None, |
|||
mesh = False |
|||
| ) |
Put the file targeted by 'path' into the bundle if necessary and returns the path to this file in the bundle.
| path | str path to the file |
| current_param | _OCParam parameter associated to the path |
| mesh | bool set to True if the file is a mesh file |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
The name of the experiment, defined in the command line as an argument for the –bundle option.
Default 'experiment'
|
static |
|
static |
|
static |
|
static |
|
static |