mintfig 0.2.0__tar.gz → 0.3.3__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.
- mintfig-0.3.3/.github/actions/mintfig-check/README.md +118 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/.gitignore +3 -0
- mintfig-0.3.3/CHANGELOG.md +84 -0
- mintfig-0.3.3/PKG-INFO +490 -0
- mintfig-0.3.3/README.md +456 -0
- mintfig-0.3.3/evals/check_bench/README.md +62 -0
- mintfig-0.3.3/evals/figure_bench/README.md +196 -0
- mintfig-0.3.3/evals/figure_bench/human_study/README.md +68 -0
- mintfig-0.3.3/evals/figure_bench/leaderboard/submissions/README.md +32 -0
- mintfig-0.3.3/evals/trigger_eval/README.md +33 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/gallery/README.md +140 -21
- mintfig-0.3.3/plugins/claude-code/README.md +45 -0
- mintfig-0.3.3/promo/demo-video/README.md +36 -0
- mintfig-0.3.3/promo/demo-video/src/AgentVideo.tsx +709 -0
- mintfig-0.3.3/promo/demo-video/src/ReadmeGifs.tsx +1379 -0
- mintfig-0.3.3/promo/demo-video/src/Root.tsx +12 -0
- mintfig-0.3.3/promo/demo-video/src/Video.tsx +688 -0
- mintfig-0.3.3/promo/demo-video/src/agent_assets.json +18 -0
- mintfig-0.3.3/promo/demo-video/src/assets.json +70 -0
- mintfig-0.3.3/promo/demo-video/src/index.ts +4 -0
- mintfig-0.3.3/promo/demo-video/src/readme-index.ts +4 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/pyproject.toml +16 -3
- mintfig-0.3.3/src/mintfig/__init__.py +273 -0
- mintfig-0.3.3/src/mintfig/_check_runner.py +66 -0
- mintfig-0.3.3/src/mintfig/_chip_bridge.py +230 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/change.py +20 -7
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/compare.py +703 -42
- mintfig-0.3.3/src/mintfig/_explain/compare_grouped.py +1231 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/core.py +490 -36
- mintfig-0.3.3/src/mintfig/_explain/distribution.py +2506 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/flow.py +4 -3
- mintfig-0.3.3/src/mintfig/_explain/forest.py +722 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/layout.py +1052 -79
- mintfig-0.3.3/src/mintfig/_explain/marks.py +122 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/matrix.py +237 -39
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/relate.py +348 -35
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/timeline.py +6 -5
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/trend.py +244 -91
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/waterfall.py +10 -7
- mintfig-0.3.3/src/mintfig/_inline/__init__.py +43 -0
- mintfig-0.3.3/src/mintfig/_inline/change.py +1110 -0
- mintfig-0.3.3/src/mintfig/_inline/composition.py +909 -0
- mintfig-0.3.3/src/mintfig/_inline/core.py +1731 -0
- mintfig-0.3.3/src/mintfig/_inline/evidence.py +1097 -0
- mintfig-0.3.3/src/mintfig/_inline/structure.py +1248 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_table.py +498 -41
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/annotations.py +737 -74
- mintfig-0.3.3/src/mintfig/assets/AGENTS_SNIPPET.md +11 -0
- mintfig-0.3.3/src/mintfig/assets/SKILL.md +136 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/assets/references/publication.md +6 -4
- mintfig-0.3.3/src/mintfig/assets/references/recipes.md +165 -0
- mintfig-0.3.3/src/mintfig/assets/references/science.md +52 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/audit.py +7 -1
- mintfig-0.3.3/src/mintfig/brief.py +780 -0
- mintfig-0.3.3/src/mintfig/bundle.py +1012 -0
- mintfig-0.3.3/src/mintfig/byo.py +751 -0
- mintfig-0.3.3/src/mintfig/card.py +2582 -0
- mintfig-0.3.3/src/mintfig/cli.py +2881 -0
- mintfig-0.3.3/src/mintfig/demo.py +1112 -0
- mintfig-0.3.3/src/mintfig/diff.py +918 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/edit.py +64 -3
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/epistemic.py +454 -27
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/explainer.py +6 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/export.py +125 -0
- mintfig-0.3.3/src/mintfig/figcheck.py +2278 -0
- mintfig-0.3.3/src/mintfig/hooks.py +815 -0
- mintfig-0.3.3/src/mintfig/ingest.py +1128 -0
- mintfig-0.3.3/src/mintfig/inline.py +110 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/inspect_data.py +76 -6
- mintfig-0.3.3/src/mintfig/interactive.py +1564 -0
- mintfig-0.3.3/src/mintfig/mcp_server.py +1936 -0
- mintfig-0.3.3/src/mintfig/notebook.py +761 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/palettes.py +1 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/plate.py +72 -38
- mintfig-0.3.3/src/mintfig/pr_card.py +455 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/preflight.py +196 -19
- mintfig-0.3.3/src/mintfig/pub.py +99 -0
- mintfig-0.3.3/src/mintfig/py.typed +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/runner.py +68 -61
- mintfig-0.3.3/src/mintfig/skill.py +322 -0
- mintfig-0.3.3/src/mintfig/style.py +297 -0
- mintfig-0.3.3/src/mintfig/surface.py +858 -0
- mintfig-0.3.3/src/mintfig/terminal.py +4496 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/themes.py +566 -19
- mintfig-0.3.3/tests/test_bench_arms.py +220 -0
- mintfig-0.3.3/tests/test_brief_document.py +188 -0
- mintfig-0.3.3/tests/test_byo_matplotlib.py +396 -0
- mintfig-0.3.3/tests/test_card.py +501 -0
- mintfig-0.3.3/tests/test_cli_ergonomics.py +86 -0
- mintfig-0.3.3/tests/test_core_runtime_fixes.py +278 -0
- mintfig-0.3.3/tests/test_delivery.py +179 -0
- mintfig-0.3.3/tests/test_delivery_bench.py +126 -0
- mintfig-0.3.3/tests/test_demo_and_doctor.py +241 -0
- mintfig-0.3.3/tests/test_density.py +92 -0
- mintfig-0.3.3/tests/test_editorial_craft.py +406 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_explain.py +9 -7
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_explain_data.py +2 -2
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_explain_final.py +19 -17
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_explain_styles.py +248 -8
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_explain_visual.py +35 -11
- mintfig-0.3.3/tests/test_extensions.py +98 -0
- mintfig-0.3.3/tests/test_facets.py +253 -0
- mintfig-0.3.3/tests/test_figcheck.py +702 -0
- mintfig-0.3.3/tests/test_figcheck_wild.py +116 -0
- mintfig-0.3.3/tests/test_figure_bench_leaderboard.py +340 -0
- mintfig-0.3.3/tests/test_figure_bench_v01.py +914 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_flow_fit_matrix_auto.py +3 -1
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_harness_delivery.py +18 -20
- mintfig-0.3.3/tests/test_hooks_and_skill.py +707 -0
- mintfig-0.3.3/tests/test_html_compact.py +63 -0
- mintfig-0.3.3/tests/test_html_surface.py +282 -0
- mintfig-0.3.3/tests/test_inline.py +184 -0
- mintfig-0.3.3/tests/test_inline_change.py +414 -0
- mintfig-0.3.3/tests/test_inline_composition.py +486 -0
- mintfig-0.3.3/tests/test_inline_evidence.py +369 -0
- mintfig-0.3.3/tests/test_inline_structure.py +402 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_inspect_plot_edit.py +52 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_integration_narrow_and_wiring.py +11 -12
- mintfig-0.3.3/tests/test_mcp_server.py +565 -0
- mintfig-0.3.3/tests/test_mintchip_integration.py +269 -0
- mintfig-0.3.3/tests/test_new_forms.py +388 -0
- mintfig-0.3.3/tests/test_notebook.py +114 -0
- mintfig-0.3.3/tests/test_optin_rules.py +420 -0
- mintfig-0.3.3/tests/test_pr_card_and_action.py +652 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_preflight_regressions.py +4 -4
- mintfig-0.3.3/tests/test_pub_perfection.py +378 -0
- mintfig-0.3.3/tests/test_public_api.py +130 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_release_charts.py +1 -1
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_runner_export_regressions.py +1 -1
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_skill_doc.py +2 -1
- mintfig-0.3.3/tests/test_surface_and_tmux.py +472 -0
- mintfig-0.3.3/tests/test_swarm_distribution.py +317 -0
- mintfig-0.3.3/tests/test_swe_ingest_and_diff.py +705 -0
- mintfig-0.3.3/tests/test_table_graphics.py +183 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_tabular_table_audit.py +19 -9
- mintfig-0.3.3/tests/test_terminal_braille_and_html.py +319 -0
- mintfig-0.3.3/tests/test_terminal_braille_forms.py +474 -0
- mintfig-0.3.3/tests/test_terminal_layout_and_cli.py +585 -0
- mintfig-0.3.3/tests/test_text_surface.py +262 -0
- mintfig-0.3.3/tests/test_trigger_eval.py +100 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_v03_specs_clarity_sidecar.py +3 -3
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_v03_tufte_and_clarity.py +6 -6
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_visual_science_forms.py +4 -3
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_waterfall_timeline.py +2 -2
- mintfig-0.3.3/tests/test_words_and_marks.py +199 -0
- mintfig-0.2.0/PKG-INFO +0 -239
- mintfig-0.2.0/README.md +0 -216
- mintfig-0.2.0/evals/figure_bench/README.md +0 -76
- mintfig-0.2.0/src/mintfig/__init__.py +0 -162
- mintfig-0.2.0/src/mintfig/_explain/compare_grouped.py +0 -472
- mintfig-0.2.0/src/mintfig/_explain/distribution.py +0 -1268
- mintfig-0.2.0/src/mintfig/assets/AGENTS_SNIPPET.md +0 -11
- mintfig-0.2.0/src/mintfig/assets/SKILL.md +0 -143
- mintfig-0.2.0/src/mintfig/assets/references/scientific_and_recipes.md +0 -213
- mintfig-0.2.0/src/mintfig/brief.py +0 -518
- mintfig-0.2.0/src/mintfig/bundle.py +0 -333
- mintfig-0.2.0/src/mintfig/cli.py +0 -1300
- mintfig-0.2.0/src/mintfig/interactive.py +0 -1028
- mintfig-0.2.0/src/mintfig/skill.py +0 -167
- mintfig-0.2.0/src/mintfig/style.py +0 -151
- mintfig-0.2.0/src/mintfig/terminal.py +0 -785
- {mintfig-0.2.0 → mintfig-0.3.3}/LICENSE +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_explain/__init__.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/_tabular.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/assets/__init__.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/proof.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/src/mintfig/specs.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_epistemic.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_panel_label_placement.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_plate_and_export.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_preflight_and_cli.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_session_brief.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_specs_and_style.py +0 -0
- {mintfig-0.2.0 → mintfig-0.3.3}/tests/test_v02_runner_bundle_skill.py +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# `mintfig-check` GitHub Action
|
|
2
|
+
|
|
3
|
+
Reusable composite GitHub Action that runs [`mintfig check`](../../../README.md) on Matplotlib/Seaborn scripts (`.py`), Jupyter notebooks (`.ipynb`), and exported journal PDFs (`.pdf`), writing a compact Markdown scorecard to the GitHub Actions Step Summary and exposing it for optional PR comments.
|
|
4
|
+
|
|
5
|
+
## Quickstart: Check Changed Figures in Pull Requests
|
|
6
|
+
|
|
7
|
+
Drop this workflow into `.github/workflows/figure-check.yml`:
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
name: Figure Check
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
pull_request:
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
mintfig:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
|
|
26
|
+
- name: Check changed plotting scripts & PDFs
|
|
27
|
+
uses: blaiszik/mintfig/.github/actions/mintfig-check@main
|
|
28
|
+
with:
|
|
29
|
+
paths: "changed"
|
|
30
|
+
width: "chat"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
When `paths: "changed"` is set, the action inspects files changed relative to the PR base branch (`origin/$GITHUB_BASE_REF...HEAD`), selects `.py` and `.ipynb` files that reference Matplotlib, Seaborn, or `mintfig` (plus changed `.pdf` files), and audits every figure they produce.
|
|
34
|
+
|
|
35
|
+
## Check Explicit Paths or Globs
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
- name: Audit paper figures
|
|
39
|
+
uses: blaiszik/mintfig/.github/actions/mintfig-check@main
|
|
40
|
+
with:
|
|
41
|
+
paths: "figures/*.py notebooks/analysis.ipynb manuscript/fig*.pdf"
|
|
42
|
+
width: "slide"
|
|
43
|
+
journal: "nature"
|
|
44
|
+
strict: "true"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Optional: Post the Report as a PR Comment
|
|
48
|
+
|
|
49
|
+
Give the job `pull-requests: write` permission and pass `steps.check.outputs.report-markdown` to `actions/github-script@v7`:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
permissions:
|
|
53
|
+
contents: read
|
|
54
|
+
pull-requests: write
|
|
55
|
+
|
|
56
|
+
jobs:
|
|
57
|
+
mintfig:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
with:
|
|
62
|
+
fetch-depth: 0
|
|
63
|
+
|
|
64
|
+
- id: check
|
|
65
|
+
uses: blaiszik/mintfig/.github/actions/mintfig-check@main
|
|
66
|
+
with:
|
|
67
|
+
paths: "changed"
|
|
68
|
+
fail-on-fix: "false"
|
|
69
|
+
|
|
70
|
+
- name: Comment PR with figure audit
|
|
71
|
+
if: github.event_name == 'pull_request' && steps.check.outputs.checked-count != '0'
|
|
72
|
+
uses: actions/github-script@v7
|
|
73
|
+
env:
|
|
74
|
+
MINTFIG_REPORT: ${{ steps.check.outputs.report-markdown }}
|
|
75
|
+
with:
|
|
76
|
+
script: |
|
|
77
|
+
await github.rest.issues.createComment({
|
|
78
|
+
owner: context.repo.owner,
|
|
79
|
+
repo: context.repo.repo,
|
|
80
|
+
issue_number: context.issue.number,
|
|
81
|
+
body: process.env.MINTFIG_REPORT,
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Inputs
|
|
86
|
+
|
|
87
|
+
| Input | Default | Description |
|
|
88
|
+
| :--- | :--- | :--- |
|
|
89
|
+
| `paths` | `"changed"` | Space-separated `.py` / `.ipynb` / `.pdf` paths or globs, or `"changed"` to auto-detect changed plotting files in a PR. |
|
|
90
|
+
| `width` | `"chat"` | Reading width for script/notebook checks: `narrow` (450 px), `chat` (700 px), `slide` (1280 px), or a pixel number. |
|
|
91
|
+
| `journal` | `"nature"` | Target journal preset for `.pdf` preflight (`nature`, `science`, `cell`, `pnas`, `neurips`, `ieee`, `acs`, `aps`, `rsc`). |
|
|
92
|
+
| `strict` | `"false"` | Fail on warnings and advisories in addition to blocking errors/defects. |
|
|
93
|
+
| `fail-on-fix` | `"true"` | Exit non-zero when any figure returns `FIX FIRST` or fails execution. |
|
|
94
|
+
| `python-version` | `"3.12"` | Python version installed by `actions/setup-python@v5`. |
|
|
95
|
+
| `mintfig-version` | `""` | Version pin (e.g. `"0.3.0"` or `">=0.3,<1.0"`). Leave empty for latest PyPI release (or local repo when run inside `mintfig`). |
|
|
96
|
+
| `write-summary` | `"true"` | Append the formatted Markdown report to `$GITHUB_STEP_SUMMARY`. |
|
|
97
|
+
|
|
98
|
+
## Outputs
|
|
99
|
+
|
|
100
|
+
| Output | Description |
|
|
101
|
+
| :--- | :--- |
|
|
102
|
+
| `passed` | `"true"` when every checked figure shipped cleanly, otherwise `"false"`. |
|
|
103
|
+
| `checked-count` | Number of figures audited across all matched targets. |
|
|
104
|
+
| `failed-count` | Number of figures with `FIX FIRST` or script errors. |
|
|
105
|
+
| `report-markdown` | Complete GitHub Markdown scorecard (table, claim mismatches + closest data values, and `fix_hint`s). |
|
|
106
|
+
|
|
107
|
+
## Pairing with Dual-Theme PR Figure Cards
|
|
108
|
+
|
|
109
|
+
To embed light/dark figures directly in PR descriptions, generate a card with `mintfig.pr_card.save_pr_card`:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from mintfig.pr_card import save_pr_card
|
|
113
|
+
|
|
114
|
+
card = save_pr_card(fig, "docs/pr_figures", name="ablation", repo_prefix="docs/pr_figures")
|
|
115
|
+
print(card["markdown"])
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The emitted `<picture>` block switches cleanly between `<name>.light.png` and `<name>.dark.png` for GitHub light and dark mode and includes collapsible computed facts plus `mintfig explain` reproduce commands.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `mintfig` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) once 1.0 is reached.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **Wild Matplotlib & Seaborn artist extraction in `mint.check`:**
|
|
11
|
+
- `QuadMesh` (`sns.heatmap`, `ax.pcolormesh`) value extraction, min/max/ratio facts, claim candidates, and colormap checks.
|
|
12
|
+
- Colorbar axes exclusion so colorbars never trigger bogus `axis_unlabelled` errors or phantom panels.
|
|
13
|
+
- Contiguous-edge histogram detection (`ax.hist`, `sns.histplot`) extracting bin count, total count, peak bin center/range, and median estimate.
|
|
14
|
+
- `PolyCollection` envelope extraction (`ax.fill_between`, `sns.lineplot` CI bands) while preserving `interval_unlabelled` checks.
|
|
15
|
+
- Boxplot and violinplot cluster detection (`ax.boxplot`, `sns.boxplot`, `ax.violinplot`) extracting per-group median/IQR/whisker facts without misreading geometry as data lines.
|
|
16
|
+
- **Cross-environment `uvx` / `--python` and Jupyter notebook checking:**
|
|
17
|
+
- `mintfig check plot.py --python <path>` with automatic project `.venv` / `VIRTUAL_ENV` / `CONDA_PREFIX` detection so `uvx mintfig check plot.py` runs seamlessly against project-local packages (`pandas`, `seaborn`, `scipy`).
|
|
18
|
+
- Zero-dependency `.ipynb` support via `mintfig check analysis.ipynb` and `check_notebook()`.
|
|
19
|
+
- **Wild-50 verification corpus (`evals/check_bench/`):** 50 deterministic Matplotlib/Seaborn test cases verifying `< 2%` false-positive rate and `> 90%` defect catch rate.
|
|
20
|
+
- **Global skill installation & full bundle printing:**
|
|
21
|
+
- `mintfig skill --install --global` auto-detecting `~/.claude`, `~/.codex`, `~/.gemini`, and `~/.cursor`, plus `--target all` and `mintfig skill --print --all`.
|
|
22
|
+
- **Automatic agent `PostToolUse` hooks (`mintfig hook`):**
|
|
23
|
+
- `mintfig hook --install`, `--uninstall`, `--status`, and `mintfig hook run` silently auditing agent-written Matplotlib scripts on write/edit/run and emitting `fix_hint` feedback only when `ship` is `false`.
|
|
24
|
+
- **Claude Code plugin package (`plugins/claude-code/`):** ready-to-install plugin bundle with synced `SKILL.md` + `references/`, `PostToolUse` hook config, and `/mintfig:check` command.
|
|
25
|
+
- **40-prompt skill trigger evaluation (`evals/trigger_eval/`):** 20 positive and 20 negative realistic prompts (none mentioning `mintfig`) with deterministic offline rubric scoring, `--live` CLI adapter (`claude`, `codex`, `gemini`), and pytest suite (`tests/test_trigger_eval.py`).
|
|
26
|
+
- **3-column README opener & comparison generator (`gallery/make_readme_comparison.py`):** side-by-side comparison of agent text-only, default agent Matplotlib (`ship: false`), and `mintfig` (`ship: true`) on identical ablation data, plus wedge-first adoption ordering (`mint.check` + `mintfig hook` alongside `mint.explain`).
|
|
27
|
+
- **Zero-rewrite Matplotlib upgrades (`src/mintfig/byo.py`, `gallery/byo_matplotlib_examples.py`):**
|
|
28
|
+
- `mint.style(style="mintfig", *, palette=None, width="chat", accent=None)` leak-free context manager applying chat-readable sizing (>=11 px display text), CVD-safe palette cycles, despining, and `viridis` default cmap.
|
|
29
|
+
- `mint.explain(takeaway, fig_or_ax, ...)` accepting plain Matplotlib/Seaborn `Figure`, `Axes`, or `SubFigure` objects directly as panels with `mint.check` facts, `ship` propagation, HTML, terminal, and `mint.brief` support.
|
|
30
|
+
- Zero-dependency IPython/Jupyter magic (`%load_ext mintfig`, `%mintfig_check on|off|status`, `mint.byo.auto_check()`).
|
|
31
|
+
- **Opt-in legends & pie/donut charts (Workstream A):**
|
|
32
|
+
- `mint.share(..., kind="bars" | "pie" | "donut")` (sorted bars remain default; pie/donut opt-in for <=5 parts with non-blocking `pie_close_slices` advisory when adjacent slices are within 5 pp).
|
|
33
|
+
- Opt-in `legend=True` on `mint.trend`, `mint.relate`, and grouped `mint.compare` with frameless top legends (direct labels remain default).
|
|
34
|
+
- **SWE dev-tool ingestors, `mintfig diff`, and terminal/Markdown-first CLI (`src/mintfig/ingest.py`, `src/mintfig/diff.py`):**
|
|
35
|
+
- Zero-dep parsers wired into `load_table_file`/`inspect_data`/`mintfig plot`: `hyperfine` JSON, `pytest-benchmark` JSON, `go test -bench` & `cargo bench` logs, GitHub Actions CI timings, Chrome Trace/OTEL spans, `k6` summaries, `esbuild`/`vite` metafiles, and LLM eval tables.
|
|
36
|
+
- `mintfig diff base head` (`--out`, `--text`, `--markdown`, `--json`, `--fail-on-regression PCT`) with interval-overlap noise suppression (`within_noise`).
|
|
37
|
+
- `--text` and `--markdown` stdout flags on `mintfig plot` (no PNG file needed).
|
|
38
|
+
- **GitHub PR cards, reusable GitHub Action, & 1.0 Stability Policy (`src/mintfig/pr_card.py`, `.github/actions/mintfig-check/`, `docs/STABILITY_POLICY.md`):**
|
|
39
|
+
- `save_pr_card()` emitting light+dark PNGs with native GitHub `<picture>` markup and collapsible `<details>` facts/reproduce block, plus `format_check_pr_comment()`.
|
|
40
|
+
- Reusable composite GitHub Action at `.github/actions/mintfig-check/action.yml` + manual example workflow.
|
|
41
|
+
- SemVer & deprecation contract documented in `docs/STABILITY_POLICY.md`.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- **False-positive hardening in `mint.check` / `epistemic.py`:** ignores non-metric model/precision tokens (`GPT-5`, `Llama-3.1`, `8B`, `FP16`, `INT4`, `v2.3`, `ResNet-50`), sample/design counts (`5 seeds`, `3 replicates`, `top-5`, `p < 0.05`, `95% CI`), and calendar years (`1990`–`2035`), while supporting common unit-scale conversions (`0.08` <-> `8%` <-> `8 points`, `0.08 s` <-> `80 ms`, `1500` <-> `1.5k`).
|
|
45
|
+
- **Sharpened `SKILL.md` and `AGENTS_SNIPPET.md` trigger criteria:** explicitly specifies both when to trigger (5+ numbers, comparisons/trends/distributions, plain Matplotlib/notebook checks, journal plates) and when NOT to trigger (routine code edits, refactors, bug fixes, tests, git, stack traces, config/Docker, 1–3 scalar numbers), while keeping the chat section under the 12 kB context budget.
|
|
46
|
+
|
|
47
|
+
## [0.3.0] - 2026-11-26
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
- **`mint.check(fig, claim)` and `mintfig check plot.py`:** audits any plain Matplotlib figure against its own plotted artist data and measures text legibility at reading width (`chat`, `narrow`, `slide`) with concrete `fix_hint`s and a `ship` gate.
|
|
51
|
+
- **Presentation & delivery layer:**
|
|
52
|
+
- `summary["deliver"]` (`markdown`, `caption`, `text`, `html`), `fig.show()`, `fig.to_text()`, `fig.to_html()`, and `mintfig doctor`.
|
|
53
|
+
- Entity-coloured names in titles (`color_names=True`), automatic delta brackets (`show_delta="auto"`), and `density="compact"`.
|
|
54
|
+
- `mint.table` in-cell graphics (`bars=`, `interval=`, `spark=`).
|
|
55
|
+
- `mint.brief(...)` multi-figure HTML and Markdown briefings with thumbnail overviews and collapsible data blocks.
|
|
56
|
+
- `mint.Session` for consistent entity colours across multi-turn conversations and `mint.edit()` / `mint.load()` round-tripping from PNG-embedded specs.
|
|
57
|
+
- Responsive HTML export (container queries for 360 px / 450 px / full width, light/dark mode, hover readouts, click-to-copy citations).
|
|
58
|
+
- **Progressive `SKILL.md`:** trimmed chat-figure core under 12 kB with modular `references/{science,recipes,publication}.md` files.
|
|
59
|
+
- **Plain-Matplotlib baseline in `evals/figure_bench/`:** `--arm matplotlib` and `--arm matplotlib-plain` with arm-neutral `savefig` auditing (`neutral.py`) and blind reader evaluation.
|
|
60
|
+
|
|
61
|
+
### Changed (Breaking)
|
|
62
|
+
- Streamlined top-level `mintfig` namespace to agent-facing entry points only (no legacy aliases; moved symbols raise an informative `AttributeError`):
|
|
63
|
+
- Publication helpers → `mint.pub.*` (`mint.Plate` and `mint.figure` remain at top level).
|
|
64
|
+
- Surface themes and palettes → `mint.themes`.
|
|
65
|
+
- Audit utilities → `mint.audit`.
|
|
66
|
+
- Skill installer helpers → `mint.skill`.
|
|
67
|
+
- `explain_from_spec` → `mint.load`; `render_html`/`render_terminal`/`show_in_terminal` → `fig.to_html()`/`fig.to_text()`/`fig.show()`.
|
|
68
|
+
- Moved `pypdf` to optional extra `mintfig[pub]`.
|
|
69
|
+
|
|
70
|
+
## [0.2.1] - 2026-11-24
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
- Renamed PyPI distribution and import package to `mintfig` (`import mintfig as mint`).
|
|
74
|
+
- Switched README gallery image links to absolute GitHub raw URLs for PyPI rendering.
|
|
75
|
+
|
|
76
|
+
## [0.2.0] - 2026-11-24
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
- **Message-first `mint.explain` API and 13 panel forms:** `compare`, `trend`, `change`, `distribution`, `histogram`, `relate`, `share`, `matrix`, `table`, `waterfall`, `timeline`, `flow`, and `custom` escape hatch.
|
|
80
|
+
- **Computed epistemic facts & audit-gated shipping (`summary["ship"]`):** rankings, gaps vs `baseline=`, interval overlap, `P(A > B)`, slopes, crossings, and lenient auto-adjustment mode (`strict=False`, `with mint.lenient():`).
|
|
81
|
+
- **7 surface themes & 6 CVD-tested palettes:** `mintfig`, `editorial`, `paper`, `bold`, `dark`, `mono`, `sketch`; `default`, `okabe_ito`, `tol`, `earth`, `ocean`, `berry`.
|
|
82
|
+
- **Zero-script CLI:** `mintfig inspect`, `mintfig plot`, `mintfig explain`, `mintfig edit`, `mintfig show`.
|
|
83
|
+
- **Publication plates & bundles (`mint.Plate`, `mintfig run --bundle`):** versioned specs for *Nature*, *Science*, *Science Advances*, *Cell*, PNAS, NeurIPS, and `screen`; 14-rule preflight QA; Tufte primitives (`direct_labels`, `range_frame`, `ghost_context`, `slopegraph`, `tufte_boxplot`, `sparkline`); CVD/grayscale proof sheets and reproducible bundles.
|
|
84
|
+
- **Bundled coding-agent skill installer:** `mintfig skill --install` supporting Claude Code, Antigravity, Cursor, Codex, `AGENTS.md`, and `CLAUDE.md`.
|