-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
77 lines (69 loc) · 3.55 KB
/
Copy pathpyproject.toml
File metadata and controls
77 lines (69 loc) · 3.55 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
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[project]
name = "letusgoshopping"
version = "0.1.0"
description = "Turn any brand's product data into platform-ready, multilingual commerce assets."
readme = "README.md"
requires-python = ">=3.9"
# Apache-2.0 for the project. Parts of listingforge/poster/** and packaging/** are derived
# from PosterForge (MIT) and stay under MIT — attribution lives in NOTICE, not here, so
# PyPI classifiers and downstream SBOM tools see one unambiguous project license.
license = { text = "Apache-2.0" }
authors = [{ name = "The Letusgoshopping Authors" }]
keywords = ["ecommerce", "localization", "cross-border", "product-data", "listings", "amazon"]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Topic :: Office/Business",
]
# The one and only runtime dependency. Everything the poster subsystem needs is an extra,
# imported lazily inside the function that uses it — enforced by tests/test_light_core.py.
dependencies = ["jinja2>=3.0"]
[project.optional-dependencies]
schema = ["jsonschema>=4.0"] # full JSON-Schema validation (else: minimal built-in checks)
llm = ["anthropic>=0.40"] # `localize --provider anthropic`, poster extract/enrich/verify
openai = ["openai>=1.40"] # OpenAI or any OpenAI-compatible/local endpoint
spec = ["pydantic>=2.6"] # poster's in-memory ProductSpec model
acquire = ["httpx>=0.27"] # tier-1 HTTP fetch
extract = ["trafilatura>=1.8", "selectolax>=0.3", "beautifulsoup4>=4.12"]
browser = ["playwright>=1.44"] # tier-2 headless fetch, HTML→PNG
render = ["playwright>=1.40"] # legacy alias of [browser]
image = ["pillow>=10.0", "numpy>=1.24"]
cutout = ["rembg>=2.0", "onnxruntime>=1.17"]
agent = ["browser-use>=0.1; python_version>='3.11'", "playwright>=1.44"]
app = ["fastapi>=0.110", "uvicorn>=0.29", "python-multipart>=0.0.9"]
desktop = ["letusgoshopping[app]", "pywebview>=5.0"]
build = ["pyinstaller>=6.6"]
poster = ["letusgoshopping[spec,acquire,browser,image,llm]"]
all = ["letusgoshopping[poster,schema,extract,cutout,openai,agent,app,desktop]"]
# Still stdlib unittest — no pytest. These are the extras the *tests* exercise: without
# them the poster tests skip themselves and CI goes hollow-green.
dev = ["letusgoshopping[schema,spec,image]"]
[project.scripts]
listingforge = "listingforge.cli:main"
[project.urls]
Homepage = "https://github.com/KeepIntouch2024/Letusgoshopping"
# Templates, schema and examples still live at the repo root (not inside the package), so
# this tool runs from a clone or an editable install (`pip install -e .`). Moving them into
# the package so a plain wheel works is Phase 5.
[tool.setuptools]
packages = [
"listingforge", "listingforge.poster", "listingforge.poster.compose",
"listingforge.poster.acquire", "listingforge.poster.discover",
"listingforge.poster.extract", "listingforge.poster.enrich",
"listingforge.poster.render", "listingforge.poster.verify",
"listingforge.poster.llm", "listingforge.poster.app",
]
[tool.setuptools.package-data]
"listingforge.poster.compose" = ["base.html", "blocks/*.html", "themes/*.json"]
"listingforge.poster.app" = ["static/*"]
[tool.ruff]
# The floor is Python 3.9 (see requires-python). Without this, ruff assumes a newer target
# and its pyupgrade rules "fix" `Optional[str]` into `str | None`, which is a SyntaxError on
# 3.9 at class-definition time in pydantic models. UP007 is the specific offender.
target-version = "py39"
line-length = 108
[tool.ruff.lint]
ignore = ["UP007"]