Skip to content

Commit

Permalink
update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Nov 21, 2023
1 parent 52e75af commit 8da5c5c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,14 @@ fix:
$(EXEC_CMD) poetry run black --exclude=venv .
$(EXEC_CMD) poetry run isort --skip-glob="**/migrations" --extend-skip-glob="venv" .


.PHONY: init
init:
$(EXEC_CMD) poetry install
$(EXEC_CMD) poetry run pre-commit install
$(EXEC_CMD) poetry run python manage.py migrate
$(EXEC_CMD) poetry run python manage.py collectstatic --noinput

.PHONY: runserver
runserver:
$(EXEC_CMD) poetry run python manage.py runserver $(HOST_URL):$(HOST_PORT)
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,18 @@ cp .env.example .env

Cf. la [documentation de poetry](https://python-poetry.org/docs/#installationok)

#### Installer les dépendances
#### Installer le projet

- La commande suivante installe les dépendances, fait les migrations et collecte les fichiers
```
poetry install
make init
```

#### Lancer les migrations

```
python manage.py migrate
```

#### Lancer le serveur

```
poetry run python manage.py runserver
make runserver
```

#### Effectuer les tests
Expand Down

0 comments on commit 8da5c5c

Please sign in to comment.