emod_api.schema_to_class module
-
emod_api.schema_to_class.disable_warnings()[source]
Turn off warnings to console. These can get very verbose.
-
class emod_api.schema_to_class.ReadOnlyDict[source]
Bases: collections.OrderedDict
-
set_schema(schema)[source]
Add schema node.
-
to_file(config_name='config.json')[source]
Write ‘clean’ config file out to disk as json.
Param: config_name (defaults to ‘config.json’)
-
finalize()[source]
Remove all params that are disabled by depends-on param being off and schema node.
-
emod_api.schema_to_class.get_default_for_complex_type(schema, idmtype)[source]
This function used to be more involved and dumb but now it’s a passthrough to get_class_with_defaults.
If this approach proves robust, it can probably be deprecated. Depends a bit on completeness of schema.
-
emod_api.schema_to_class.get_class_with_defaults(classname, schema_path=None)[source]
Returns the default config for a datatype in the schema.