emod_api.config.from_poi_and_binary module¶
-
emod_api.config.from_poi_and_binary.
schema_to_config
(schema_path_in)¶ Purpose: Take a schema.json and return a “smart” config object that can be assigned to with schema-enforcement. Use in conjunction with to_file(). Params: schema_path_in (str/path) Returns: config (smart dict)
-
emod_api.config.from_poi_and_binary.
set_schema
(schema_path_in)¶
-
emod_api.config.from_poi_and_binary.
make_config_from_poi_and_config_dict
(start_config_dict, poi_set_param_fn)¶ Use this function to create a config.json from an existing param dict (defaults or base) and a function with your parameter overrides or parameters of interest.
-
emod_api.config.from_poi_and_binary.
make_config_from_poi_and_config_file
(start_config_path, poi_set_param_fn)¶ Use this function to create a config.json from an existing config json file (defaults or base) and a function with your parameter overrides or parameters of interest.
-
emod_api.config.from_poi_and_binary.
make_config_from_poi_and_schema
(schema_path, poi_set_param_fn)¶ Use this function to create a config.json from an existing schema json file and a function with your parameter overrides or parameters of interest.
-
emod_api.config.from_poi_and_binary.
make_config_from_poi
(eradication_path, poi_set_param_fn)¶ This function uses emod_api to produce a guaranteed working config starting with an Eradication binary and a parameters-of-interest python function. This is a usable and useful function.
- Parameters
eradication_path (string) – Fully-qualified path to Eradication binary that can be invoked to get a schema.
poi_set_param_fn (function) – User-provided function/callback/hook that looks like:
set_params (def) – config.parameters.<param_name> = <schema valid param_value> <repeat for each param> return config
- Returns
Hardcoded configuration filename written to pwd.
- Return type
“config.json” (string)