-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
132 lines (119 loc) · 4.95 KB
/
Copy pathpyproject.toml
File metadata and controls
132 lines (119 loc) · 4.95 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[project]
name = "writing-agent"
dynamic = ["version"] # single source: src/writingagent/__init__.py __version__
description = "A self-correcting, autonomous writing system for books and articles (CLI/TUI)."
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "WRITING AGENT contributors" }]
keywords = ["llm", "writing", "agent", "books", "articles", "openrouter", "deepseek", "cli", "tui"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Text Processing",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"openai>=1.0",
"pydantic>=2.0",
"pyyaml>=6.0",
"python-dotenv>=1.0",
"markdown>=3.5",
"xhtml2pdf>=0.2.11",
# Transitive via xhtml2pdf. svglib 1.6.0 hard-requires rlpycairo -> pycairo, and
# pycairo ships no Linux wheels - a bare `pip install` on Linux then fails trying to
# build it from source (needs pkg-config + libcairo2-dev). 1.5.x has no cairo chain;
# xhtml2pdf only needs svglib's svg2rlg, not the cairo rasterizer.
"svglib<1.6",
"rich>=13.0",
"pyfiglet>=1.0",
"prompt_toolkit>=3.0",
"ddgs>=0.1",
"ebooklib>=0.18",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.4",
]
# Deep-researcher fetch backend. Optional: deep_research.py imports `scrapo` lazily and falls back to a
# stdlib urllib + html.parser fetch when absent, so the base package needs nothing here. Scrapo ships
# on PyPI as `scrapo-ai` (import name `scrapo`); it + its Playwright browser tier need Python 3.11+, so
# both are marker-gated (on 3.10 the stdlib path is always used). After install run
# `python -m playwright install chromium` for the browser binary.
deep = [
"scrapo-ai>=0.10 ; python_version >= '3.11'",
"playwright>=1.40 ; python_version >= '3.11'",
]
# Zero-install web demo (demo/app.py). A small Gradio front-end over the public
# Agent/Project facade: paste a topic, watch the pipeline run live, read the piece
# plus its evidence report - try it free in fake mode with no API key. Deployable
# as a Hugging Face Space (see demo/README.md) so non-developers can try it in a
# browser. The package itself never imports gradio; only the demo does.
web = [
"gradio>=4.0",
]
[project.urls]
Homepage = "https://github.com/vikast908/WritingAgent"
Repository = "https://github.com/vikast908/WritingAgent"
Issues = "https://github.com/vikast908/WritingAgent/issues"
[project.scripts]
writing-agent = "writingagent.cli:main"
[tool.setuptools.dynamic]
version = { attr = "writingagent.__version__" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
# resources/ is the single home for all shipped data: the gold corpus
# (registers.gold_exemplars), persona exemplars (personas.block), the default
# model routing (copied out to the user config on first run), and the 13 seed
# skills (read in place). The webui SPA ships alongside its server. Data, not
# modules - packages.find alone would drop them.
writingagent = ["resources/gold/*.md", "resources/personas/*.md",
"resources/models.yaml", "resources/seeds/skills/*.md",
"webui/static/*.html"]
[tool.ruff]
line-length = 110
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B"]
ignore = [
"E501", # line length is handled by the formatter, not enforced hard
"B008", # function calls in argument defaults (argparse/Field patterns)
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["E402", "B011", "E731"]
# The orchestrator package __init__ is a pure facade: it re-exports the seam
# submodules (from .common import * etc.) so `orchestrator.X` keeps resolving for
# every caller and test. Star re-exports are intentional here.
# The Colab quickstart notebook uses one-line/late imports for brevity in a demo cell.
"examples/*.ipynb" = ["E401", "E402", "I001"]
"src/writingagent/orchestrator/__init__.py" = ["F401", "F403", "F405"]
"src/writingagent/shell/__init__.py" = ["F401", "F403", "F405"]
"src/writingagent/cli/__init__.py" = ["F401", "F403", "F405"]
[tool.pytest.ini_options]
pythonpath = ["src"] # tests import writingagent from src without an install
testpaths = ["tests"]
addopts = "-q"
[tool.coverage.run]
# Resolve coverage by package name (src layout).
source_pkgs = ["writingagent"]
branch = true
[tool.coverage.report]
# The dev journal / demo entrypoints aren't part of the library's covered surface.
omit = ["*/webui/*", "*/demo/*"]
exclude_also = ["if TYPE_CHECKING:", "raise NotImplementedError", "if __name__ == .__main__.:"]
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"