-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (131 loc) · 4.51 KB
/
pyproject.toml
File metadata and controls
150 lines (131 loc) · 4.51 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[project]
name = "backend.app"
dynamic = ["version"]
description = "API para busca de vagas de emprego para desenvolvedores e notificações de novas vagas."
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"alembic>=1.18.4",
"apscheduler>=3.11.2",
"beautifulsoup4>=4.14.3",
"discord>=2.3.2",
"fastapi[standard]>=0.135.1",
"hishel[async]>=1.1.9",
"httpx>=0.28.1",
"httpx-retries>=0.4.6",
"loguru>=0.7.3",
"psycopg[binary]>=3.3.3",
"pydantic>=2.12.5",
"pydantic-settings>=2.13.1",
"pyrate-limiter>=4.0.2",
"pytz>=2025.2",
"sqlalchemy>=2.0.46",
]
[dependency-groups]
dev = [
"coverage>=7.13.4",
"pre-commit>=4.5.1",
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
"radon>=6.0.1",
"respx>=0.22.0",
"ruff>=0.15.6",
"safety>=3.7.0",
"taskipy>=1.14.1",
"testcontainers>=4.14.1",
"towncrier>=25.8.0",
]
doc = [
"zensical>=0.0.27",
]
[tool.setuptools.packages.find]
where = ["."]
include = ["backend*"] # Inclui apenas os pacotes dentro do diretório backend
[tool.uv]
upgrade = true
[tool.ruff]
line-length = 79
exclude = ["migrations"]
[tool.ruff.lint]
preview = true
select = [
'I', # isort
'F', # pyflakes
'E', # pycodestyle errors
'W', # pycodestyle warnings
'PL', # pylint
'PT', # flake8-pytest-style
'FAST', # fastapi-specific rules
]
[tool.ruff.format]
preview = true
quote-style = 'single'
[tool.ruff.lint.per-file-ignores]
'**/routes/*.py' = ['PLR0917', 'PLR0913', 'E501']
'scheduler.py' = ['E712']
'notifiers.py' = ['E712']
'gupy.py' = ['E501']
'**/tests/**/*.py' = ['E501']
'main.py' = ['E501', 'PLR6301']
'**/schemas/*.py' = ['E501']
'linkedin.py' = ['PLR1702', 'E501']
[tool.pytest.ini_options]
addopts = '-p no:warnings'
asyncio_mode = 'auto'
[tool.coverage.run]
core = "ctrace"
concurrency = ["thread", "greenlet"]
source = ["backend"]
omit = [
"*/migrations/*",
"*/tests/*",
"database.py",
]
dynamic_context = "test_function"
[tool.coverage.report]
show_missing = true
sort = "-Cover"
[tool.coverage.html]
show_contexts = true
[tool.taskipy.tasks]
lint = {cmd='uv run ruff check .; uv run ruff check . --diff;', help='Executa a lintagem do código usando o ruff, verificando tanto os erros quanto as diferenças de formatação.'}
radon = {cmd='uv run radon cc ./backend -a -na', help='Analisa a complexidade do código usando o radon.'}
format = {cmd='ruff format .; ruff check . --fix', help='Formata o código usando o ruff'}
run = {cmd='uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4 --app-dir backend', help='Inicia o servidor FastAPI em modo de produção com 4 workers.'}
dev = {cmd='uv run uvicorn app.main:app --host 127.0.0.1 --port 8000 --workers 1 --app-dir backend --reload --log-level debug', help='Inicia o servidor FastAPI em modo de desenvolvimento com hot reload e log detalhado.'}
doc = {cmd='uv run zensical serve --dev-addr localhost:3000 --open', help='Inicia o servidor de documentação usando o zensical e abre no navegador.'}
test = {cmd='uv run pytest -s -x --cov=backend/app -v; coverage html', help='Executa os testes usando pytest com cobertura de código e gera um relatório HTML.'}
sync = {cmd='uv sync --all-groups', help='Sincroniza as dependências do projeto, incluindo as do grupo de desenvolvimento e documentação.'}
export = {cmd='uv export --no-hashes --no-dev -o requirements.txt', help='Exporta as dependências do projeto para um arquivo requirements.txt, sem incluir as dependências de desenvolvimento e sem hashes.'}
change = {cmd='uv run towncrier create', help='Cria uma nova entrada de changelog usando o towncrier.'}
changelog = {cmd='uv run towncrier build', help='Gera o changelog completo a partir das entradas criadas com o towncrier.'}
[tool.towncrier]
directory = "changelogs"
filename = "CHANGELOG.md"
title_format = '## [{version}](https://github.com/henriquesebastiao/vagas-dev/releases/{version}) - {project_date}'
issue_format = '[#{issue}](https://github.com/henriquesebastiao/vagas-dev/issues/{issue})'
[[tool.towncrier.type]]
directory = "feat"
name = "Funcionalidade"
showcontent = true
[[tool.towncrier.type]]
directory = "format"
name = "Formatação"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Correção de Bug"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Documentação"
showcontent = true
[[tool.towncrier.type]]
directory = "core"
name = "Core"
showcontent = true
[[tool.towncrier.type]]
directory = "bump"
name = "Atualizações"
showcontent = true