mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-11 17:29:14 +02:00
- Remove duckduckgo-search dependency (unreliable results) - Add direct_search_service.py that scrapes sites' search pages directly - Add search_url and product_link_selector fields to SearchSite model - Add beautifulsoup4 and lxml for HTML parsing - Update schemas with new fields - Add database migration for new columns Direct search is more reliable as it queries each site's own search functionality instead of relying on external search engines.
102 lines
1.8 KiB
TOML
102 lines
1.8 KiB
TOML
[project]
|
|
name = "priceflow-backend"
|
|
version = "0.1.0"
|
|
description = "Backend for PriceFlow Price Tracker"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi",
|
|
"uvicorn",
|
|
"sqlalchemy",
|
|
"psycopg2-binary",
|
|
"playwright",
|
|
"requests",
|
|
"httpx",
|
|
"pydantic",
|
|
"apprise",
|
|
"Pillow",
|
|
"apscheduler",
|
|
"python-multipart",
|
|
"pydantic-settings",
|
|
"aiofiles",
|
|
"litellm",
|
|
"alembic",
|
|
"tenacity",
|
|
"slowapi",
|
|
"beautifulsoup4",
|
|
"lxml",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["app"]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest",
|
|
"pytest-asyncio",
|
|
"pytest-cov",
|
|
"ruff",
|
|
"httpx",
|
|
"mypy",
|
|
"bandit",
|
|
"pip-audit",
|
|
"pre-commit",
|
|
]
|
|
|
|
[tool.hatch.envs.default]
|
|
dependencies = [
|
|
"pytest",
|
|
"ruff",
|
|
"httpx",
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "W", "B", "UP", "PL", "RUF"]
|
|
ignore = []
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*" = ["PLR2004"]
|
|
"app/routers/*" = ["B008"]
|
|
"app/main.py" = ["B008"]
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
pythonpath = ["."]
|
|
testpaths = ["tests"]
|
|
addopts = "--cov=app --cov-report=html --cov-report=term-missing"
|
|
asyncio_mode = "auto"
|
|
|
|
[tool.coverage.run]
|
|
source = ["app"]
|
|
omit = ["*/tests/*", "*/alembic/*"]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
"@abstractmethod",
|
|
]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
disallow_untyped_defs = false # Enable gradually
|
|
ignore_missing_imports = true
|
|
|
|
[tool.bandit]
|
|
exclude_dirs = ["tests", "app/alembic"]
|
|
skips = ["B101"] # Skip assert_used (common in tests)
|