Skip to content

Latest commit

 

History

History
128 lines (81 loc) · 2.31 KB

DEVELOPMENT.md

File metadata and controls

128 lines (81 loc) · 2.31 KB

Developer Readme

This document contains documentation intended for developers of matcha.

Developer environment setup

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.5

Next, set up Poetry:

poetry env use 3.10.5
poetry install

Now, you can enter the Poetry shell:

poetry shell

Pre-commit checks

Install the git hook scripts

pre-commit install

The pre-commit checks will run automatically on the changed files after committing files using git commit command.

Optionally, to run the hooks against all of the files, run the following command.

pre-commit run --all-files

Testing

With the poetry shell active (see above), you can run all the tests using:

python -m pytest tests

Or specific tests:

python -m pytest tests/test_cli/test_cli.py

Build Python package

This will build the Python package and place it into the dist/ directory.

poetry build

Serve documentation locally

mkdocs serve

Terraform configuration for Matcha

The 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.

Modules

This module contains submodules for all the resources necessary for matcha

  • Azure Resource Group
  • Azure Kubernetes Cluster

Configuration

  • prefix -- prefix to use for resources, default: matcha
  • location -- Azure location to provision in

Getting started

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 init

Provision

To see what resources will be provisioned:

terraform plan

To provision:

terraform apply

To destroy:

terraform destroy