Skip to content

Remove desktop app — skill-only figure extraction - #1

Merged
shaowen-ye merged 4 commits into
mainfrom
chore/remove-app
Jul 7, 2026
Merged

Remove desktop app — skill-only figure extraction#1
shaowen-ye merged 4 commits into
mainfrom
chore/remove-app

Conversation

@shaowen-ye

Copy link
Copy Markdown
Owner

Removes app/ (recoverable at tag app-v0.2.0), collapses CI to a single skill test+self-test job, trims .gitignore. Part of the pivot to a lean agentic figure-extraction skill.

🤖 Generated with Claude Code

YE Shaowen and others added 4 commits July 7, 2026 08:47
…igitizing

Adds the bridge from a professional-literature PDF to the figures inside it, so the
skill can extract data from charts in papers, not just standalone images:

- pdf.py: PdfDocument (pypdfium2 render, bitmap-figure detection, high-res crop,
  caption harvesting to label figures) + scan_figures() → crops every figure to PNG
  and writes a small manifest.json. Vector-drawn charts (no bitmap) surface under
  vector_pages with a full-page render to crop visually. pypdfium2 is optional and
  lazy-loaded, so the package still imports with only cv2+numpy.
- export.py: export_figures() gathers several figures' extracted CSVs into one
  multi-sheet Excel workbook + a provenance sheet (CSV stays the primary output).
- CLI: pdf-figures, pdf-page, xlsx subcommands; self-test reports the optional dep.
- tests: test_pdf / test_export (51 pass); sample PDF + scatter assets.

Scope is deliberately figures-only: no table extraction, no text mining. The Python
API is purely additive and backward-compatible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… calibration

Shrinks the manual work in digitizing a figure: the engine finds the geometry, Claude
supplies only the semantics it reads by vision.

- detect_ticks(): locate tick-mark pixel positions along each axis (spine-aware — ticks
  are the runs protruding beyond the axis line; longest-stroke group on a bare border,
  which also drops log/minor ticks). Reports spacing_cv as a confidence signal; returns
  None when a chart has no tick marks so the caller falls back to the grid overlay.
  Validated on synthetic linear (6/6 within 0.9px) and log-y (4/4 decades) charts.
- suggest_series(): dominant colors + connected-component geometry to ready-to-use HSV
  targets tagged markers/line/region (fill-ratio + size + span heuristics), with
  near-identical k-means clusters merged so each real series appears once.
- draw_geometry_overlay() + a "geometry" CLI command: one call emits the geometry JSON
  and an annotated PNG for Claude to eyeball before calibrating.
- self-test now also asserts tick recovery.

detect_ticks is best-effort by contract: precise on charts with real ticks, silent
(None) otherwise — never silently wrong. 56 tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The desktop app demanded too much manual operation for what Claude Code already does
natively (read a figure, reason, converse). FigDataX is now a single agentic skill: the
engine measures geometry, Claude supplies the semantics. The app source stays fully
recoverable at tag app-v0.2.0 (git checkout app-v0.2.0 -- app/).

- Remove app/ (PySide6 GUI, py2app packaging, AI provider layer).
- CI collapses to one job: skill pytest + self-test; trigger on skill-v* tags.
- .gitignore drops the app-specific venv/build/dmg entries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… image

The user crops/screenshots figures from papers themselves (single or multiple images);
the skill's job is precise extraction from those images. Removes pdf.py, the
pdf-figures/pdf-page CLI commands, the pypdfium2 dependency, and their tests.
Excel export (xlsx command, export_figures) stays — it gathers per-figure CSVs into
one workbook regardless of where the images came from.

Also fixes a detect_ticks UnboundLocalError on spine-style axes that CI caught
(stroke_len now computed in both regimes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shaowen-ye
shaowen-ye merged commit 09cf8a7 into main Jul 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant