autoreporter-ai 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- autoreporter_ai-0.1.0/.gitignore +30 -0
- autoreporter_ai-0.1.0/LICENSE +21 -0
- autoreporter_ai-0.1.0/PKG-INFO +230 -0
- autoreporter_ai-0.1.0/README.md +183 -0
- autoreporter_ai-0.1.0/examples/quickstart.py +42 -0
- autoreporter_ai-0.1.0/pyproject.toml +84 -0
- autoreporter_ai-0.1.0/src/autoreporter/__init__.py +28 -0
- autoreporter_ai-0.1.0/src/autoreporter/cli.py +198 -0
- autoreporter_ai-0.1.0/src/autoreporter/compiler/__init__.py +17 -0
- autoreporter_ai-0.1.0/src/autoreporter/compiler/typst_runner.py +191 -0
- autoreporter_ai-0.1.0/src/autoreporter/config.py +149 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/FONTS_LICENSE.txt +13 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/IBMPlexSans-Italic-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/IBMPlexSans-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/Inter-Italic-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/Inter-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/JetBrainsMono-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/Newsreader-Italic-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/Newsreader-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/PlusJakartaSans-Italic-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/PlusJakartaSans-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/SourceSerif4-Italic-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/SourceSerif4-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/fonts/SpaceGrotesk-Variable.ttf +0 -0
- autoreporter_ai-0.1.0/src/autoreporter/ingest/__init__.py +13 -0
- autoreporter_ai-0.1.0/src/autoreporter/ingest/models.py +110 -0
- autoreporter_ai-0.1.0/src/autoreporter/ingest/profiler.py +333 -0
- autoreporter_ai-0.1.0/src/autoreporter/llm/__init__.py +25 -0
- autoreporter_ai-0.1.0/src/autoreporter/llm/anthropic_client.py +145 -0
- autoreporter_ai-0.1.0/src/autoreporter/llm/base.py +251 -0
- autoreporter_ai-0.1.0/src/autoreporter/llm/factory.py +16 -0
- autoreporter_ai-0.1.0/src/autoreporter/llm/openai_client.py +176 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/__init__.py +22 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/author.py +174 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/charts.py +447 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/orchestrator.py +387 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/planner.py +91 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/prompts.py +116 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/reviewer.py +283 -0
- autoreporter_ai-0.1.0/src/autoreporter/pipeline/schemas.py +179 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/__init__.py +20 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/base_components.typ +916 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/bold_magazine/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/bold_magazine/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/dark_telemetry/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/dark_telemetry/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/editorial_broadsheet/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/editorial_broadsheet/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/executive_board/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/executive_board/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/modern_saas/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/modern_saas/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/mpl_bridge.py +165 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/nordic_minimal/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/nordic_minimal/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/registry.py +124 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/scientific_journal/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/scientific_journal/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/swiss_grid/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/swiss_grid/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/technical_monograph/theme.typ +47 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/technical_monograph/tokens.json +40 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/warm_atelier/theme.typ +46 -0
- autoreporter_ai-0.1.0/src/autoreporter/themes/warm_atelier/tokens.json +40 -0
- autoreporter_ai-0.1.0/tests/fixtures/experiment_notes.md +14 -0
- autoreporter_ai-0.1.0/tests/fixtures/ml_benchmarks.csv +13 -0
- autoreporter_ai-0.1.0/tests/integration/test_live_gemini.py +67 -0
- autoreporter_ai-0.1.0/tests/integration/test_pipeline.py +284 -0
- autoreporter_ai-0.1.0/tests/unit/test_ingest.py +55 -0
- autoreporter_ai-0.1.0/tests/unit/test_llm_clients.py +145 -0
- autoreporter_ai-0.1.0/tests/unit/test_pipeline_helpers.py +69 -0
- autoreporter_ai-0.1.0/tests/unit/test_robustness.py +590 -0
- autoreporter_ai-0.1.0/tests/unit/test_themes.py +162 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.egg-info/
|
|
6
|
+
.eggs/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
|
|
12
|
+
# Secrets & local config
|
|
13
|
+
.env
|
|
14
|
+
.env.*
|
|
15
|
+
!.env.example
|
|
16
|
+
|
|
17
|
+
# Tests & tooling
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.ruff_cache/
|
|
20
|
+
.coverage
|
|
21
|
+
htmlcov/
|
|
22
|
+
|
|
23
|
+
# Generated sample outputs
|
|
24
|
+
output/
|
|
25
|
+
reports/
|
|
26
|
+
*.pdf
|
|
27
|
+
!tests/fixtures/**/*.pdf
|
|
28
|
+
|
|
29
|
+
# OS
|
|
30
|
+
.DS_Store
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AutoReporter Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: autoreporter-ai
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Offline-first LLM-driven publication-grade PDF report generator powered by Typst, Python charting, and curated design themes.
|
|
5
|
+
Project-URL: Homepage, https://github.com/MLResearch42/autoreporter
|
|
6
|
+
Project-URL: Repository, https://github.com/MLResearch42/autoreporter
|
|
7
|
+
Project-URL: Issues, https://github.com/MLResearch42/autoreporter/issues
|
|
8
|
+
Author: AutoReporter Contributors
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: data-science,llm,pdf,reports,typst,visualization
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: anthropic>=0.34.0
|
|
23
|
+
Requires-Dist: charset-normalizer>=3.0.0
|
|
24
|
+
Requires-Dist: matplotlib>=3.8.0
|
|
25
|
+
Requires-Dist: numpy>=1.24.0
|
|
26
|
+
Requires-Dist: openai>=1.40.0
|
|
27
|
+
Requires-Dist: pandas>=2.0.0
|
|
28
|
+
Requires-Dist: pillow>=10.0.0
|
|
29
|
+
Requires-Dist: pydantic>=2.5.0
|
|
30
|
+
Requires-Dist: seaborn>=0.13.0
|
|
31
|
+
Requires-Dist: typst<1.0.0,>=0.13.0
|
|
32
|
+
Provides-Extra: all-formats
|
|
33
|
+
Requires-Dist: openpyxl>=3.1.0; extra == 'all-formats'
|
|
34
|
+
Requires-Dist: pyarrow>=14.0.0; extra == 'all-formats'
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: build>=1.2.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: httpx>=0.27.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: python-dotenv>=1.0.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: twine>=5.0.0; extra == 'dev'
|
|
42
|
+
Provides-Extra: excel
|
|
43
|
+
Requires-Dist: openpyxl>=3.1.0; extra == 'excel'
|
|
44
|
+
Provides-Extra: parquet
|
|
45
|
+
Requires-Dist: pyarrow>=14.0.0; extra == 'parquet'
|
|
46
|
+
Description-Content-Type: text/markdown
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<img src="https://raw.githubusercontent.com/MLResearch42/autoreporter/main/assets/banner.png" alt="AutoReporter — Offline-first LLM-driven PDF report generator" width="100%" />
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
# AutoReporter
|
|
53
|
+
|
|
54
|
+
Drop in messy project files (spreadsheets, experiment logs, notes, or charts) and get back a **clean, magazine-quality PDF report** — built to work **100% offline** inside closed networks using **Python 3.10+**, **Typst**, and any **OpenAI- or Anthropic-compatible LLM**.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## How the AI Review Process Catches Errors & Hallucinations
|
|
59
|
+
|
|
60
|
+
Most AI PDF tools generate a draft in one shot and hope for the best. That leads to made-up numbers, broken charts, or ugly cut-off tables. AutoReporter runs a **check-your-own-work loop** before, during, and after drafting:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Your Files ──▶ 1. Python Math & Charts ──▶ 2. AI Writes Draft ──▶ 3. Auto-Fix Compile Errors
|
|
64
|
+
│
|
|
65
|
+
Final PDF ◀── Keep Highest-Scoring PDF ◀── 5. Patch & Rebuild ◀── 4. AI Reviews Page Pictures
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
1. **Real math first (stops made-up numbers):** Before the AI writes a single paragraph, Python scans your data and calculates the real stats (averages, ranges, missing values, correlations). Charts are plotted by real Python scripts from your actual files, and summary tables are saved as clean `.csv` files that Typst reads directly — so the AI never has to re-type big tables from memory.
|
|
69
|
+
2. **Automatic bug fixing (stops broken builds):** If a Python chart script crashes or the Typst layout has a syntax error, AutoReporter grabs the exact error message and line number and sends it right back to the AI to fix (up to 3–4 tries automatically).
|
|
70
|
+
3. **Post-draft Vision AI review (catches visual & factual slips):** After the draft PDF compiles, AutoReporter converts **every page into a PNG picture** and sends those page images — along with the draft source and report plan — *back* through a vision-capable AI acting as a strict editor. It checks for:
|
|
71
|
+
- Tables or text overflowing off the page, or raw code symbols accidentally showing up
|
|
72
|
+
- Overlapping chart labels, tiny unreadable text, or crowded axes
|
|
73
|
+
- Awkward page breaks, giant blank gaps, or going over your page limit
|
|
74
|
+
- Missing key findings or captions that don't match what's shown
|
|
75
|
+
4. **Targeted fixes + rollback safety net:** The reviewer scores the draft from 1 to 10 and lists concrete fixes. AutoReporter re-runs any flagged chart script, patches the layout, recompiles, and checks again (default: `2` rounds). It **always keeps the highest-scoring working PDF** — if a later edit fails to compile or accidentally deletes content, AutoReporter throws out the bad patch and keeps the best version.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Compact Cheatsheet
|
|
80
|
+
|
|
81
|
+
### What You Can Pass In (`inputs`)
|
|
82
|
+
A single file, a list of files, a whole folder, or live Python objects:
|
|
83
|
+
- **Spreadsheets & data:** `.csv`, `.tsv`, `.parquet`, `.xlsx`, `pandas.DataFrame`
|
|
84
|
+
- **Notes & logs:** `.md`, `.txt`, `.log`, `.json`, `.jsonl`, Python `dict`, or raw text strings
|
|
85
|
+
- **Existing figures:** `.png`, `.jpg`, `.svg` (embedded directly into the report)
|
|
86
|
+
|
|
87
|
+
### Report Options (Python & CLI)
|
|
88
|
+
|
|
89
|
+
| Python (`generate_report`) | CLI (`autoreporter build`) | Default | What It Does (Plain English) |
|
|
90
|
+
| :--- | :--- | :--- | :--- |
|
|
91
|
+
| `inputs` | positional args | *(required)* | File(s), folder, DataFrame, or text to turn into a report |
|
|
92
|
+
| `prompt` | `-p`, `--prompt` | `None` | Optional instructions (e.g. *"Focus on what beat the baseline"*) |
|
|
93
|
+
| `theme` | `-t`, `--theme` | `"executive_board"` | Pick 1 of the 10 themes below, or `"auto"` to let the AI choose |
|
|
94
|
+
| `output_dir` / `output_filename` | `-o` / `--output-dir` | current dir | Where to save the PDF (auto-named from title if omitted) |
|
|
95
|
+
| `audience` | `--audience` | `"mixed"` | Who's reading: `"executive"`, `"technical"`, `"mixed"`, `"stakeholder"` |
|
|
96
|
+
| `tone` | `--tone` | theme default | Writing style tweak (e.g. `"formal"`, `"concise"`, `"persuasive"`) |
|
|
97
|
+
| `max_pages` | `--max-pages` | auto | Keep the report at or under this page count |
|
|
98
|
+
| `page_size` | `--page-size` | `"letter"` | `"letter"`, `"a4"`, or `"widescreen_16_9"` (slide-style deck) |
|
|
99
|
+
| `toc` | `--toc` | `"auto"` | Table of contents: `True`, `False`, or `"auto"` (on for 5+ pages) |
|
|
100
|
+
| `include_charts` | `--no-charts` | `True` | Generate matching Python SVG charts (`--no-charts` turns off) |
|
|
101
|
+
| `visual_qa_rounds` | `--qa-rounds` | `2` | How many post-draft AI review rounds to run (`0` skips review) |
|
|
102
|
+
| `save_intermediates` | `--save-intermediates` | `False` | Save `.typ`, chart scripts/SVGs, CSVs, and QA notes for manual edits |
|
|
103
|
+
| `dry_run` | `--dry-run` | `False` | Only build and print the outline plan — don't render the PDF yet |
|
|
104
|
+
|
|
105
|
+
### AI Connection & Branding Options
|
|
106
|
+
|
|
107
|
+
| Python (`LLMConfig` / `BrandingConfig`) | CLI Flag | Env Var Default | Plain-English Meaning |
|
|
108
|
+
| :--- | :--- | :--- | :--- |
|
|
109
|
+
| `provider` | `--provider` | `AUTOREPORTER_PROVIDER` | `"auto"`, `"openai"`, or `"anthropic"` (SDK to use) |
|
|
110
|
+
| `model` | `--model` | `AUTOREPORTER_MODEL` | Model name (e.g. `claude-opus-5-5`, `gpt-5.4`, `gemini-2.5-flash`) |
|
|
111
|
+
| `base_url` | `--base-url` | `AUTOREPORTER_BASE_URL` | Custom API URL (work gateway, Gemini, vLLM, LiteLLM) |
|
|
112
|
+
| `api_key` | `--api-key` | `AUTOREPORTER_API_KEY` | API key (also falls back to OpenAI/Anthropic/Gemini env vars) |
|
|
113
|
+
| `vision_model` | `--vision-model` | `AUTOREPORTER_VISION_MODEL` | Optional separate model just for the visual review step |
|
|
114
|
+
| `ca_bundle` / `verify_ssl` | `--ca-bundle` / `--insecure` | `AUTOREPORTER_CA_BUNDLE` | Corporate SSL certificate file for private networks |
|
|
115
|
+
| `temperature` / `max_tokens` | `--temperature` / `--max-tokens` | `0.3` / `8192` | Creativity vs. consistency, and max length per AI call |
|
|
116
|
+
| `title`, `author`, `organization` | `--title`, `--author`, `--org` | auto / `None` | Cover page, header, and footer metadata |
|
|
117
|
+
| `logo_path`, `classification` | `--logo`, `--classification` | `None` | Company logo + header/footer banner (e.g. `INTERNAL USE ONLY`) |
|
|
118
|
+
|
|
119
|
+
> **Offline-ready out of the box:** All 7 open-source font families and all 10 Typst themes are bundled inside the Python package. No internet downloads happen at runtime.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Install & Quickstart
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pip install autoreporter-ai
|
|
127
|
+
# Optional Parquet & Excel file support:
|
|
128
|
+
pip install "autoreporter-ai[all-formats]"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
*(Installs as `autoreporter-ai` on PyPI; imports in Python as `import autoreporter` and provides the `autoreporter` CLI.)*
|
|
132
|
+
|
|
133
|
+
### Python (One Call)
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
from autoreporter import BrandingConfig, LLMConfig, generate_report
|
|
137
|
+
|
|
138
|
+
result = generate_report(
|
|
139
|
+
inputs=["experiments.txt", "metrics.csv", "findings.md"],
|
|
140
|
+
prompt="Summarize why V3 beat V2 and call out any remaining risks.",
|
|
141
|
+
theme="executive_board", # or "auto"
|
|
142
|
+
output_dir="./reports",
|
|
143
|
+
output_filename="v3_eval.pdf",
|
|
144
|
+
llm=LLMConfig(
|
|
145
|
+
provider="anthropic", # "auto" | "openai" | "anthropic"
|
|
146
|
+
base_url="https://internal-llm.corp",
|
|
147
|
+
model="claude-opus-5-5",
|
|
148
|
+
api_key="...", # or set AUTOREPORTER_API_KEY
|
|
149
|
+
),
|
|
150
|
+
audience="executive",
|
|
151
|
+
max_pages=6,
|
|
152
|
+
visual_qa_rounds=2, # AI reviews rendered page PNGs and fixes issues
|
|
153
|
+
branding=BrandingConfig(
|
|
154
|
+
author="Data Science Team",
|
|
155
|
+
organization="Applied Research",
|
|
156
|
+
classification="INTERNAL USE ONLY",
|
|
157
|
+
),
|
|
158
|
+
save_intermediates=True, # keep report.typ + SVGs if you want to tweak anything
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
print(result.pdf_path, result.page_count, result.qa_score)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Using Gemini (OpenAI-Compatible Endpoint)
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
llm = LLMConfig(
|
|
168
|
+
provider="openai",
|
|
169
|
+
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
|
170
|
+
model="gemini-2.5-flash", # or gemini-2.5-pro
|
|
171
|
+
api_key="...", # or set GEMINI_API_KEY / AUTOREPORTER_API_KEY
|
|
172
|
+
)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Reuse Settings Across Multiple Reports
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from autoreporter import ReportGenerator
|
|
179
|
+
|
|
180
|
+
gen = ReportGenerator(
|
|
181
|
+
provider="openai",
|
|
182
|
+
base_url="https://internal-llm.corp/v1",
|
|
183
|
+
model="gpt-5.4",
|
|
184
|
+
default_theme="swiss_grid",
|
|
185
|
+
)
|
|
186
|
+
gen.generate("q4_metrics.csv", output_dir="./reports")
|
|
187
|
+
gen.generate(["ablation.txt", "notes.md"], theme="technical_monograph", output_dir="./reports")
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Command Line
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
autoreporter themes list
|
|
194
|
+
autoreporter build metrics.csv notes.md --theme swiss_grid --max-pages 5 -o report.pdf
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## The 10 Built-In Design Themes
|
|
200
|
+
|
|
201
|
+
Every theme controls the page layout, fonts, colors, **and** chart colors automatically so charts look like they belong in the report.
|
|
202
|
+
|
|
203
|
+
| Theme ID | Look & Feel | Great For |
|
|
204
|
+
| :--- | :--- | :--- |
|
|
205
|
+
| `executive_board` | Deep navy cover, gold accents, clean KPI cards | Leadership briefings & annual reports |
|
|
206
|
+
| `swiss_grid` | Crisp white & black grid with bold red accents | Benchmarks & engineering audits |
|
|
207
|
+
| `technical_monograph` | Serif book style with wide margin sidenotes | ML experiments & research write-ups |
|
|
208
|
+
| `editorial_broadsheet` | Warm paper, serif headlines, burgundy & teal | Strategy memos & deep-dive essays |
|
|
209
|
+
| `modern_saas` | Clean indigo cards, generous whitespace | Tech product & platform reviews |
|
|
210
|
+
| `scientific_journal` | Forest teal, structured numbered figures | Lab results & statistical studies |
|
|
211
|
+
| `warm_atelier` | Ivory paper, terracotta & sage tones | Impact reports & design research |
|
|
212
|
+
| `nordic_minimal` | Extra-airy white, calm fjord blue & gray | Scorecards & clean executive briefs |
|
|
213
|
+
| `bold_magazine` | High-contrast dark title bands, bright amber | Demos, showcases & standout findings |
|
|
214
|
+
| `dark_telemetry` | Full dark mode with cyan & amber charts | On-screen briefings & monitoring |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Development, Testing & Internal PyPI
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Offline unit, theme, and full 6-stage pipeline tests (55 tests)
|
|
222
|
+
pytest -m "not live"
|
|
223
|
+
|
|
224
|
+
# Live end-to-end test using Gemini (needs GEMINI_API_KEY or .env)
|
|
225
|
+
pytest tests/integration/test_live_gemini.py -m live -v -s
|
|
226
|
+
|
|
227
|
+
# Build self-contained wheel (includes all fonts & themes) and upload to private PyPI
|
|
228
|
+
python -m build
|
|
229
|
+
twine upload --repository-url https://pypi.internal.corp/simple/ dist/*
|
|
230
|
+
```
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/MLResearch42/autoreporter/main/assets/banner.png" alt="AutoReporter — Offline-first LLM-driven PDF report generator" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# AutoReporter
|
|
6
|
+
|
|
7
|
+
Drop in messy project files (spreadsheets, experiment logs, notes, or charts) and get back a **clean, magazine-quality PDF report** — built to work **100% offline** inside closed networks using **Python 3.10+**, **Typst**, and any **OpenAI- or Anthropic-compatible LLM**.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## How the AI Review Process Catches Errors & Hallucinations
|
|
12
|
+
|
|
13
|
+
Most AI PDF tools generate a draft in one shot and hope for the best. That leads to made-up numbers, broken charts, or ugly cut-off tables. AutoReporter runs a **check-your-own-work loop** before, during, and after drafting:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
Your Files ──▶ 1. Python Math & Charts ──▶ 2. AI Writes Draft ──▶ 3. Auto-Fix Compile Errors
|
|
17
|
+
│
|
|
18
|
+
Final PDF ◀── Keep Highest-Scoring PDF ◀── 5. Patch & Rebuild ◀── 4. AI Reviews Page Pictures
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
1. **Real math first (stops made-up numbers):** Before the AI writes a single paragraph, Python scans your data and calculates the real stats (averages, ranges, missing values, correlations). Charts are plotted by real Python scripts from your actual files, and summary tables are saved as clean `.csv` files that Typst reads directly — so the AI never has to re-type big tables from memory.
|
|
22
|
+
2. **Automatic bug fixing (stops broken builds):** If a Python chart script crashes or the Typst layout has a syntax error, AutoReporter grabs the exact error message and line number and sends it right back to the AI to fix (up to 3–4 tries automatically).
|
|
23
|
+
3. **Post-draft Vision AI review (catches visual & factual slips):** After the draft PDF compiles, AutoReporter converts **every page into a PNG picture** and sends those page images — along with the draft source and report plan — *back* through a vision-capable AI acting as a strict editor. It checks for:
|
|
24
|
+
- Tables or text overflowing off the page, or raw code symbols accidentally showing up
|
|
25
|
+
- Overlapping chart labels, tiny unreadable text, or crowded axes
|
|
26
|
+
- Awkward page breaks, giant blank gaps, or going over your page limit
|
|
27
|
+
- Missing key findings or captions that don't match what's shown
|
|
28
|
+
4. **Targeted fixes + rollback safety net:** The reviewer scores the draft from 1 to 10 and lists concrete fixes. AutoReporter re-runs any flagged chart script, patches the layout, recompiles, and checks again (default: `2` rounds). It **always keeps the highest-scoring working PDF** — if a later edit fails to compile or accidentally deletes content, AutoReporter throws out the bad patch and keeps the best version.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Compact Cheatsheet
|
|
33
|
+
|
|
34
|
+
### What You Can Pass In (`inputs`)
|
|
35
|
+
A single file, a list of files, a whole folder, or live Python objects:
|
|
36
|
+
- **Spreadsheets & data:** `.csv`, `.tsv`, `.parquet`, `.xlsx`, `pandas.DataFrame`
|
|
37
|
+
- **Notes & logs:** `.md`, `.txt`, `.log`, `.json`, `.jsonl`, Python `dict`, or raw text strings
|
|
38
|
+
- **Existing figures:** `.png`, `.jpg`, `.svg` (embedded directly into the report)
|
|
39
|
+
|
|
40
|
+
### Report Options (Python & CLI)
|
|
41
|
+
|
|
42
|
+
| Python (`generate_report`) | CLI (`autoreporter build`) | Default | What It Does (Plain English) |
|
|
43
|
+
| :--- | :--- | :--- | :--- |
|
|
44
|
+
| `inputs` | positional args | *(required)* | File(s), folder, DataFrame, or text to turn into a report |
|
|
45
|
+
| `prompt` | `-p`, `--prompt` | `None` | Optional instructions (e.g. *"Focus on what beat the baseline"*) |
|
|
46
|
+
| `theme` | `-t`, `--theme` | `"executive_board"` | Pick 1 of the 10 themes below, or `"auto"` to let the AI choose |
|
|
47
|
+
| `output_dir` / `output_filename` | `-o` / `--output-dir` | current dir | Where to save the PDF (auto-named from title if omitted) |
|
|
48
|
+
| `audience` | `--audience` | `"mixed"` | Who's reading: `"executive"`, `"technical"`, `"mixed"`, `"stakeholder"` |
|
|
49
|
+
| `tone` | `--tone` | theme default | Writing style tweak (e.g. `"formal"`, `"concise"`, `"persuasive"`) |
|
|
50
|
+
| `max_pages` | `--max-pages` | auto | Keep the report at or under this page count |
|
|
51
|
+
| `page_size` | `--page-size` | `"letter"` | `"letter"`, `"a4"`, or `"widescreen_16_9"` (slide-style deck) |
|
|
52
|
+
| `toc` | `--toc` | `"auto"` | Table of contents: `True`, `False`, or `"auto"` (on for 5+ pages) |
|
|
53
|
+
| `include_charts` | `--no-charts` | `True` | Generate matching Python SVG charts (`--no-charts` turns off) |
|
|
54
|
+
| `visual_qa_rounds` | `--qa-rounds` | `2` | How many post-draft AI review rounds to run (`0` skips review) |
|
|
55
|
+
| `save_intermediates` | `--save-intermediates` | `False` | Save `.typ`, chart scripts/SVGs, CSVs, and QA notes for manual edits |
|
|
56
|
+
| `dry_run` | `--dry-run` | `False` | Only build and print the outline plan — don't render the PDF yet |
|
|
57
|
+
|
|
58
|
+
### AI Connection & Branding Options
|
|
59
|
+
|
|
60
|
+
| Python (`LLMConfig` / `BrandingConfig`) | CLI Flag | Env Var Default | Plain-English Meaning |
|
|
61
|
+
| :--- | :--- | :--- | :--- |
|
|
62
|
+
| `provider` | `--provider` | `AUTOREPORTER_PROVIDER` | `"auto"`, `"openai"`, or `"anthropic"` (SDK to use) |
|
|
63
|
+
| `model` | `--model` | `AUTOREPORTER_MODEL` | Model name (e.g. `claude-opus-5-5`, `gpt-5.4`, `gemini-2.5-flash`) |
|
|
64
|
+
| `base_url` | `--base-url` | `AUTOREPORTER_BASE_URL` | Custom API URL (work gateway, Gemini, vLLM, LiteLLM) |
|
|
65
|
+
| `api_key` | `--api-key` | `AUTOREPORTER_API_KEY` | API key (also falls back to OpenAI/Anthropic/Gemini env vars) |
|
|
66
|
+
| `vision_model` | `--vision-model` | `AUTOREPORTER_VISION_MODEL` | Optional separate model just for the visual review step |
|
|
67
|
+
| `ca_bundle` / `verify_ssl` | `--ca-bundle` / `--insecure` | `AUTOREPORTER_CA_BUNDLE` | Corporate SSL certificate file for private networks |
|
|
68
|
+
| `temperature` / `max_tokens` | `--temperature` / `--max-tokens` | `0.3` / `8192` | Creativity vs. consistency, and max length per AI call |
|
|
69
|
+
| `title`, `author`, `organization` | `--title`, `--author`, `--org` | auto / `None` | Cover page, header, and footer metadata |
|
|
70
|
+
| `logo_path`, `classification` | `--logo`, `--classification` | `None` | Company logo + header/footer banner (e.g. `INTERNAL USE ONLY`) |
|
|
71
|
+
|
|
72
|
+
> **Offline-ready out of the box:** All 7 open-source font families and all 10 Typst themes are bundled inside the Python package. No internet downloads happen at runtime.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Install & Quickstart
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pip install autoreporter-ai
|
|
80
|
+
# Optional Parquet & Excel file support:
|
|
81
|
+
pip install "autoreporter-ai[all-formats]"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
*(Installs as `autoreporter-ai` on PyPI; imports in Python as `import autoreporter` and provides the `autoreporter` CLI.)*
|
|
85
|
+
|
|
86
|
+
### Python (One Call)
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from autoreporter import BrandingConfig, LLMConfig, generate_report
|
|
90
|
+
|
|
91
|
+
result = generate_report(
|
|
92
|
+
inputs=["experiments.txt", "metrics.csv", "findings.md"],
|
|
93
|
+
prompt="Summarize why V3 beat V2 and call out any remaining risks.",
|
|
94
|
+
theme="executive_board", # or "auto"
|
|
95
|
+
output_dir="./reports",
|
|
96
|
+
output_filename="v3_eval.pdf",
|
|
97
|
+
llm=LLMConfig(
|
|
98
|
+
provider="anthropic", # "auto" | "openai" | "anthropic"
|
|
99
|
+
base_url="https://internal-llm.corp",
|
|
100
|
+
model="claude-opus-5-5",
|
|
101
|
+
api_key="...", # or set AUTOREPORTER_API_KEY
|
|
102
|
+
),
|
|
103
|
+
audience="executive",
|
|
104
|
+
max_pages=6,
|
|
105
|
+
visual_qa_rounds=2, # AI reviews rendered page PNGs and fixes issues
|
|
106
|
+
branding=BrandingConfig(
|
|
107
|
+
author="Data Science Team",
|
|
108
|
+
organization="Applied Research",
|
|
109
|
+
classification="INTERNAL USE ONLY",
|
|
110
|
+
),
|
|
111
|
+
save_intermediates=True, # keep report.typ + SVGs if you want to tweak anything
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
print(result.pdf_path, result.page_count, result.qa_score)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Using Gemini (OpenAI-Compatible Endpoint)
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
llm = LLMConfig(
|
|
121
|
+
provider="openai",
|
|
122
|
+
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
|
123
|
+
model="gemini-2.5-flash", # or gemini-2.5-pro
|
|
124
|
+
api_key="...", # or set GEMINI_API_KEY / AUTOREPORTER_API_KEY
|
|
125
|
+
)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Reuse Settings Across Multiple Reports
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
from autoreporter import ReportGenerator
|
|
132
|
+
|
|
133
|
+
gen = ReportGenerator(
|
|
134
|
+
provider="openai",
|
|
135
|
+
base_url="https://internal-llm.corp/v1",
|
|
136
|
+
model="gpt-5.4",
|
|
137
|
+
default_theme="swiss_grid",
|
|
138
|
+
)
|
|
139
|
+
gen.generate("q4_metrics.csv", output_dir="./reports")
|
|
140
|
+
gen.generate(["ablation.txt", "notes.md"], theme="technical_monograph", output_dir="./reports")
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Command Line
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
autoreporter themes list
|
|
147
|
+
autoreporter build metrics.csv notes.md --theme swiss_grid --max-pages 5 -o report.pdf
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## The 10 Built-In Design Themes
|
|
153
|
+
|
|
154
|
+
Every theme controls the page layout, fonts, colors, **and** chart colors automatically so charts look like they belong in the report.
|
|
155
|
+
|
|
156
|
+
| Theme ID | Look & Feel | Great For |
|
|
157
|
+
| :--- | :--- | :--- |
|
|
158
|
+
| `executive_board` | Deep navy cover, gold accents, clean KPI cards | Leadership briefings & annual reports |
|
|
159
|
+
| `swiss_grid` | Crisp white & black grid with bold red accents | Benchmarks & engineering audits |
|
|
160
|
+
| `technical_monograph` | Serif book style with wide margin sidenotes | ML experiments & research write-ups |
|
|
161
|
+
| `editorial_broadsheet` | Warm paper, serif headlines, burgundy & teal | Strategy memos & deep-dive essays |
|
|
162
|
+
| `modern_saas` | Clean indigo cards, generous whitespace | Tech product & platform reviews |
|
|
163
|
+
| `scientific_journal` | Forest teal, structured numbered figures | Lab results & statistical studies |
|
|
164
|
+
| `warm_atelier` | Ivory paper, terracotta & sage tones | Impact reports & design research |
|
|
165
|
+
| `nordic_minimal` | Extra-airy white, calm fjord blue & gray | Scorecards & clean executive briefs |
|
|
166
|
+
| `bold_magazine` | High-contrast dark title bands, bright amber | Demos, showcases & standout findings |
|
|
167
|
+
| `dark_telemetry` | Full dark mode with cyan & amber charts | On-screen briefings & monitoring |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Development, Testing & Internal PyPI
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Offline unit, theme, and full 6-stage pipeline tests (55 tests)
|
|
175
|
+
pytest -m "not live"
|
|
176
|
+
|
|
177
|
+
# Live end-to-end test using Gemini (needs GEMINI_API_KEY or .env)
|
|
178
|
+
pytest tests/integration/test_live_gemini.py -m live -v -s
|
|
179
|
+
|
|
180
|
+
# Build self-contained wheel (includes all fonts & themes) and upload to private PyPI
|
|
181
|
+
python -m build
|
|
182
|
+
twine upload --repository-url https://pypi.internal.corp/simple/ dist/*
|
|
183
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""Quickstart example demonstrating AutoReporter with swappable LLM endpoints."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from autoreporter import BrandingConfig, LLMConfig, generate_report, list_themes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main() -> None:
|
|
9
|
+
print("Available themes:", [t.id for t in list_themes()])
|
|
10
|
+
|
|
11
|
+
fixtures = Path(__file__).resolve().parent.parent / "tests" / "fixtures"
|
|
12
|
+
|
|
13
|
+
# Example configured for Gemini via OpenAI-compatible endpoint (swap base_url/model for your work gateway)
|
|
14
|
+
result = generate_report(
|
|
15
|
+
inputs=[fixtures / "ml_benchmarks.csv", fixtures / "experiment_notes.md"],
|
|
16
|
+
prompt="Highlight why V3_Distilled is ready for staged rollout and clearly flag Cohort_B drift risks.",
|
|
17
|
+
theme="executive_board", # or "auto", "swiss_grid", "technical_monograph", "dark_telemetry", ...
|
|
18
|
+
output_dir="./reports",
|
|
19
|
+
output_filename="v3_benchmark_report.pdf",
|
|
20
|
+
llm=LLMConfig(
|
|
21
|
+
provider="openai", # use "anthropic" for native Anthropic Messages API
|
|
22
|
+
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
|
23
|
+
model="gemini-2.5-flash",
|
|
24
|
+
# api_key=... # or set AUTOREPORTER_API_KEY / GEMINI_API_KEY
|
|
25
|
+
),
|
|
26
|
+
audience="executive",
|
|
27
|
+
max_pages=4,
|
|
28
|
+
visual_qa_rounds=2,
|
|
29
|
+
branding=BrandingConfig(
|
|
30
|
+
author="Data Science Team",
|
|
31
|
+
organization="Applied Research Lab",
|
|
32
|
+
classification="INTERNAL USE ONLY",
|
|
33
|
+
),
|
|
34
|
+
save_intermediates=True,
|
|
35
|
+
progress_callback=print,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
print(f"Generated: {result.pdf_path} ({result.page_count} pages, QA score={result.qa_score})")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
if __name__ == "__main__":
|
|
42
|
+
main()
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.24.0"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "autoreporter-ai"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Offline-first LLM-driven publication-grade PDF report generator powered by Typst, Python charting, and curated design themes."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{ name = "AutoReporter Contributors" }]
|
|
13
|
+
keywords = ["pdf", "reports", "typst", "llm", "data-science", "visualization"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Science/Research",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
]
|
|
25
|
+
dependencies = [
|
|
26
|
+
"typst>=0.13.0,<1.0.0",
|
|
27
|
+
"openai>=1.40.0",
|
|
28
|
+
"anthropic>=0.34.0",
|
|
29
|
+
"pydantic>=2.5.0",
|
|
30
|
+
"numpy>=1.24.0",
|
|
31
|
+
"pandas>=2.0.0",
|
|
32
|
+
"matplotlib>=3.8.0",
|
|
33
|
+
"seaborn>=0.13.0",
|
|
34
|
+
"Pillow>=10.0.0",
|
|
35
|
+
"charset-normalizer>=3.0.0",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
excel = ["openpyxl>=3.1.0"]
|
|
40
|
+
parquet = ["pyarrow>=14.0.0"]
|
|
41
|
+
all-formats = ["openpyxl>=3.1.0", "pyarrow>=14.0.0"]
|
|
42
|
+
dev = [
|
|
43
|
+
"pytest>=8.0.0",
|
|
44
|
+
"httpx>=0.27.0",
|
|
45
|
+
"ruff>=0.6.0",
|
|
46
|
+
"build>=1.2.0",
|
|
47
|
+
"twine>=5.0.0",
|
|
48
|
+
"python-dotenv>=1.0.0",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[project.urls]
|
|
52
|
+
Homepage = "https://github.com/MLResearch42/autoreporter"
|
|
53
|
+
Repository = "https://github.com/MLResearch42/autoreporter"
|
|
54
|
+
Issues = "https://github.com/MLResearch42/autoreporter/issues"
|
|
55
|
+
|
|
56
|
+
[project.scripts]
|
|
57
|
+
autoreporter = "autoreporter.cli:main"
|
|
58
|
+
|
|
59
|
+
[tool.hatch.build.targets.wheel]
|
|
60
|
+
packages = ["src/autoreporter"]
|
|
61
|
+
|
|
62
|
+
[tool.hatch.build.targets.sdist]
|
|
63
|
+
include = [
|
|
64
|
+
"/src",
|
|
65
|
+
"/tests",
|
|
66
|
+
"/examples",
|
|
67
|
+
"/README.md",
|
|
68
|
+
"/LICENSE",
|
|
69
|
+
"/pyproject.toml",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[tool.pytest.ini_options]
|
|
73
|
+
testpaths = ["tests"]
|
|
74
|
+
markers = [
|
|
75
|
+
"live: tests that call a real LLM API endpoint (requires API key)",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
[tool.ruff]
|
|
79
|
+
target-version = "py310"
|
|
80
|
+
line-length = 100
|
|
81
|
+
|
|
82
|
+
[tool.ruff.lint]
|
|
83
|
+
select = ["E", "F", "I", "UP", "B"]
|
|
84
|
+
ignore = ["E501"]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""AutoReporter: Offline-first LLM-driven publication-grade PDF report generator."""
|
|
2
|
+
|
|
3
|
+
from autoreporter.config import BrandingConfig, LLMConfig, QARoundResult, ReportResult
|
|
4
|
+
from autoreporter.pipeline.orchestrator import ReportGenerator, generate_report
|
|
5
|
+
from autoreporter.pipeline.schemas import ReportPlan
|
|
6
|
+
from autoreporter.themes.registry import ThemeRegistry, ThemeSpec
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def list_themes() -> list[ThemeSpec]:
|
|
12
|
+
"""Return metadata for all curated themes bundled in AutoReporter."""
|
|
13
|
+
return ThemeRegistry().list_themes()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"BrandingConfig",
|
|
18
|
+
"LLMConfig",
|
|
19
|
+
"QARoundResult",
|
|
20
|
+
"ReportGenerator",
|
|
21
|
+
"ReportPlan",
|
|
22
|
+
"ReportResult",
|
|
23
|
+
"ThemeRegistry",
|
|
24
|
+
"ThemeSpec",
|
|
25
|
+
"__version__",
|
|
26
|
+
"generate_report",
|
|
27
|
+
"list_themes",
|
|
28
|
+
]
|