diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 422223d..bd2214c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/python-poetry/poetry - rev: '1.2.2' + rev: '1.8.2' hooks: - id: poetry-check - id: poetry-lock - id: poetry-export - args: ["-f", "requirements.txt", "-o", "requirements.txt"] + args: [ "-o", "requirements.txt" ] - repo: https://github.com/pycqa/isort rev: '5.13.2' hooks: @@ -14,7 +14,3 @@ repos: rev: '22.12.0' hooks: - id: black -# - repo: https://github.com/pre-commit/mirrors-mypy -# rev: 'v0.991' -# hooks: -# - id: mypy diff --git a/README.md b/README.md index 42ef718..7e6747d 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,30 @@ This project aims to help the video upload process. It will create folders for each member and video based on their uuid. -## Run server +## Development + +### Pre-requisites + +1. Install python (see version in pyproject.toml) +2. Install poetry ```shell -uvicorn src.bss_web_file_server.main:app +poetry install ``` -## Development +### Set up commit hooks ```shell -uvicorn src.bss_web_file_server.main:app --reload +pre-commit install ``` -## Lint +## Run server + +```shell +uvicorn src.bss_web_file_server.main:app +``` + +### Lint ```shell poetry run isort . --check @@ -24,25 +35,34 @@ poetry run black . --check poetry run mypy -p src.bss_web_file_server ``` -Apply lint +#### Apply lint ```shell poetry run isort . poetry run black . ``` -## Test +### Run development server + +```shell +uvicorn src.bss_web_file_server.main:app --reload +``` + + +### Test ```shell poetry run pytest ``` -## Build docker image +### Build docker image + ```shell docker build -t bss_web_file_server . ``` -## Run docker compose +### Run docker compose + ```shell docker-compose up ``` \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9ffa46e..b6f6aff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,9 @@ mypy = "1.9.0" [tool.isort] profile = "black" +[tool.mypy] +packages= "src" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"