Compiler Configuration Reference

project.yml

Inside any project the compiler expects a project.yml file that defines metadata about the project, the location to store modules, repositories where to find modules and possibly specific versions of modules.

For basic usage information, see Project creation guide.

The project.yml file defines the following settings:

class inmanta.module.ProjectMetadata(*, name: str, description: str = None, requires: List[str] = [], freeze_recursive: bool = False, freeze_operator: inmanta.module.ConstrainedStrValue = '~=', author: str = None, author_email: pydantic.networks.NameEmail = None, license: str = None, copyright: str = None, modulepath: List[str] = [], repo: List[inmanta.module.ModuleRepoInfo] = [], downloadpath: str = None, install_mode: inmanta.module.InstallMode = InstallMode.release)[source]
Parameters
  • name – The name of the project.

  • description – (Optional) An optional description of the project

  • author – (Optional) The author of the project

  • author_email – (Optional) The contact email address of author

  • license – (Optional) License the project is released under

  • copyright – (Optional) Copyright holder name and date.

  • modulepath – (Optional) This value is a list of paths where Inmanta should search for modules. Paths are separated with :

  • downloadpath – (Optional) This value determines the path where Inmanta should download modules from repositories. This path is not automatically included in in modulepath!

  • install_mode – (Optional) This key determines what version of a module should be selected when a module is downloaded. For more information see InstallMode.

  • repo – (Optional) This key requires a list (a yaml list) of repositories where Inmanta can find modules. Inmanta creates the git repo url by formatting {} or {0} with the name of the repo. If no formatter is present it appends the name of the module. Inmanta tries to clone a module in the order in which it is defined in this value.

  • requires – (Optional) This key can contain a list (a yaml list) of version constraints for modules used in this project. Similar to the module, version constraints are defined using PEP440 syntax.

  • freeze_recursive – (Optional) This key determined if the freeze command will behave recursively or not. If freeze_recursive is set to false or not set, the current version of all modules imported directly in the main.cf file will be set in project.yml. If it is set to true, the versions of all modules used in this project will set in project.yml.

  • freeze_operator – (Optional) This key determines the comparison operator used by the freeze command. Valid values are [==, ~=, >=]. Default is ‘~=’

module.yml

Inside any module the compiler expects a module.yml file that defines metadata about the module.

The module.yml file defines the following settings:

class inmanta.module.ModuleMetadata(*, name: str, description: str = None, requires: List[str] = [], freeze_recursive: bool = False, freeze_operator: inmanta.module.ConstrainedStrValue = '~=', version: str, license: str, compiler_version: str = None)[source]
Parameters
  • name – The name of the module.

  • description – (Optional) The description of the module

  • version – The version of the inmanta module.

  • license – The license for this module

  • compiler_version – (Optional) The minimal compiler version required to compile this module.

  • requires

    (Optional) Model files import other modules. These imports do not determine a version, this is based on the install_model setting of the project. Modules and projects can constrain a version in the requires setting. Similar to the module, version constraints are defined using PEP440 syntax.

  • freeze_recursive – (Optional) This key determined if the freeze command will behave recursively or not. If freeze_recursive is set to false or not set, the current version of all modules imported directly in any submodule of this module will be set in module.yml. If it is set to true, all modules imported in any of those modules will also be set.

  • freeze_operator – (Optional) This key determines the comparison operator used by the freeze command. Valid values are [==, ~=, >=]. Default is ‘~=’