emod_api.config.from_schema module¶
argparse for command-line usage -s schema file -m model name -c config file
- Sample code:
from emod_api.config import schema_to_config as s2c builder = s2c.SchemaConfigBuilder() builder.enumerate_params() builder.validate_dependent_params() builder.write_config_file()
That will look for a local file called schema.json and produce a file called config.json that should work with an Eradication binary that produced the schema.json.
- To build a default config for MALARIA_SIM, do:
builder = s2c.SchemaConfigBuilder( model=”MALARIA_SIM” )
To generate a schema.json file from a binary, see help text for emod_api.schema.