mintfig 0.2.0__py3-none-any.whl

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.
Files changed (47) hide show
  1. mintfig/__init__.py +162 -0
  2. mintfig/_explain/__init__.py +1 -0
  3. mintfig/_explain/change.py +392 -0
  4. mintfig/_explain/compare.py +1308 -0
  5. mintfig/_explain/compare_grouped.py +472 -0
  6. mintfig/_explain/core.py +2005 -0
  7. mintfig/_explain/distribution.py +1268 -0
  8. mintfig/_explain/flow.py +508 -0
  9. mintfig/_explain/layout.py +2012 -0
  10. mintfig/_explain/matrix.py +623 -0
  11. mintfig/_explain/relate.py +1318 -0
  12. mintfig/_explain/timeline.py +595 -0
  13. mintfig/_explain/trend.py +2557 -0
  14. mintfig/_explain/waterfall.py +459 -0
  15. mintfig/_table.py +691 -0
  16. mintfig/_tabular.py +738 -0
  17. mintfig/annotations.py +1165 -0
  18. mintfig/assets/AGENTS_SNIPPET.md +11 -0
  19. mintfig/assets/SKILL.md +143 -0
  20. mintfig/assets/__init__.py +1 -0
  21. mintfig/assets/references/publication.md +79 -0
  22. mintfig/assets/references/scientific_and_recipes.md +213 -0
  23. mintfig/audit.py +179 -0
  24. mintfig/brief.py +518 -0
  25. mintfig/bundle.py +333 -0
  26. mintfig/cli.py +1300 -0
  27. mintfig/edit.py +347 -0
  28. mintfig/epistemic.py +1083 -0
  29. mintfig/explainer.py +194 -0
  30. mintfig/export.py +247 -0
  31. mintfig/inspect_data.py +583 -0
  32. mintfig/interactive.py +1028 -0
  33. mintfig/palettes.py +233 -0
  34. mintfig/plate.py +784 -0
  35. mintfig/preflight.py +2398 -0
  36. mintfig/proof.py +627 -0
  37. mintfig/runner.py +403 -0
  38. mintfig/skill.py +167 -0
  39. mintfig/specs.py +291 -0
  40. mintfig/style.py +151 -0
  41. mintfig/terminal.py +785 -0
  42. mintfig/themes.py +660 -0
  43. mintfig-0.2.0.dist-info/METADATA +239 -0
  44. mintfig-0.2.0.dist-info/RECORD +47 -0
  45. mintfig-0.2.0.dist-info/WHEEL +4 -0
  46. mintfig-0.2.0.dist-info/entry_points.txt +2 -0
  47. mintfig-0.2.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,239 @@
