Commit Inicial
This commit is contained in:
commit
0f47953453
24 changed files with 1366 additions and 0 deletions
75
pyproject.toml
Normal file
75
pyproject.toml
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
[project]
|
||||
name = "api-scardua"
|
||||
version = "0.1.0"
|
||||
description = "API de integracao com servicos externos (Holmes, Apollo) e banco Oracle"
|
||||
requires-python = ">=3.10"
|
||||
readme = "README.md"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Dependencias principais — necessarias para a aplicacao rodar
|
||||
# (todas sao importadas no carregamento dos modulos, portanto obrigatorias)
|
||||
# ---------------------------------------------------------------------------
|
||||
dependencies = [
|
||||
"fastapi>=0.115", # Framework da API
|
||||
"uvicorn[standard]>=0.34", # Servidor ASGI
|
||||
"pydantic>=2.0", # Validacao / configs (app/config.py)
|
||||
"httpx>=0.27", # Chamadas HTTP as APIs externas (Holmes etc.)
|
||||
"oracledb>=2.0", # Driver Oracle moderno (substitui cx_Oracle)
|
||||
]
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Dependencias opcionais
|
||||
# pip install .[dev] → ferramentas de desenvolvimento
|
||||
# ---------------------------------------------------------------------------
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-cov>=6.0",
|
||||
"pytest-asyncio>=0.24",
|
||||
"ruff>=0.8",
|
||||
"httpx>=0.27", # Necessario para o TestClient do FastAPI
|
||||
]
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Configuracao do pytest
|
||||
# ---------------------------------------------------------------------------
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
pythonpath = ["."] # Permite "from app...." a partir da raiz
|
||||
addopts = "-v --tb=short"
|
||||
asyncio_mode = "auto"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Configuracao do Ruff (linter + formatter)
|
||||
# ---------------------------------------------------------------------------
|
||||
[tool.ruff]
|
||||
target-version = "py310"
|
||||
line-length = 120
|
||||
src = ["app", "tests"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"N", # pep8-naming
|
||||
"UP", # pyupgrade
|
||||
]
|
||||
ignore = [
|
||||
"E501", # line too long (controlado pelo formatter)
|
||||
]
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "double"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Build system
|
||||
# ---------------------------------------------------------------------------
|
||||
[build-system]
|
||||
requires = ["setuptools>=75.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["."]
|
||||
include = ["app*"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue