blob: 4a1e9d331046a68720c85709f1f8e7c79cc56485 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
falcon = "~= 2.0.0"
gunicorn = "~= 20.0"
jsonschema = "~= 3.2"
protobuf = "~= 3.14"
sentry-sdk = {extras = ["falcon"], version = "~= 0.19.3"}
[dev-packages]
coverage = "~= 5.3"
flake8 = "~= 3.8.4"
flake8-annotations = "~= 2.5.0"
flake8-bugbear = "~= 20.11"
flake8-docstrings = "~= 1.5"
flake8-formatter-junit-xml = "~= 0.0.6"
flake8-import-order = "~= 0.18.1"
flake8-quotes = "~= 3.2"
flake8-string-format = "~= 0.3.0"
flake8-tidy-imports = "~= 4.2"
flake8-todo = "~= 0.7"
pep8-naming = "~= 0.11.1"
pre-commit = "~= 2.9.3"
pydocstyle = "~= 5.1"
[requires]
python_version = "3.9"
[scripts]
eval = "python -m snekbox"
webserver = "gunicorn -c config/gunicorn.conf.py snekbox.api.app"
# Linting
lint = "pre-commit run --all-files"
precommit = "pre-commit install"
# Testing
report = "coverage report"
# Fix ownership of the coverage file even if tests fail & preserve exit code
test = """
docker-compose run --entrypoint /bin/bash --rm snekbox -c \
'coverage run -m unittest; e=$?; chown --reference=. .coverage; exit $e'
"""
# Docker
build = "docker build -t ghcr.io/python-discord/snekbox:latest ."
devsh = "docker-compose run --entrypoint /bin/bash --rm snekbox"
# Other
protoc = "python -m scripts.protoc"
|