From decd71c5cad091568289d1435e5c17f504d70cca Mon Sep 17 00:00:00 2001 From: rdbende Date: Sat, 10 Aug 2024 17:20:53 +0200 Subject: [PATCH] Add notes about development tools we use --- DEVELOPMENT.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index eb661f79..3082d364 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -2,10 +2,31 @@ This document is intended for software engineers and translators who would like to help out with the development of Cozy, or simply be able to run bleeding edge versions of the code locally. +## Code style + +To ensure good quality code, we lint our codebase with Ruff. We recommend that you run Ruff before pushing your changes to GitHub and correct the warnings, otherwise the automatic checks on pull requests will fail. + +``` +ruff check +``` + +For consistent code style, we format the source files using `black` and `isort`. Run these two tools on the changed files before committing. + +``` +black cozy +isort cozy +``` + +You can install these tools via pip: + +``` +pip install black isort ruff +``` + ## Building with GNOME Builder (recommended) -Cozy can be built and run with [GNOME Builder](https://apps.gnome.org/Builder/). +We recommend using [GNOME Builder](https://apps.gnome.org/Builder/) to build and run Cozy. 1. Open GNOME Builder 2. Click the **Clone Repository** button