Skip to content

Commit baeef8c

Browse files
authored
Update pre commit (#53)
1 parent a2de0a2 commit baeef8c

File tree

3 files changed

+34
-15
lines changed

3 files changed

+34
-15
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
22
- repo: https://github.com/python-poetry/poetry
3-
rev: '1.2.2'
3+
rev: '1.8.2'
44
hooks:
55
- id: poetry-check
66
- id: poetry-lock
77
- id: poetry-export
8-
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
8+
args: [ "-o", "requirements.txt" ]
99
- repo: https://github.com/pycqa/isort
1010
rev: '5.13.2'
1111
hooks:
@@ -14,7 +14,3 @@ repos:
1414
rev: '22.12.0'
1515
hooks:
1616
- id: black
17-
# - repo: https://github.com/pre-commit/mirrors-mypy
18-
# rev: 'v0.991'
19-
# hooks:
20-
# - id: mypy

README.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,65 @@ This project aims to help the video upload process.
44
It will create folders for each member and video
55
based on their uuid.
66

7-
## Run server
7+
## Development
8+
9+
### Pre-requisites
10+
11+
1. Install python (see version in pyproject.toml)
12+
2. Install poetry
813

914
```shell
10-
uvicorn src.bss_web_file_server.main:app
15+
poetry install
1116
```
1217

13-
## Development
18+
### Set up commit hooks
1419

1520
```shell
16-
uvicorn src.bss_web_file_server.main:app --reload
21+
pre-commit install
1722
```
1823

19-
## Lint
24+
## Run server
25+
26+
```shell
27+
uvicorn src.bss_web_file_server.main:app
28+
```
29+
30+
### Lint
2031

2132
```shell
2233
poetry run isort . --check
2334
poetry run black . --check
2435
poetry run mypy -p src.bss_web_file_server
2536
```
2637

27-
Apply lint
38+
#### Apply lint
2839

2940
```shell
3041
poetry run isort .
3142
poetry run black .
3243
```
3344

34-
## Test
45+
### Run development server
46+
47+
```shell
48+
uvicorn src.bss_web_file_server.main:app --reload
49+
```
50+
51+
52+
### Test
3553

3654
```shell
3755
poetry run pytest
3856
```
3957

40-
## Build docker image
58+
### Build docker image
59+
4160
```shell
4261
docker build -t bss_web_file_server .
4362
```
4463

45-
## Run docker compose
64+
### Run docker compose
65+
4666
```shell
4767
docker-compose up
4868
```

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ mypy = "1.9.0"
3030
[tool.isort]
3131
profile = "black"
3232

33+
[tool.mypy]
34+
packages= "src"
35+
3336
[build-system]
3437
requires = ["poetry-core"]
3538
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)