Skip to content

Commit

Permalink
Update pre commit (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
csikb committed Mar 18, 2024
1 parent a2de0a2 commit baeef8c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
8 changes: 2 additions & 6 deletions .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:
Expand All @@ -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
38 changes: 29 additions & 9 deletions README.md
Expand Up @@ -4,45 +4,65 @@ 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
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
```
3 changes: 3 additions & 0 deletions pyproject.toml
Expand Up @@ -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"

0 comments on commit baeef8c

Please sign in to comment.