mlfmu.utils.interface

Functions

generate_interface_docs([schema_dir, docs_dir])

Generate HTML documentation for the JSON interface schema files in the schema directory.

generate_interface_schema(model[, schema_dir])

Generate a JSON interface schema file for the given model.

publish_interface_schema([schema_dir, docs_dir])

Publish the JSON schema and HTML documentation for the interface.

mlfmu.utils.interface.generate_interface_docs(schema_dir: str | PathLike[str] | None = None, docs_dir: str | PathLike[str] | None = None) None

Generate HTML documentation for the JSON interface schema files in the schema directory.

Parameters:
  • os.PathLike[str] (docs_dir (str |) – The directory where the schema files are located. Defaults to None.

  • optional) – The directory where the schema files are located. Defaults to None.

  • os.PathLike[str] – The directory where the documentation files will be saved. Defaults to None.

  • optional) – The directory where the documentation files will be saved. Defaults to None.

mlfmu.utils.interface.generate_interface_schema(model: BaseModel | ModelMetaclass, schema_dir: str | PathLike[str] | None = None) None

Generate a JSON interface schema file for the given model.

Parameters:
  • ModelMetaclass) (model (BaseModel |)

  • os.PathLike[str] (schema_dir (str |) – The directory where the schema file will be saved. Defaults to None.

  • optional) – The directory where the schema file will be saved. Defaults to None.

mlfmu.utils.interface.publish_interface_schema(schema_dir: str | PathLike[str] | None = None, docs_dir: str | PathLike[str] | None = None) None

Publish the JSON schema and HTML documentation for the interface.

Parameters:
  • os.PathLike[str] (docs_dir (str |) – The directory where the schema file will be saved. Defaults to None.

  • optional) – The directory where the schema file will be saved. Defaults to None.

  • os.PathLike[str] – The directory where the documentation files will be saved. Defaults to None.

  • optional) – The directory where the documentation files will be saved. Defaults to None.