1
+ Metadata-Version: 2.5
2
+ Name: mintfig
3
+ Version: 0.2.0
4
+ Summary: Message-first figures for agents explaining scientific results to people, plus journal-ready plates with preflight QA and reproducible bundles.
5
+ Project-URL: Repository, https://github.com/blaiszik/mintfig
6
+ Author: Ben Blaiszik
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Keywords: agents,data visualization,matplotlib,publication,scientific figures
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Scientific/Engineering :: Visualization
14
+ Requires-Python: >=3.10
15
+ Requires-Dist: matplotlib>=3.8
16
+ Requires-Dist: numpy>=1.24
17
+ Requires-Dist: pillow>=10.0
18
+ Requires-Dist: pypdf>=4.0
19
+ Provides-Extra: dev
20
+ Requires-Dist: pytest>=8.0; extra == 'dev'
21
+ Requires-Dist: ruff>=0.4; extra == 'dev'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # mintfig
25
+
26
+ **Mint-condition figures for AI agents and scientists.**
27
+
28
+ AI agents are great at running analyses and terrible at showing what they found. `mintfig` turns raw data into clear, self-auditing visual explanations — as a Python library (`import mintfig as mint`), zero-script CLI, and coding-agent skill built on Matplotlib.
29
+
30
+ 1. **Explain results in a conversation (`mint.explain`, `mintfig plot`)** — lead with a takeaway sentence and compose panels by question (comparisons, trends, distributions, attribution bridges, timelines, attrition flows, scorecards). Layout, direct labels, named uncertainty, colorblind-safe themes, drawn-text auditing (`ship`), and computed `facts` are built in — delivered as PNGs, interactive HTML, terminal graphics, or multi-figure briefings (`mint.brief`).
31
+ 2. **Ship journal-ready manuscript plates (`mint.Plate`, `mintfig run`)** — exact millimeter column geometry, unified sans-serif typography and math, automated preflight QA, colorblind/grayscale proof sheets, and reproducible submission bundles for *Nature*, *Science*, *Cell*, PNAS, and NeurIPS.
32
+
33
+ [Quickstart](#quickstart) · [Forms at a Glance](#pick-the-form-by-the-question) · [Themes & Palettes](#themes--palettes) · **[Full Visual Gallery](gallery/README.md)** · [Publication Plates](#publication-figures) · [CLI & Agent Skill](#cli--agent-skill)
34
+
35
+ ---
36
+
37
+ ![Dose-response figure: triplicate wells on a log dose axis, one colour per compound across panels](gallery/output/explain_science/dose_response.png)
38
+
39
+ ---
40
+
41
+ ## Quickstart
42
+
43
+ The distribution name on PyPI is still being finalised, so install directly from GitHub:
44
+
45
+ ```bash
46
+ pip install git+https://github.com/blaiszik/mintfig
47
+ # or, inside a clone
48
+ uv sync --extra dev
49
+ ```
50
+
51
+ Give your coding agent the bundled skill (Claude Code, Antigravity, Cursor, Codex, `AGENTS.md`):
52
+
53
+ ```bash
54
+ mintfig skill --install
55
+ ```
56
+
57
+ ### Explain a result (`mint.explain`)
58
+
59
+ Write the conclusion first, then pick each panel by the question it answers. `fig.save()` returns a JSON summary containing computed `facts` per panel, any `issues` with a `fix_hint`, `alt_text`, and measured legibility at chat width:
60
+
61
+ ```python
62
+ import mintfig as mint
63
+
64
+ fig = mint.explain(
65
+ "Removing retrieval costs 8 points of accuracy; removing fine-tuning costs 13",
66
+ mint.compare(
67
+ {"full model": 0.82, "no retrieval": 0.74, "no fine-tuning": 0.69},
68
+ error={"full model": (0.80, 0.84), "no retrieval": (0.71, 0.77),
69
+ "no fine-tuning": (0.66, 0.72)},
70
+ error_label="95% CI, 5 seeds",
71
+ title="Both losses are outside seed noise",
72
+ label="Test accuracy",
73
+ highlight=["no retrieval", "no fine-tuning"],
74
+ ),
75
+ mint.trend(
76
+ [0, 500, 1000, 1500, 2000],
77
+ {"full model": [0.02, 0.61, 0.76, 0.80, 0.82],
78
+ "no retrieval": [0.02, 0.52, 0.67, 0.72, 0.74],
79
+ "no fine-tuning": [0.01, 0.44, 0.60, 0.66, 0.69]},
80
+ title="The gap opens in the first 500 steps",
81
+ label="Validation accuracy",
82
+ x_label="Training step",
83
+ ),
84
+ source="runs/ablation_2026-11 (5 seeds per variant)",
85
+ )
86
+ print(fig.save("ablation.png"))
87
+ ```
88
+
89
+ No Python script needed? Render directly from JSON or stdin with `mintfig explain`:
90
+
91
+ ```bash
92
+ mintfig explain --example | mintfig explain - --style editorial --palette okabe_ito --out fig.png
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Pick the form by the question
98
+
99
+ Every form enforces its own perceptual rules (zero baselines, direct labels, no pies, no rotated text, named uncertainty) and computes panel `facts` automatically. **[Browse all 35+ rendered examples with full code in the Gallery →](gallery/README.md)**
100
+
101
+ | Form | Question it answers & encoding | Example |
102
+ | :--- | :--- | :---: |
103
+ | **`mint.compare`**<br><sub>[more examples](gallery/README.md#fmcompare--size-and-intervals)</sub> | **How do items differ in size?**<br>Sorted bars from zero; switches to dots with whiskers for `error=`, `zero=False`, or `log=True`. Supports `n=`, `baseline=`, and `reference=`. | <img src="gallery/output/explain_forms/compare_intervals.png" width="380" alt="mint.compare with 95% CIs, n counts, and baseline"> |
104
+ | **`mint.trend`**<br><sub>[more examples](gallery/README.md#fmtrend--change-over-time-dose-or-scale)</sub> | **How does it change over time, dose, or scale?**<br>Direct end labels, ISO dates, `events=`, gaps, `band=`, raw `points=` (with `points_label=`), `log=`/`log_x=` power laws, and `facet=True` small multiples. | <img src="gallery/output/explain_forms/trend_dates_events.png" width="380" alt="mint.trend with ISO dates, retrofit event, baseline, and gap"> |
105
+ | **`mint.change`**<br><sub>[more examples](gallery/README.md#fmchange--paired-before-and-after)</sub> | **What moved between two states?**<br>Paired slopegraph with inline deltas; wraps cleanly in narrow columns. | <img src="gallery/output/explain/benchmark_gains.png" width="380" alt="mint.change paired slopegraph"> |
106
+ | **`mint.distribution`**<br><sub>[more examples](gallery/README.md#fmdistribution--raw-observations-and-spread)</sub> | **How are raw observations spread across groups?**<br>Every observation as a dot with a median/IQR (or mean/±1 s.d.) mark, or **quantile dotplots (`mode="quantile"`)** with countable probability dots, exceedance & $P(A > B)$ facts, `n=`, and `log=True`. | <img src="gallery/output/explain_visual_science/uncertainty_quantile_nested_ci.png" width="380" alt="Quantile dotplots paired with nested 50%/95% CIs and inline baseline deltas"> |
107
+ | **`mint.histogram`**<br><sub>alias: `distribution(bins=)`</sub><br><sub>[more examples](gallery/README.md#fmhistogram--binned-distributions)</sub> | **What is the binned shape or modality?**<br>Single-variable or shared-axis stacked histograms (up to 4 groups), dashed centre line, modal bin and `% above reference` facts. | <img src="gallery/output/explain_forms/histogram_bimodal.png" width="380" alt="mint.histogram bimodal distribution with SLA reference"> |
108
+ | **`mint.relate`**<br><sub>[more examples](gallery/README.md#fmrelate--two-continuous-measures)</sub> | **Do two continuous measures move together?**<br>Scatter with optional `groups=` (directly labelled), `names=`, `fit=True` least-squares lines with computed `r`, `n`, and 95% slope CIs, plus `log_x=`/`log_y=`. | <img src="gallery/output/explain_forms/relate_groups_fit.png" width="380" alt="mint.relate grouped scatter with linear fits"> |
109
+ | **`mint.share`**<br><sub>[more examples](gallery/README.md#fmshare--part-of-a-whole)</sub> | **What makes up the total?**<br>Sorted percentage bars (never a pie), folding smaller parts past `top=` into `"Other (n)"` with combined highlight shares in `facts`. | <img src="gallery/output/explain/build_time.png" width="380" alt="mint.share build time breakdown"> |
110
+ | **`mint.matrix`**<br><sub>[more examples](gallery/README.md#fmmatrix--two-categorical-dimensions)</sub> | **How do two categorical dimensions interact?**<br>Heat table with a number in every cell, `diverging=True` for signed/correlation data, cell/row/column highlights, and `—` for missing values. | <img src="gallery/output/explain_forms/matrix_missing.png" width="380" alt="mint.matrix evaluation pass rates with missing cell dashes"> |
111
+ | **`mint.table`**<br><sub>[more examples](gallery/README.md#fmtable--exact-lookups-and-scorecards)</sub> | **Need exact lookups or a mixed-unit scorecard?**<br>Booktabs table with per-column `units=`, `bold_best=` winners, shared row `highlight=`, `baseline=` deltas in `facts`, `—` for missing cells, and `.to_markdown()`. | <img src="gallery/output/explain_release/table_scorecard_chat.png" width="380" alt="mint.table booktabs benchmark scorecard paired with mint.compare"> |
112
+ | **Visual scaffolding**<br><sub>[more examples](gallery/README.md#visual-science--harness-adaptive-delivery)</sub> | **Point directly at the mechanism & fit every harness.**<br>Shaded `regions=` + leader-arrow `callouts=` on `trend`/`relate`, nested `inner_error=` CIs, `show_delta=True`, `width="narrow"` (450 px IDE sidebars), interactive `fig.save("out.html")`, and `mintfig show` (Kitty/iTerm2/Unicode). | <img src="gallery/output/explain_visual_science/narrative_callouts_regions.png" width="380" alt="Trend and relate panels with shaded regions and direct callout arrows"> |
113
+ | **Release hero cards**<br><sub>[more examples](gallery/README.md#model-release-hero-charts)</sub> | **Frontier model release & benchmark announcements.**<br>Grouped `mint.compare`, stacked `boost=` extensions, Pareto `mint.relate(frontier=True, label_all=True, connect_groups=True)`, `width="slide"`, and custom `accent=`. | <img src="gallery/output/explain_release/release_frontier_dark.png" width="380" alt="Dark mode model release hero with Pareto frontier and scorecard"> |
114
+ | **`mint.explain`**<br><sub>[more examples](gallery/README.md#fmexplain--multi-panel-arguments)</sub> | **Tell a multi-step argument in one glance.**<br>Compose 2–4 panels with one shared colour per entity across views, automatic `layout=`, and embedded spec round-tripping (`mint.load`). | <img src="gallery/output/explain/checkout_story.png" width="380" alt="mint.explain four-panel regression story"> |
115
+
116
+ ### Built for scientific agents
117
+
118
+ - **Uncertainty is first class and must be named.** Raw observations (`distribution`, `histogram`, `trend(points=)`), intervals (`compare(error=, error_label=)`), and bands (`trend(band=, band_label=)`); an unlabelled interval triggers a warning.
119
+ - **Numbers keep their magnitude.** Values format to ~3 significant figures (`1.3×10⁻⁷` when tiny or huge, never silently rounded to zero) with log axes on `compare`, `trend`, `distribution`, `histogram`, and `relate`.
120
+ - **One colour per entity.** A name keeps its colour across every panel of a figure, and `colors=` pins it across figures in a conversation.
121
+ - **Facts & one-shot shipping (`summary["ship"]`, `mint.lenient()`).** `fig.save()` returns computed `facts` per panel plus a `"ship"` verdict that separates real visual defects from minor advisory warnings so agents don't burn extra turns re-rendering good-enough figures. For rapid ad-hoc charts, `with mint.lenient():` / `mint.explain(..., strict=False)` / `mintfig explain --lenient` auto-adjusts soft limits (auto-faceting >4 series, auto-stacking cramped panels, trimming oversized lists) instead of rejecting.
122
+ - **Errors that teach & figures that come back.** Invalid arguments raise `ExplainError` with the exact fix; every PNG embeds its spec so `mint.load("fig.png").to_spec()` rebuilds and edits returned figures without redrawing from memory.
123
+ - **Native data inputs & Unicode.** Dicts, lists, NumPy arrays, pandas Series and DataFrames, plus direct Unicode symbols (`µm`, `cm⁻³`, `°C`, `χ²`). Full argument reference: [src/mintfig/assets/SKILL.md](src/mintfig/assets/SKILL.md) (verified by tests against the live API).
124
+
125
+ ---
126
+
127
+ ## Themes & Palettes
128
+
129
+ Surface **themes (`style=`)** and **color palettes (`palette=`)** change only aesthetics — never the information-design rules. Every built-in theme and palette is quantitatively tested for deuteranopia, protanopia, grayscale luminance separation, and WCAG 4.5:1 text contrast.
130
+
131
+ ![mintfig color palettes, surface themes, and editorial colormaps](gallery/output/explain_themes/palettes_overview.png)
132
+
133
+ - **7 surface themes (`style=`):** `mintfig` (default), `editorial` (serif headline, dotted grids), `paper` (warm ivory ground), `bold` (matte gray, heavy lines), `dark` (charcoal slate for dark UIs & slides), `mono` (monochrome print + single vermilion accent), and `sketch` (hand-drawn for illustrative points).
134
+ - **6 `mint.explain` color palettes (`palette=`):** `default`, `okabe_ito`, `tol`, `earth`, `ocean`, and `berry` — mixable with any surface theme (`mint.explain(..., style="paper", palette="okabe_ito")`).
135
+
136
+ | `style="dark"` | `style="paper"` | `palette="berry"` |
137
+ | :---: | :---: | :---: |
138
+ | ![dark theme](gallery/output/explain_themes/style_dark.png) | ![paper theme](gallery/output/explain_themes/style_paper.png) | ![berry palette](gallery/output/explain_themes/palette_berry.png) |
139
+
140
+ **[See all 7 themes and all 6 palettes rendered side-by-side in the Gallery →](gallery/README.md#themes--color-palettes)**
141
+
142
+ ---
143
+
144
+ ### Design rules, and where they come from
145
+
146
+ | Rule the forms enforce | Basis |
147
+ | :--- | :--- |
148
+ | The title is the conclusion as a sentence; each panel has its own headline | Assertion–evidence structure (Alley & Neeley, *Technical Communication* 2005) |
149
+ | Quantities are encoded by position or length on a common scale; bars start at zero; no pies | Cleveland & McGill, *JASA* 1984 (ranking of elementary perceptual tasks) |
150
+ | At most 4 coloured series and 3 highlights; the rest is grey context or small multiples | Working-memory capacity of ~4 items (Cowan, *BBS* 2001); small multiples (Tufte 1983) |
151
+ | Labels sit on the data, not in a legend; all text horizontal | Spatial contiguity / split attention (Mayer, *Multimedia Learning*) |
152
+ | Raw observations and named intervals are shown rather than hidden in bars | Weissgerber et al., *PLoS Biology* 2015; Cumming et al., *J. Cell Biol.* 2007 |
153
+ | A name keeps one colour across panels | Consistency of visual encoding across views (Qu & Hullman, *IEEE TVCG* 2018) |
154
+ | Series colours separate under deuteranopia, protanopia, and grayscale; text ≥ 4.5:1 contrast | Machado et al. 2009 simulation; WCAG 2 contrast |
155
+ | Text is at least 11 px tall at a 700 px chat column | Legibility floor, measured after layout and reported in the summary |
156
+
157
+ ---
158
+
159
+ ## Publication Figures
160
+
161
+ Default Matplotlib figures break journal specifications in subtle ways: 6.4" canvases shrink text below 5 pt when scaled to an 89 mm column, `bbox_inches="tight"` mutates PDF MediaBox dimensions, Type 3 fonts break Illustrator editing, Computer Modern serif math clashes with Helvetica labels, and 50k-point scatters produce sluggish multi-megabyte PDFs.
162
+
163
+ ![Before vs After default Matplotlib on an 89 mm Nature single-column figure](gallery/output/before_after_nature.png)
164
+
165
+ - **Exact physical column widths** — locked PDF MediaBox dimensions with `constrained_layout` and versioned journal spec provenance.
166
+ - **Uniform sans-serif typography & math** — Helvetica/Arial/Liberation Sans/DejaVu Sans for body text and mathtext, Type 42 PDF embedding (`pdf.fonttype = 42`), editable SVG text (`svg.fonttype = "none"`).
167
+ - **Multi-panel `Plate` engine & Tufte primitives** — aligned bold panel labels (`a, b, c` / `A, B, C`), auto-stacked `sig_bracket`, `scalebar`, `direct_labels`, `zoom_inset`, `range_frame`, `ghost_context`, `tufte_boxplot`, `slopegraph`, and `sparkline`.
168
+ - **Hybrid vector/raster & byte-reproducible bundles** — `save_figure(..., rasterize_above=10_000)` keeps axes crisp vector while rasterizing dense scatter/mesh layers; `mintfig run --bundle out/` emits `figure.pdf`, `figure.svg`, `preview.png`, `proof.png` (CVD + grayscale scorecard), `figure.tex`, `figure.json`, `reproduce.py`, and `report.json`.
169
+
170
+ **[View the Nature, Science, Cell, and NeurIPS publication plates in the Gallery →](gallery/README.md#publication-figures-fmfigure-fmplate-mintfig-run)** · [8-dimension journal audit](gallery/benchmark_comparison.md)
171
+
172
+ ### Supported journal & screen specs
173
+
174
+ | Target | Width Presets (mm) | Max Height (mm) | Body / Tick / Panel | Panel Case | Default Palette | Combo / Line DPI |
175
+ | :--- | :--- | :---: | :---: | :---: | :---: | :---: |
176
+ | **Nature Portfolio** (`nature`) | `single`: 89, `mid`/`1.5col`: 120, `double`/`full`: 183 | 170 (247 page) | 6.5 / 6.0 / 8.0 pt | `a, b, c` | `nature` | 500 / 1000 |
177
+ | **Science (AAAS)** (`science`) | `single`: 55, `double`/`2col`: 120, `full`/`3col`: 184 | 180 (230 page) | 7.0 / 6.0 / 8.5 pt | `A, B, C` | `science` | 600 / 1200 |
178
+ | **Science Advances** (`science_advances`) | `single`: 84, `mid`: 120, `double`/`full`: 175 | 180 (230 page) | 7.0 / 6.0 / 8.5 pt | `A, B, C` | `science` | 600 / 1200 |
179
+ | **Cell Press** (`cell`) | `single`: 85, `mid`/`1.5col`: 114, `double`/`full`: 174 | 200 (230 page) | 7.0 / 6.0 / 8.5 pt | `A, B, C` | `nature_muted` | 500 / 1000 |
180
+ | **PNAS** (`pnas`) | `single`: 87, `mid`/`1.5col`: 114, `double`/`full`: 178 | 200 (225 page) | 7.0 / 6.5 / 9.0 pt | `A, B, C` | `nature_muted` | 600 / 1200 |
181
+ | **NeurIPS** (`neurips`) | `half`/`single`: 67, `mid`: 111.8, `double`/`full`: 139.7 | 180 (228.6 page) | 7.5 / 6.5 / 8.5 pt | `a, b, c` | `nature_muted` | 500 / 1000 |
182
+ | **Screen / Chat** (`screen`) | `chat`/`single`: 140, `wide`/`double`: 180, `slide`: 240 | 135 (160 page) | 8.5 / 7.5 / 10.0 pt | `a, b, c` | `nature_muted` | 220 / 300 |
183
+
184
+ ### Publication quickstart
185
+
186
+ ```python
187
+ import numpy as np
188
+ import mintfig as mint
189
+
190
+
191
+ def build(journal: str = "nature") -> mint.Plate:
192
+ plate = mint.Plate(journal=journal, width="double", height_mm=118.0, layout=[["a", "b"], ["c", "d"]])
193
+ x = np.linspace(0, 10, 200)
194
+ plate["a"].plot(x, np.exp(-x / 3.0), label="Control")
195
+ plate["a"].plot(x, np.exp(-x / 6.0), label="Treated")
196
+ plate["a"].set_xlabel("Time (h)")
197
+ plate["a"].set_ylabel(r"Normalized signal ($\mu\mathrm{M}$)")
198
+ mint.direct_labels(plate["a"])
199
+ # Plot into plate["b"], plate["c"], plate["d"] ...
200
+ plate.label_panels()
201
+ return plate
202
+ ```
203
+
204
+ ---
205
+
206
+ ## CLI & Agent Skill
207
+
208
+ ```bash
209
+ # Chat figures from JSON or an embedded-spec PNG
210
+ mintfig explain spec.json --out fig.png --write-spec
211
+ mintfig explain fig.png --style dark --palette okabe_ito --out fig_dark.png
212
+ mintfig explain --show-spec fig.png
213
+
214
+ # Publication scripts: execute, preflight (14 rules), and export reproducible bundle
215
+ mintfig run plot.py --journal nature --bundle out/ --json
216
+ mintfig run plot.py --journal science --width full --bundle out_sci/ --strict
217
+
218
+ # Audit existing PDFs & inspect specs
219
+ mintfig check figure2.pdf --journal nature --json
220
+ mintfig specs --journal nature --json
221
+
222
+ # Install bundled agent skill (Claude Code, Antigravity, Cursor, Codex, AGENTS.md, CLAUDE.md)
223
+ mintfig skill --install
224
+ mintfig skill --install --target claude,antigravity,cursor,codex,agents-md,claude-md --root .
225
+ ```
226
+
227
+ Exit codes: `0` clean pass · `1` error-level issue (or warning under `--strict`) · `2` invalid spec, script contract violation, or runtime error.
228
+
229
+ ---
230
+
231
+ ## Benchmarks & Development
232
+
233
+ - **Chat figure benchmark (`evals/figure_bench/`)**: timed end-to-end benchmark of fresh agents reading only `SKILL.md` across 10 core tasks and 5 held-out tasks with an independent drawn-text layout audit ([evals/figure_bench/README.md](evals/figure_bench/README.md)).
234
+ - **Publication repair eval (`evals/`)**: 10 clean control scripts and 25 messy agent-written scripts testing `mintfig run --json` + `fix_hint` repair loops ([evals/eval_report.md](evals/eval_report.md)).
235
+
236
+ ```bash
237
+ .venv/bin/pytest -q
238
+ .venv/bin/ruff check src tests gallery evals
239
+ ```
@@ -0,0 +1,47 @@
1
+ mintfig/__init__.py,sha256=0gTCvGbuU_2rf73uDXbPDBYJxCmW-BAM5UNlge6mRj4,3484
2
+ mintfig/_table.py,sha256=_WTQ7CMs6izX4mPFWuMklqBIDaccWc2ARFasiM-8NMg,27341
3
+ mintfig/_tabular.py,sha256=B3et7Z-zU3aLA_Y-bKh-hmg_xi3EzaBM2GO0dfQb8zM,28406
4
+ mintfig/annotations.py,sha256=Drycr85LbVgEwmx-kXDUOt0gHDYKOGJMakJv0exptC8,39569
5
+ mintfig/audit.py,sha256=7z6kNhMkOJakqAC4bLlBd6RUBWpLRS9X5ccdqk53mRg,6466
6
+ mintfig/brief.py,sha256=Y4-ZZwsOc92dEUrlHkDGWwZwLj2N0ekBwyMizxg5t_g,18169
7
+ mintfig/bundle.py,sha256=w5ed-o5xfLQtqCvXwoZVu0qS2-Z7XFFwUOeShZzhRqw,10843
8
+ mintfig/cli.py,sha256=eksGZhR4X2A-rZMprfA_Zb5HGwmqkfBiBjEk9eav6Mk,53280
9
+ mintfig/edit.py,sha256=spk0UFL5mUkw495U0zRYikUuOjdehLKYAZ0JSzQVbK0,12763
10
+ mintfig/epistemic.py,sha256=JOO-5ADOUzvxjZpfSTThVHWOdQAvJFLKUURivfHW5jE,41420
11
+ mintfig/explainer.py,sha256=e3RwRql1kxe9Vu7kGDpR2SEqAxvtlM1KxIxfsrDFKoI,4003
12
+ mintfig/export.py,sha256=Wk8CfKiRXAFZJEN3kBBtQg5D5UOcJbByUcyKGxz7UEY,8409
13
+ mintfig/inspect_data.py,sha256=wUMg88zko9KtpsWReAljEwEO_vS_c3yFs-F1bTGNS-M,25040
14
+ mintfig/interactive.py,sha256=sN8D0Y0o570EggIU0vRBv7oe3QtS1optTUOBkKTh5Kc,36980
15
+ mintfig/palettes.py,sha256=OtzO1QciYDD7RCGr8DZBOd90uv9Gj6WhV_9Wi8MmWxo,6721
16
+ mintfig/plate.py,sha256=iT5wIQAXEubxE14HW17NTmUi7jBZAmEBqG7pj26CEZE,33174
17
+ mintfig/preflight.py,sha256=-5q5JBEW136lF2XIPKm4u41miuiSTbnzz8b7nNQ_8Z8,91343
18
+ mintfig/proof.py,sha256=JZQmLjoem21ZLRLiKLSb4AkkfFySAj9HDGWykzd9-KQ,17921
19
+ mintfig/runner.py,sha256=6_LOs_Lw0zfBVy7ruaw9M3LRE6ASOercbk85X2XoB24,15153
20
+ mintfig/skill.py,sha256=iPHEDxtvygtJiBxUAde9IBwsFmDOMJrnqWD_AmXpjDg,5857
21
+ mintfig/specs.py,sha256=Rk89xXtwcmkUMcZQHNmjBJ2A-wWIjLdmJfYU4Z7t7XM,9167
22
+ mintfig/style.py,sha256=OzGhDHxXS-_ENy0sc4i3fCVj9IgsKSyIcQo_B40vQQs,5371
23
+ mintfig/terminal.py,sha256=0OanJB3NOThuhl8iPPNTiX-VElf-R_8WGDACmUy3FcU,30197
24
+ mintfig/themes.py,sha256=uykXRon2XPr-XqKICM0QDApaE_zqxwsIHuxOpco10DQ,24209
25
+ mintfig/_explain/__init__.py,sha256=KQum2UYmm8-oKGBlUeozWksAtLH0BIM2-m0IaMCbR3o,79
26
+ mintfig/_explain/change.py,sha256=8ElGqqRRyP09WZw3Xcnti0rN2Z12de4e4Gw9xV-NWQk,16907
27
+ mintfig/_explain/compare.py,sha256=p0EREDpNuL2dTADwvbhl4eiUKV3LvNybdndMhCT0rBc,55291
28
+ mintfig/_explain/compare_grouped.py,sha256=OIiKspnanBxK443gqCC_jM2JTxBzsMGD9VeMToRdKgo,18640
29
+ mintfig/_explain/core.py,sha256=HOkEbUg77yZPKWJb2s5Ql71gr5PGE2lPYd0yh6JSI5s,76692
30
+ mintfig/_explain/distribution.py,sha256=blqLTUqIGn0E7Bh6S2-YwIewV6DYKIgIjjsz8J2FgzM,52155
31
+ mintfig/_explain/flow.py,sha256=VGxWdcPRs-IWvi8qaSJlvl4lrRo2KWo9-SkTZ29w57U,18985
32
+ mintfig/_explain/layout.py,sha256=1Th69gejtgRDr6V6BfhBsJzcRkeiKlho32c-qnFM2e0,80354
33
+ mintfig/_explain/matrix.py,sha256=kyQWuf-E2WQzIQafQXLgoX4zgrPnz5ALE6LrI0iIW_Q,25832
34
+ mintfig/_explain/relate.py,sha256=KqYNKfe9elINmPN90tz0ETzbUl07imvLftOUfGQeV_E,53548
35
+ mintfig/_explain/timeline.py,sha256=xqMF-IjbNYhsvrnZlFmMkjH9tMAJGvDkmWS-TthvJLA,23631
36
+ mintfig/_explain/trend.py,sha256=8vZAFlP2yao3ZrY6yShzsUSNVvO_rN4mE3qHtXvsZNQ,103579
37
+ mintfig/_explain/waterfall.py,sha256=1AmEu6bTjwR9nczMHbu2ea_ZKqJUthbzbbfIuBl7m8U,16508
38
+ mintfig/assets/AGENTS_SNIPPET.md,sha256=XxJP4rRC1PegB2AOFBJUTJoNyS1MTJo-2zxV78Ld6K4,2633
39
+ mintfig/assets/SKILL.md,sha256=BAO-UtpMbeVp75Schz4peE6uRYvfIHHLG9fiLRj3sR0,10422
40
+ mintfig/assets/__init__.py,sha256=lJOin0Omj03SLzm89jHw3IKGhfnbs0c0-gZ2qvJgnHo,63
41
+ mintfig/assets/references/publication.md,sha256=ozZOpV9lnvPnNzB0uGO0qVeoaKo76oeZkm_MM0Y0P7s,4845
42
+ mintfig/assets/references/scientific_and_recipes.md,sha256=nvKNsUobjiXhEYJ-mGSGIpeAmx31VsFogAeyhWigq1o,12437
43
+ mintfig-0.2.0.dist-info/METADATA,sha256=GRTUKye_aMzOsrvr2zlyeCJ4hmt-GBuFlge5rGMZSkw,19624
44
+ mintfig-0.2.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
45
+ mintfig-0.2.0.dist-info/entry_points.txt,sha256=T0qqVXXFlOORoO5tkYtx1UhQjAF_B6sX9IaiSKYvato,45
46
+ mintfig-0.2.0.dist-info/licenses/LICENSE,sha256=J4aKSh2qG5yovBmKguURS9Kj4rJ1pUSApNbj8N0ZX4k,1069
47
+ mintfig-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mintfig = mintfig.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ben Blaiszik
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.