Skip to content

Add headless Office I/O (Excel/Word/PowerPoint) as optional [office] extra#222

Merged
JE-Chen merged 2 commits into
devfrom
feat/office-batch
Jun 19, 2026
Merged

Add headless Office I/O (Excel/Word/PowerPoint) as optional [office] extra#222
JE-Chen merged 2 commits into
devfrom
feat/office-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 19, 2026

Copy link
Copy Markdown
Member

Round-2 backlog, batch 4 — headless read/write for Office documents, wired through all five layers (facade, AC_*, MCP, Script Builder) with tests + EN/Zh v14 docs + README sections.

Feature

  • Excelread_workbook / write_workbook (AC_read_workbook/AC_write_workbook, ac_*): .xlsx worksheet <-> row dicts (first row = keys).
  • Wordread_document / write_document: .docx paragraphs.
  • PowerPointread_presentation / write_presentation: per-slide text; slides as {title, body:[...]}.

Dependencies

  • Backing libs (openpyxl / python-docx / python-pptx) are an optional extra: pip install je_auto_control[office] (new [office] extra in pyproject). Each function raises a clear RuntimeError if its lib is missing.
  • import je_auto_control pulls none of them (lazy import inside each call) — verified PySide6-free and office-libs-not-eagerly-imported.
  • Added pinned versions to dev_requirements.txt so the CI matrix actually exercises the round-trips.

Verification

  • test/unit_test/headless/test_office_batch.py — 7 tests pass (round-trips guarded by importorskip; wiring/facade always run).
  • ruff clean; radon no CC≥C; bandit clean.

@codacy-production

codacy-production Bot commented Jun 19, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 66 complexity · 1 duplication

Metric Results
Complexity 66
Duplication 1

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 947e6d1 into dev Jun 19, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/office-batch branch June 19, 2026 02:46
@sonarqubecloud

Copy link
Copy Markdown

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