Skip to content

Enhance PPTX composition with graph support and template flexibility#12

Merged
kut merged 15 commits intomainfrom
develop
Oct 23, 2025
Merged

Enhance PPTX composition with graph support and template flexibility#12
kut merged 15 commits intomainfrom
develop

Conversation

@kut
Copy link
Copy Markdown
Member

@kut kut commented Oct 23, 2025

Introduce an approach for composing PPTX presentations that integrates graph functionality directly into the compose_pptx function. Allow usage without template files, providing default layouts. Improve documentation and tests to reflect these changes, ensuring all tests pass successfully. Address issues with pixel-to-inch conversion and automatic scaling for large graphs.

Copilot AI and others added 15 commits October 21, 2025 20:54
Co-authored-by: kut <5658236+kut@users.noreply.github.com>
Co-authored-by: kut <5658236+kut@users.noreply.github.com>
Graph slides are now specified as part of slide_specs in compose_pptx by including a 'graph' key, rather than using a separate compose_graphs_pptx function. This allows graphs to be mixed with regular slides and uses a more consistent interface.

Changes:
- Moved graph helper functions from graphs.py to compose.py
- Updated compose_pptx to handle 'graph' key in slide specs
- Removed separate compose_graphs_pptx function and graphs.py module
- Updated all tests to use new interface (24 tests passing)
- Updated README and examples to reflect new usage
- All 225 tests passing

Co-authored-by: kut <5658236+kut@users.noreply.github.com>
Refactored graph-related functions from compose.py into a new graph_processing.py module for better modularity and cleanliness. The process_graph_slide function and its helper functions are now in their own dedicated module.

Changes:
- Created office_templates/office_renderer/pptx/graph_processing.py
- Moved process_graph_slide and helper functions to new module
- Updated compose.py to import from graph_processing
- Simplified compose.py by removing 286 lines of graph code
- All 225 tests passing

Co-authored-by: kut <5658236+kut@users.noreply.github.com>
Add node/edge graph generation functionality for PPTX presentations
- Modified compose_pptx to accept None or empty list for template_files
- Updated build_layout_mapping to return default layouts when no templates provided
- Added comprehensive tests for blank presentation composition
- Updated existing tests that expected error on empty template_files
- All 229 tests pass successfully

Co-authored-by: kut <5658236+kut@users.noreply.github.com>
- Added "Composing Presentations" section to README
- Documented how to use compose_pptx without template files
- Listed all available default layouts
- Provided example code for the new functionality

Co-authored-by: kut <5658236+kut@users.noreply.github.com>
Co-authored-by: kut <5658236+kut@users.noreply.github.com>
…mits

Co-authored-by: kut <5658236+kut@users.noreply.github.com>
Fix pixel-to-inch conversion and add automatic scaling for graph node positions
@kut kut merged commit 10e3e43 into main Oct 23, 2025
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.

2 participants