Sprint 1 initialization: - Project directory structure (portfolio_app/, tests/, dbt/, data/, scripts/) - CLAUDE.md with AI assistant context - pyproject.toml with all dependencies - docker-compose.yml for PostgreSQL 16 + PostGIS - Makefile with standard targets - Pre-commit configuration (ruff, mypy) - Environment template (.env.example) - Error handling foundation (PortfolioError hierarchy) - Test configuration (conftest.py, pytest config) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
149 lines
2.8 KiB
TOML
149 lines
2.8 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=61.0", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "portfolio"
|
|
version = "0.1.0"
|
|
description = "Analytics Portfolio - Data engineering and visualization showcase"
|
|
readme = "README.md"
|
|
license = {text = "MIT"}
|
|
requires-python = ">=3.11"
|
|
authors = [
|
|
{name = "Leo Miranda"}
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
]
|
|
dependencies = [
|
|
# Database
|
|
"sqlalchemy>=2.0",
|
|
"psycopg2-binary>=2.9",
|
|
"geoalchemy2>=0.14",
|
|
|
|
# Validation
|
|
"pydantic>=2.0",
|
|
"pydantic-settings>=2.0",
|
|
|
|
# Data Processing
|
|
"pandas>=2.1",
|
|
"geopandas>=0.14",
|
|
"shapely>=2.0",
|
|
|
|
# Visualization
|
|
"dash>=2.14",
|
|
"plotly>=5.18",
|
|
"dash-mantine-components>=0.14",
|
|
|
|
# PDF Parsing
|
|
"pdfplumber>=0.10",
|
|
"tabula-py>=2.9",
|
|
|
|
# Utilities
|
|
"python-dotenv>=1.0",
|
|
"httpx>=0.25",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
# Testing
|
|
"pytest>=7.0",
|
|
"pytest-cov>=4.0",
|
|
"pytest-asyncio>=0.21",
|
|
|
|
# Linting & Formatting
|
|
"ruff>=0.1",
|
|
"mypy>=1.7",
|
|
|
|
# Pre-commit
|
|
"pre-commit>=3.5",
|
|
|
|
# Type stubs
|
|
"pandas-stubs",
|
|
"types-requests",
|
|
]
|
|
dbt = [
|
|
"dbt-postgres>=1.7",
|
|
]
|
|
|
|
[project.scripts]
|
|
portfolio = "portfolio_app.app:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["portfolio_app*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_functions = ["test_*"]
|
|
addopts = [
|
|
"-v",
|
|
"--tb=short",
|
|
"--strict-markers",
|
|
]
|
|
markers = [
|
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
"integration: marks tests as integration tests",
|
|
]
|
|
|
|
[tool.ruff]
|
|
target-version = "py311"
|
|
line-length = 88
|
|
exclude = [
|
|
".git",
|
|
".venv",
|
|
"__pycache__",
|
|
"build",
|
|
"dist",
|
|
".ruff_cache",
|
|
"dbt/target",
|
|
]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
"SIM", # flake8-simplify
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by formatter)
|
|
]
|
|
|
|
[tool.ruff.lint.isort]
|
|
known-first-party = ["portfolio_app"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
skip-magic-trailing-comma = false
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
strict = true
|
|
warn_return_any = true
|
|
warn_unused_ignores = true
|
|
disallow_untyped_defs = true
|
|
plugins = ["pydantic.mypy"]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"dash.*",
|
|
"plotly.*",
|
|
"geopandas.*",
|
|
"shapely.*",
|
|
"pdfplumber.*",
|
|
"tabula.*",
|
|
]
|
|
ignore_missing_imports = true
|