Komodo is a software distribution system.
The purpose of Komodo is to automatically, reproducibly, and testably create a software distribution. Automatic deploy of new releases, as well as nightly deploy and the option of automatically moving the testing stage, is supported.
The tool is not hosted on PyPI but can be installed with pip
directly from
GitHub:
pip install git+https://github.com/equinor/komodo.git
The documentation is online.
Developers can build it by installing with dev-dependencies by running pip install ".[dev]"
and running make html
in the docs
directory.
We have a 'repository' of packages described in a YAML file. Each package contains a list of one or more versions. Each version contains:
- Build information.
- Maintainer.
- Source, e.g. PyPI or a GitHub repository, if required.
- Dependency list, if any.
- Other metadata, depending on the type of package.
For example, we may have a repository.yml
like this:
python:
3-builtin:
make: sh
makefile: build__python-virtualenv.sh
maintainer: [email protected]
makeopts: --virtualenv-interpreter python3
treelib:
1.6.1:
source: pypi
make: pip
maintainer: [email protected]
depends:
- python
Note that build__python-virtualenv.sh
is a script that comes with komodo
(in komodo/data
); it will use the system Python in the environment it builds.
Now a 'release', e.g. stable, is defined in another YAML file, e.g.
stable.yml
, containing some or all of the packages in the repository file:
python: 3-builtin
treelib: 1.6.1
A full software distribution can then be built and deployed to a specified
path, e.g. ./builds/stable-0.0.1
, with the following command:
kmd stable.yml repository.yml --prefix builds --release stable-0.0.1
To use this environment, type source builds/stable-0.0.1/enable
.
As well as the kmd
command, this package installs several other
commands, each with its own options:
komodo-check-symlinks
— Verify symlinks for komodo versions are according to a given configkomodo-check-pypi
— Checks if pypi packages are up to datekomodo-clean-repository
— Clean up unused versions in the repository file based on a set of releaseskomodo-create-symlinks
— Create symlinks for komodo versionskomodo-extract-dep-graph
— Extracts dependencies from a given set of packageskomodo-insert-proposals
— Copy proposals into release and create PRkomodo-lint
— Lint komodo setupkomodo-lint-maturity
— Lint the maturity of packageskomodo-lint-package-status
— Lint the package status filekomodo-lint-upgrade-proposals
— Lint the upgrade proposals file against the repository filekomodo-non-deployed
— Outputs the name of undeployed matrices given an installation root and a release folderkomodo-post-messages
— Post messages to a releasekomodo-reverse-deps
— Extracts dependencies from a given set of packageskomodo-show-version
— Return the version of a specified package in the active releasekomodo-snyk-test
— Test a release for security and license issueskomodo-suggest-symlinks
— Returns a pull request if the symlink configuration could be updatedkomodo-transpiler
— Build release files
In a virtual environment:
git clone https://github.com/equinor/komodo.git
cd komodo
pip install ".[dev]"
pytest tests