From e2d412c7d0e7cde809e88811163944a6129b2398 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 10 Feb 2022 20:30:40 +0100 Subject: [PATCH] Add CONTRIBUTING.nd & requirements-dev.txt --- CONTRIBUTING.md | 25 +++++++++++++++++++++++++ requirements-dev.txt | 4 ++++ 2 files changed, 29 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 requirements-dev.txt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..16e3dfea --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ +; SHARED on https://pad.cas.cat/usody-devicehub-contributing + +# Contributing to devicehub + +## Writing code + +### Coding style + +#### Python style +- Unless otherwise specified, follow [PEP 8](https://www.python.org/dev/peps/pep-0008). Use [flake8](https://pypi.org/project/flake8/) to check for problems in this area. +- Use [isort](https://github.com/PyCQA/isort#readme) to automate import sorting. + +To automatize this work just configure `pre-commit` hooks in your development environment: +```bash +# on your virtual environment +pip install -r requirements-dev.txt +pre-commit install +``` + +#### HTML (templates) +- Template file names should be all lowercase, using underscores instead of camelCase. + + Do this: `device_detail.html` + + Don't do this: `DeviceDetail.html`, `Device-detail.html` diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..02778f7d --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,4 @@ +black +isort +flake8 +pre-commit