View on GitHub

skelebot

Machine Learning Project Development Tool

Home > API


Skelebot API

Version 2


YAML Generator Module

The YAML Generator provides functions for building the skelebot.yaml from a Config object and loading a Config object from a skelebot.yaml file as well. It also provides functions for saving and loading the VERSION file separately.


Import

from skelebot.systems.generators import yaml

loadConfig(env=None)

return Config

PARAMETER TYPE DESCRIPTION
env String The String name of the selected Skelebot environment that should be loaded
The loadConfig function will parse the skelebot.yaml file into a Config object along with the
version number from the VERSION file. If an environment name is specified with the 'env' parameter,
it will attempt to locate the corresponding override yaml file (skelebot-{env}.yaml) and use the
data inside to override the properties from the base file.

saveConfig(config)

return None

PARAMETER TYPE DESCRIPTION
config Config The Config object representing the project configuration to be saved to a file
The saveConfig function will convert the Config object to a Dict based on each object's toDict
implementation and then persist the resulting Dict object to the skelebot.yaml file along with the
associated version number to the VERSION file.

loadVersion()

return String

This function will return the version number String from the VERSION file inside the project.

loadVersion(version)

return None

PARAMETER TYPE DESCRIPTION
version String The string representation of the semantic version number to be saved to the VERSION file
This function will persist the given version number String to the VERSION file for the project.