Skip to content

Robustness fixes: logging, dependency, packaging, chart batching - #7

Merged
npogeant merged 5 commits into
mainfrom
improve/logging-deps-chart-batching
Jul 24, 2026
Merged

Robustness fixes: logging, dependency, packaging, chart batching#7
npogeant merged 5 commits into
mainfrom
improve/logging-deps-chart-batching

Conversation

@npogeant

Copy link
Copy Markdown
Owner

Summary

  • Replace internal diagnostic print() calls with the logging module across content extraction, formatters, updaters, and elements. The intentional user-facing display output (SlidePrinter/TablePrinter, used by list_content()/show_data()) is untouched — those are meant to print.
  • Declare Pillow as an explicit dependency: adders/image_adder.py imports PIL directly, but it was only ever satisfied transitively through python-pptx. Pinning it directly avoids a future break if that transitive dependency ever changes.
  • Add a py.typed marker (and the package-data entry needed to ship it in the wheel) so downstream consumers' type checkers actually pick up this package's type hints. Verified the built wheel includes it.
  • Batch chart updates: Deck.update_chart previously called chart.update_series() per series (each doing a full replace_data) and then chart.save_changes() again — N+1 full chart XML rewrites for N series. Added DeckChart.update() to merge categories/series and apply once; Deck.update_chart now uses it. update_series/update_categories are unchanged for direct/individual use.
  • De-duplicate remove_text/remove_chart/remove_table in DeckSlide, which were copy-pasted apart from the getter and error label, into one _remove_element helper. Error messages are unchanged.

No version bump — this is not a release yet.

Test plan

  • pytest -q — 33 passed
  • mypy --ignore-missing-imports src/deckflow — no issues
  • Built the wheel and confirmed py.typed and the Pillow requirement are present in the artifact

@npogeant
npogeant merged commit 4c75d25 into main Jul 24, 2026
5 checks passed
@npogeant
npogeant deleted the improve/logging-deps-chart-batching branch July 24, 2026 13:57
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