Skip to content

Latest commit

 

History

History
176 lines (121 loc) · 2.23 KB

File metadata and controls

176 lines (121 loc) · 2.23 KB

{{ cookiecutter.project_name.replace('-', ' ').replace('_', ' ') }}

Installation

  1. Clone git repo:
git clone {{ cookiecutter.git_repo_url }}.git
cd {{ cookiecutter.project_name.lower().replace(' ', '-') }}
  1. If you don't have uv installed run:
make uv-download
  1. Initialize uv and install pre-commit hooks:
make install
make pre-commit-install
  1. Run formatters, linters, and tests. Make sure there is no errors.
make format lint test

Makefile usage

Makefile contains a lot of functions for faster development.

1. Download uv

To download and install uv run:

make uv-install

2. Install all dependencies and pre-commit hooks

Install requirements:

make install

Pre-commit hooks coulb be installed after git init via

make pre-commit-install

3. Codestyle

Automatic formatting uses ruff formatter

make codestyle

# or use synonym
make format

Codestyle checks only, without rewriting files:

make check-codestyle

Update all libraries to the latest version using one command

make update

4. Code security

This command identifies security issues with Safety

make check-safety

5. Type checks

Run mypy static type checker

make mypy

6. Tests with coverage

Run pytest

make test

7. All linters

Of course there is a command to rule run all linters in one:

make lint

8. Docker

Run with docker compose

make docker-up

9. Cleanup

Delete cache and build files:

make cleanup

Credits

This project was generated with python-package-template