Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 1.45 KB

File metadata and controls

80 lines (52 loc) · 1.45 KB

Development

You will need python3 and openssh installed at a minimum.

Setup

Using Nix (Recommended)

The easiest way to get started is using Nix:

$ git clone git@github.com:numtide/deploykit.git
$ cd deploykit
$ nix develop

This will provide all necessary dependencies including pytest, mypy, and ruff.

Without Nix

Clone the project and install in development mode:

$ git clone git@github.com:numtide/deploykit.git
$ cd deploykit
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -e '.[dev]'

This will install deploykit in editable mode along with all development dependencies.

Running Tests

To run tests, you need pytest:

$ pytest ./tests

Code Quality

The project uses modern Python tooling:

  • Type checking with mypy
  • Formatting with ruff
  • Linting with ruff

Using treefmt (Recommended)

Run all formatters and linters at once (if you have nix installed)

$ nix fmt

Manual Usage

Type checking:

$ mypy deploykit tests

Formatting:

$ ruff format .

Linting:

$ ruff check --fix .

Logging

We use python3s logging library. DeployHost-related logging starting with [hostname] is handled by a logger called deploykit.command, other logging is handled by the deploykit.main logger.