schema

schema

Handle the schema for the config file. To be used by the config module to validate the config file and set defaults for the Config object.

Reserved keywords: - pytype - default - description - type - required

Classes

Name Description
Sequence A sequence of tasks.

Sequence

schema.Sequence(self, tasks)

A sequence of tasks.

Tasks can be grouped together by using a dictionary with the following keys: - mult: number of times to repeat the tasks - tasks: list of tasks to repeat

Attributes

Name Type Description
tasks list of tasks

Functions

Name Description
convert_schema_to_dict Convert a dictionary from a raw json schema to a nested dictionary
flatten_scheme Recursively get properties and their desicripions from the scheme
generate_markdown_table Generate markdown table from scheme
get_combined_scheme Return the schema for the config file.
load_kimmdy_schema Return the schema for the config file
load_plugin_schemas Return the schemas for the reaction plugins known to kimmdy
prune Remove empty dicts from a nested dict

convert_schema_to_dict

schema.convert_schema_to_dict(dictionary)

Convert a dictionary from a raw json schema to a nested dictionary

Parameters

Name Type Description Default
dictionary dict dictionary from a raw json schema required

Returns

Type Description
nested dictionary where each leaf entry is a dictionary with the “pytype”, “default” and “description” keys.

flatten_scheme

schema.flatten_scheme(scheme, section='')

Recursively get properties and their desicripions from the scheme

generate_markdown_table

schema.generate_markdown_table(scheme, append=False)

Generate markdown table from scheme

Used in documentation generation.

get_combined_scheme

schema.get_combined_scheme()

Return the schema for the config file.

Nested scheme where each leaf entry is a dictionary with the “pytype”, “default” and “description”. Contains the schema for the main kimmdy config file and all the plugins known at runtime.

load_kimmdy_schema

schema.load_kimmdy_schema()

Return the schema for the config file

load_plugin_schemas

schema.load_plugin_schemas()

Return the schemas for the reaction plugins known to kimmdy

prune

schema.prune(d)

Remove empty dicts from a nested dict

Back to top