Skip to content

Commit a1d3ceb

Browse files
committed
feat: Configure and run pre-commit hooks
Set up pre-commit hooks with the pre-commit Python package, enabling the following, as well as running them manually for the first time on the entire repository with 'pre-commit run --all-files': - trailing-whitespace - end-of-file-fixer - check-yaml - check-added-large-files - check-json - check-toml - ruff - ruff-format Signed-off-by: Phoevos Kalemkeris <[email protected]>
1 parent 88c0b38 commit a1d3ceb

File tree

85 files changed

+133
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+133
-84
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[run]
22
include = */app/*
3-
omit = */tests/*
3+
omit = */tests/*

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
**/app/model
2-
**/docker/*/.env*
2+
**/docker/*/.env*

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
uses: astral-sh/ruff-action@v1
3333
- name: Test
3434
run: |
35-
pytest --cov --cov-report=html:coverage_reports #--random-order
35+
pytest --cov --cov-report=html:coverage_reports #--random-order

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
default_install_hook_types:
2+
- pre-commit
3+
- post-checkout
4+
- post-merge
5+
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v5.0.0
9+
hooks:
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
- id: check-yaml
13+
- id: check-added-large-files
14+
- id: check-json
15+
- id: check-toml
16+
17+
- repo: https://github.com/astral-sh/ruff-pre-commit
18+
rev: v0.8.4
19+
hooks:
20+
- id: ruff
21+
entry: ruff check --force-exclude --fix
22+
- id: ruff-format
23+
entry: ruff format --force-exclude

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions

README.md

Lines changed: 2 additions & 2 deletions

app/api/auth/README.md

Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion

app/logging.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ args=(sys.stdout,)
3333
format=%(asctime)s %(levelname)-6s [%(name)s$%(funcName)s] %(message)s
3434

3535
[formatter_detailedFormatter]
36-
format=%(asctime)s %(levelname)-6s [%(name)s$%(funcName)s] %(message)s call_trace=%(pathname)s:%(lineno)-4d
36+
format=%(asctime)s %(levelname)-6s [%(name)s$%(funcName)s] %(message)s call_trace=%(pathname)s:%(lineno)-4d

app/management/README.md

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)