This document contains documentation intended for developers of matcha.
In order to work on the tool as a developer, you'll need to configure your local development environment.
Pre-requisites
Setup
First, use PyEnv to install the recommended version of Python:
pyenv install 3.10.5
pyenv local 3.10.5Next, set up Poetry:
poetry env use 3.10.5
poetry installNow, you can enter the Poetry shell:
poetry shellPre-commit checks
Install the git hook scripts
pre-commit installThe pre-commit checks will run automatically on the changed files after committing files using
git commitcommand.
Optionally, to run the hooks against all of the files, run the following command.
pre-commit run --all-filesTesting
With the poetry shell active (see above), you can run all the tests using:
python -m pytest testsOr specific tests:
python -m pytest tests/test_cli/test_cli.pyBuild Python package
This will build the Python package and place it into the dist/ directory.
poetry buildServe documentation locally
mkdocs serveThe default Terraform module in src/infrastructure configures default resources on Azure for matcha. This module is not intended to be run on its own, but to be used by the match CLI tool.
This module contains submodules for all the resources necessary for matcha
- Azure Resource Group
- Azure Kubernetes Cluster
prefix-- prefix to use for resources, default: matchalocation-- Azure location to provision in
The module is not intended to be run on its own, but by the matcha CLI tool. However, it is possible to run it without matcha.
Pre-requisite: Terraform
Initialize terraform module:
cd src/matcha_ml/infrastructure
terraform initTo see what resources will be provisioned:
terraform planTo provision:
terraform applyTo destroy:
terraform destroy