-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
111 lines (99 loc) · 3.19 KB
/
pyproject.toml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[tool.poetry]
name = "statbov"
version = "0.1.0"
description = "Uma plataforma para análise estatística de desempenho da produção de rebanhos bovinos."
authors = ["Henrique Sebastião <[email protected]>"]
readme = "README.md"
license = "MIT"
[tool.poetry.dependencies]
python = "^3.12.3"
django = "^5.1"
python-decouple = "^3.8"
psycopg2-binary = "^2.9.9"
fontawesomefree = "^6.6.0"
python-dotenv = "^1.0.1"
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.2"
pytest-cov = "^6.0.0"
taskipy = "^1.13.0"
blue = "^0.9.1"
ruff = "^0.7.0"
isort = "^5.13.2"
pytest-django = "^4.8.0"
selenium = "^4.23.1"
pydocstyle = "^6.3.0"
bandit = {extras = ["toml"], version = "^1.7.9"}
radon = {extras = ["toml"], version = "^6.0.1"}
mypy = "^1.11.1"
requests = "^2.32.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 79
exclude = ['migrations', '__init__.py']
[tool.isort]
profile = "django"
line_length = 79
extend_skip = ['migrations']
[tool.blue]
extend-exclude = '(migrations/)'
[tool.coverage.run]
branch = true
omit = ["**/*test*.py", "manage.py", "**/migrations/*", "**/project/*.py"]
[tool.coverage.html]
directory = "htmlcov"
[tool.pytest.ini_options]
pythonpath = "."
DJANGO_SETTINGS_MODULE = "statbov.settings"
python_files = "test.py tests.py test_*.py tests_*.py *_test.py *_tests.py"
addopts = "--strict-markers -v"
norecursedirs = "dist build .* data venv"
markers = [
"functional_test: Run tests that are selenium based",
"not_in_sqlite: Run tests that are not in postgresql",
]
[tool.commitizen]
version_provider = "poetry"
update_changelog_on_bump = true
style = [
["qmark", "fg:#ff9d00 bold"],
["question", "bold"],
["answer", "fg:#ff9d00 bold"],
["pointer", "fg:#ff9d00 bold"],
["highlighted", "fg:#ff9d00 bold"],
["selected", "fg:#cc5454"],
["separator", "fg:#cc5454"],
["instruction", ""],
["text", ""],
["disabled", "fg:#858585 italic"]
]
[[tool.mypy.overrides]]
module = [
"django.*",
"decouple.*",
]
ignore_missing_imports = true
[tool.taskipy.tasks]
lint = "task ruff && task blue && task isort && task pydocstyle"
format = "blue . && isort ."
quality = "task radon && task mypy"
sec = "task bandit && task pip-audit"
ruff = "ruff check ."
blue = "blue --check . --diff"
isort = "isort --check --diff ."
pydocstyle = "pydocstyle ./tests/utils --count --convention=google --add-ignore=D100,D104,D105,D106,D107"
radon = "radon cc ./statbov -a -na"
mypy = "mypy -p statbov -m manage -p tests"
bandit = "bandit -r ./statbov"
run = "python manage.py runserver"
pre_test = "task lint && task quality"
test = 'export POSTGRES_HOST="localhost" && pytest -s -x --cov=statbov -vv'
post_test = "coverage html"
functional-test = 'export POSTGRES_HOST="localhost" && pytest -m "functional_test"'
pre-commit = "task test && task functional-test && task export-requirements"
export-requirements = "rm requirements.txt && poetry export -f requirements.txt --output requirements.txt --without-hashes --without dev"
makemigrations = "python manage.py makemigrations"
migrate = "python manage.py migrate"
update = "poetry update && task export-requirements"
update-chromedriver = "python scripts/update_chromedriver.py"