Merge branch 'testing' into dependabot/pip/sqlalchemy-1.3.0
This commit is contained in:
commit
197caa5068
|
@ -0,0 +1,17 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 22.1.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
- repo: https://github.com/PyCQA/isort
|
||||||
|
rev: 5.9.3
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
rev: 4.0.1
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
- repo: https://github.com/conorfalvey/check_pdb_hook
|
||||||
|
rev: 0.0.9
|
||||||
|
hooks:
|
||||||
|
- id: check_pdb_hook
|
|
@ -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`
|
|
@ -0,0 +1,6 @@
|
||||||
|
[tool.black]
|
||||||
|
skip-string-normalization = true
|
||||||
|
target-version = ['py38']
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
multi_line_output = 4
|
|
@ -0,0 +1,4 @@
|
||||||
|
black
|
||||||
|
isort
|
||||||
|
flake8
|
||||||
|
pre-commit
|
|
@ -20,7 +20,7 @@ pytest==3.7.2
|
||||||
pytest-runner==4.2
|
pytest-runner==4.2
|
||||||
python-dateutil==2.7.3
|
python-dateutil==2.7.3
|
||||||
python-stdnum==1.9
|
python-stdnum==1.9
|
||||||
PyYAML==3.13
|
PyYAML==5.4
|
||||||
requests[security]==2.27.1
|
requests[security]==2.27.1
|
||||||
requests-mock==1.5.2
|
requests-mock==1.5.2
|
||||||
SQLAlchemy==1.3.24
|
SQLAlchemy==1.3.24
|
||||||
|
|
Reference in New Issue