172 lines
3.7 KiB
TOML
Executable File
172 lines
3.7 KiB
TOML
Executable File
[build-system]
|
|
requires = ["setuptools>=68.0", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "pricewatch"
|
|
version = "0.1.0"
|
|
description = "Application Python de suivi de prix e-commerce (Amazon, Cdiscount, extensible)"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
authors = [
|
|
{name = "PriceWatch Team"}
|
|
]
|
|
keywords = ["scraping", "e-commerce", "price-tracking", "amazon", "cdiscount"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
]
|
|
|
|
dependencies = [
|
|
# CLI
|
|
"typer[all]>=0.12.0",
|
|
|
|
# Data validation et serialization
|
|
"pydantic>=2.5.0",
|
|
"pydantic-settings>=2.1.0",
|
|
|
|
# HTTP scraping
|
|
"requests>=2.31.0",
|
|
"httpx>=0.26.0",
|
|
|
|
# Playwright scraping
|
|
"playwright>=1.41.0",
|
|
|
|
# HTML parsing
|
|
"beautifulsoup4>=4.12.0",
|
|
"lxml>=5.1.0",
|
|
"cssselect>=1.2.0",
|
|
|
|
# YAML parsing
|
|
"pyyaml>=6.0.1",
|
|
|
|
# Date/time utilities
|
|
"python-dateutil>=2.8.2",
|
|
|
|
# Database (Phase 2)
|
|
"sqlalchemy>=2.0.0",
|
|
"psycopg2-binary>=2.9.0",
|
|
"alembic>=1.13.0",
|
|
|
|
# Configuration (Phase 2)
|
|
"python-dotenv>=1.0.0",
|
|
|
|
# Worker/Queue (Phase 2)
|
|
"redis>=5.0.0",
|
|
"rq>=1.15.0",
|
|
"rq-scheduler>=0.13.0",
|
|
|
|
# API (Phase 3)
|
|
"fastapi>=0.110.0",
|
|
"uvicorn>=0.27.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
# Testing
|
|
"pytest>=8.0.0",
|
|
"pytest-cov>=4.1.0",
|
|
"pytest-asyncio>=0.23.0",
|
|
"pytest-mock>=3.12.0",
|
|
|
|
# Code quality
|
|
"ruff>=0.1.0",
|
|
"black>=24.0.0",
|
|
"mypy>=1.8.0",
|
|
|
|
# Type stubs
|
|
"types-requests>=2.31.0",
|
|
"types-pyyaml>=6.0.0",
|
|
"types-beautifulsoup4>=4.12.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
pricewatch = "pricewatch.app.cli.main:app"
|
|
|
|
[tool.setuptools]
|
|
packages = ["pricewatch", "pricewatch.app", "pricewatch.app.core",
|
|
"pricewatch.app.scraping", "pricewatch.app.stores",
|
|
"pricewatch.app.stores.amazon", "pricewatch.app.stores.cdiscount",
|
|
"pricewatch.app.cli"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py", "*_test.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
addopts = [
|
|
"-v",
|
|
"--strict-markers",
|
|
"--strict-config",
|
|
"--cov=pricewatch",
|
|
"--cov-report=term-missing",
|
|
"--cov-report=html",
|
|
]
|
|
markers = [
|
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
"integration: marks tests as integration tests",
|
|
"unit: marks tests as unit tests",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["pricewatch"]
|
|
omit = ["*/tests/*", "*/test_*.py"]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
"@abstractmethod",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 100
|
|
target-version = ["py312"]
|
|
include = '\.pyi?$'
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py312"
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
]
|
|
ignore = [
|
|
"E501", # line too long (handled by black)
|
|
"B008", # do not perform function calls in argument defaults
|
|
]
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
"__init__.py" = ["F401"] # unused imports in __init__.py
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
disallow_untyped_defs = false
|
|
disallow_incomplete_defs = false
|
|
check_untyped_defs = true
|
|
no_implicit_optional = true
|
|
warn_redundant_casts = true
|
|
warn_unused_ignores = true
|
|
warn_no_return = true
|
|
strict_equality = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"playwright.*",
|
|
"bs4.*",
|
|
]
|
|
ignore_missing_imports = true
|