-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into rename-internal-recommendations
- Loading branch information
Showing
9 changed files
with
136 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.10.13-slim-bookworm | ||
|
||
RUN apt-get update && apt-get install --yes make bash-completion | ||
|
||
WORKDIR /app/dev/ | ||
|
||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
STOPSIGNAL SIGKILL | ||
CMD sleep infinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Commands inside the container | ||
|
||
all: pyupgrade black autoflake isort flake8 mypy | ||
|
||
pyupgrade: | ||
pyupgrade --py310-plus --exit-zero-even-if-changed $$(find . -name '*.py') | ||
|
||
check-pyupgrade: | ||
pyupgrade --py310-plus $$(find . -name '*.py') | ||
|
||
black: | ||
black src/ | ||
|
||
check-black: | ||
black --check --diff src/ | ||
|
||
autoflake: | ||
autoflake src/ | ||
|
||
isort: | ||
isort src/ | ||
|
||
check-isort: | ||
isort --check-only --diff src/ | ||
|
||
flake8: | ||
flake8 src/ | ||
|
||
mypy: | ||
mypy src/ | ||
|
||
validate-models: | ||
python src/validate.py | ||
|
||
# Docker manage commands | ||
|
||
run-dev: | ||
USER_ID=$$(id -u $${USER}) GROUP_ID=$$(id -g $${USER}) docker-compose up -d --build | ||
docker-compose exec models bash --rcfile /etc/bash_completion | ||
|
||
stop-dev: | ||
docker-compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: "3" | ||
services: | ||
models: | ||
build: . | ||
user: $USER_ID:$GROUP_ID | ||
volumes: | ||
- ..:/app | ||
depends_on: | ||
- postgres | ||
networks: | ||
- postgres | ||
postgres: | ||
image: postgres:15 | ||
environment: | ||
- POSTGRES_USER=openslides | ||
- POSTGRES_PASSWORD=openslides | ||
- POSTGRES_DB=openslides | ||
networks: | ||
- postgres | ||
networks: | ||
postgres: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
autoflake==2.2.1 | ||
black==24.1.1 | ||
flake8==7.0.0 | ||
isort==5.13.2 | ||
mypy==1.8.0 | ||
pytest==8.0.0 | ||
pyupgrade==3.15.0 | ||
pyyaml==6.0.1 | ||
simplejson==3.19.2 | ||
|
||
# typing | ||
types-PyYAML==6.0.12.12 | ||
types-simplejson==3.19.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[autoflake] | ||
verbose = true | ||
in-place = true | ||
remove-all-unused-imports = true | ||
ignore-init-module-imports = true | ||
recursive = true | ||
|
||
[isort] | ||
include_trailing_comma = true | ||
multi_line_output = 3 | ||
force_grid_wrap = 0 | ||
use_parentheses = True | ||
line_length = 88 | ||
|
||
[flake8] | ||
extend-ignore = E203,E501 | ||
|
||
[mypy] | ||
disallow_untyped_defs = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.