Skip to content

Conversation

@jdrhyne
Copy link
Collaborator

@jdrhyne jdrhyne commented Jun 25, 2025

No description provided.

jdrhyne added 13 commits June 24, 2025 22:27
Created detailed enhancement roadmap based on OpenAPI v1.9.0 analysis:

📋 Enhancement Plan:
- 13 proposed enhancements across 4 priority levels
- Detailed implementation specifications
- Testing requirements and use cases
- Recommended 4-phase implementation timeline

📁 GitHub Issue Templates:
- Individual issue template for each enhancement
- Consistent format with implementation details
- OpenAPI references and code examples
- Priority levels and labels

🎯 Goals:
- Increase API coverage from ~30% to ~80%
- Maintain backward compatibility
- Add most requested features
- Follow OpenAPI specification precisely

This provides a clear roadmap for community contributions and
systematic feature development.
Added three missing enhancement issue templates:
- #6 Extract Pages method (simpler alternative to split_pdf)
- #10 Convert to Office Formats (DOCX, XLSX, PPTX export)
- #13 Batch Processing (client-side bulk operations)

Reordered existing templates to maintain logical sequence.
All 13 enhancements now have corresponding issue templates.
- Prioritized list of 6 features to implement next
- Sprint planning with time estimates
- Clear rationale for implementation order
- Expected outcomes and API coverage improvements

This roadmap provides a clear path for the next 3 weeks of development.
- Add image_file parameter to watermark_pdf() for local image uploads
- Support path strings, bytes, or file-like objects as image input
- Update builder API to handle image file watermarks
- Add comprehensive unit and integration tests
- Update documentation with examples
- Maintain backward compatibility with text and URL watermarks

Closes #11
- Fix line length violations in test files
- Apply ruff formatting to maintain consistent code style
- Add type annotations to test helper functions
- Update error message assertions to avoid line length issues
The API was returning 500 errors when using 1x1 transparent PNGs for
watermarks. Updated create_test_image() to generate proper 100x100 RGB
images using PIL when available, with fallback to a 2x2 colored PNG.

This fixes all watermark image file integration tests.
- Replaced 2x2 PNG fallback with 50x50 red PNG (132 bytes) that works with the API
- Fixed import sorting issue in test_watermark_pdf_with_image_bytes
- Applied consistent formatting
- This ensures tests pass in CI where PIL/Pillow is not available

The API rejects very small PNG images (1x1 or 2x2) with 500 errors.
The CI was failing for Python 3.11 because mypy couldn't find type stubs
for the PIL (Pillow) library, which is imported in the integration tests.
Since PIL is only used optionally in integration tests (with a try/except
fallback), we add a mypy override to ignore missing imports for PIL modules.

This fixes the Python 3.11 CI failures while maintaining type safety for
the rest of the codebase.
This prevents mypy failures when optional dependencies like PIL are imported in tests
@jdrhyne jdrhyne merged commit 045aed0 into main Jun 25, 2025
8 checks 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.

2 participants