kloch¶
Warning
Despite being public, this repository is still in development stage and have not been tested extensively yet.
kloch
/klˈoʃ/ [1] [2], is a configuration system for launching software.
Configurations are yaml files referred as environment profile which specify the parameters for one or multiple pre-defined launchers.
__magic__: kloch_profile:4
identifier: knots:echoes:beta
version: 0.3.2
launchers:
.base:
environ:
PROD_STATUS: beta
PROD_NAME: echoes
rezenv:
requires:
houdini: 20.1
maya: 2023
devUtils: 1+
rezenv@os=windows:
config:
default_shell: "powershell"
__magic__: kloch_profile:4
identifier: knots:echoes
version: 0.2.0
inherit: knots:echoes:beta
launchers:
.base:
environ:
PROD_STATUS: prod
rezenv:
requires:
houdini: 20.2
-=devUtils: _
Launchers are internally-defined python objects that specify how to execute a combinations of options and (optional) command.
To use the profile, one must call the CLI tool. The profile example shared above can be launched using:
python -m kloch run knots:echoes
Design¶
kloch was initially designed as the environment manager layer when used with the rez package manager.
In a very abstract way, kloch is a system that:
serialize the arguments passed to a pre-defined function as yaml files.
myLauncher(optionA="paint.exe", optionB={"PATH": "/foo"})
becomes:
myLauncher: optionA: paint.exe optionB: PATH: /foo
execute that function by unserializing the parameters provided at runtime.
profile = read_profile("myProfile.yml") for launcher_name, launcher_config in profile.items(): launcher = get_launcher(launcher_name) launcher(**launcher_config)
Features¶
offer a CLI and a public python API
- custom config format for environment profiles:
inheritance
inheritance merging rules with token system
arbitrary profile locations with flexible configuration
plugin system for launchers
Programming distinctions¶
robust logging.
good amount of unittesting
good documentation with a lot of doc created at code level
python 3.7+ support (EOL was in June 2023).
PyYAML as only mandatory external python dependency.
flexible “meta” configuration from environment variable or config file.
clear public and private API
Contents¶
- Public API
- Launcher Plugins
- Contributing
- Changelog
- [0.12.0] - 2024-11-??
- [0.11.2] - 2024-10-26
- [0.11.1] - 2024-10-26
- [0.11.0] - 2024-10-26
- [0.10.0] - 2024-08-04
- [0.9.0] - 2024-07-03
- [0.8.2] - 2024-06-29
- [0.8.1] - 2024-06-29
- [0.8.0] - 2024-06-29
- [0.7.0] - 2024-05-27
- [0.6.0] - 2024-05-25
- [0.5.2] - 2024-05-06
- [0.5.1] - 2024-05-04
- [0.5.0] - 2024-05-04
- [0.4.0] - 2024-05-04
- [0.3.0] - 2024-05-04
- [0.2.0] - 2024-05-02
- [0.1.0] - 2024-05-02
- GitHub
References