unicorn_post/README.md

2.2 KiB

unicorn_post

A Django web app to post messages on my Pimoroni Galactic unicorn via MQTT.

tooling

devcontainer

This project uses a devcontainer to provide a consistent development environment. The devcontainer is based on the official Python devcontainer.

poetry

This project uses poetry to manage dependencies. Poetry is installed in the devcontainer and can be used to install dependencies. Poetry is configured to not create a virtual environment, instead it uses the devcontainer's python environment. To install all the dependencies run the command: poetry install.

pre-commit

This project uses pre-commit to run checks on the code before committing. Pre-commit is installed poetry and can be used to install the git hooks. To install the git hooks run the command: pre-commit install. The pre-commit configuration is in the .pre-commit-config.yaml file. To run the checks manually run the command: pre-commit run.

black

This project uses black to format the code. Black is installed by poetry and can be used to format the code. To format the code run the command: black . in the repo root folder.

mypy

This project uses mypy to check the types. Mypy is installed by poetry and can be used to check the types. To check the types run the command: mypy . in the unicorn_post folder.

pylint

This project uses pylint to check the code. Pylint is installed by poetry and can be used to check the code. To check the code run the command: pylint unicorn_post/* in the repo root folder.

development

database

The .devcontainer folder also contains a db.env file which is used to configure the development database.

TODO

  • implement production code
  • Add a CI pipeline => run poet tasks
  • Add semantic versioning => bump + release step
  • Add a CD pipeline => dockerfile, build and deploy on tag
  • Rewrite README
  • Add a test suite => what to test ? coverage (genbadge)