-
Notifications
You must be signed in to change notification settings - Fork 0
feat: integrate fork features with comprehensive Direct API methods a… #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 tasks
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.
…nd tests ## New Direct API Methods (Python 3.8 compatible) - `split_pdf()` - Split PDFs into multiple documents by page ranges - `duplicate_pdf_pages()` - Duplicate specific pages within a PDF - `delete_pdf_pages()` - Remove specific pages from a PDF - `add_page()` - Insert blank pages into PDFs - `set_page_label()` - Apply custom labels to page ranges ## Comprehensive Integration Test Suite - Added complete integration tests for all existing methods - Added comprehensive tests for all new methods - Tests cover both bytes return and file output scenarios - Proper error handling and edge case testing - Python 3.8+ compatible type hints throughout ## Quality Assurance - All methods maintain Python 3.8+ compatibility - Full type checking with mypy - Comprehensive linting with ruff - Detailed docstrings with examples - Consistent error handling patterns This integration successfully adopts the excellent fork functionality while maintaining our quality standards and compatibility requirements.
- Fixed formatting in tests/integration/test_direct_api_integration.py - Maintains consistency with project formatting standards - All 154 unit tests pass after rebase on main Resolves formatting issues after rebasing on latest main branch.
835a51d to
1e78280
Compare
Critical Fixes: - Fixed duplicate_pdf_pages page indexing bug (exclusive end for positive indexes) - Fixed split_pdf to require page_ranges parameter (removed misleading default) - Added resource limits: max 50 ranges for split_pdf, max 100 pages for add_page Documentation Improvements: - Clarified 0-based indexing in all method docstrings - Added explicit examples showing index behavior - Documented that negative indexes are NOT supported in delete_pdf_pages - Updated split_pdf examples to show required page_ranges Test Updates: - Updated split_pdf tests to match new required parameter behavior - Added test for maximum page ranges validation - Added test for maximum page count in add_page - Removed test for non-existent default behavior These fixes ensure the API works correctly with the Nutrient DWS backend and prevents common user errors through clear documentation and validation.
- Fixed trailing whitespace in docstrings - Fixed blank lines containing whitespace - Fixed line length exceeding 100 characters - All ruff checks now passing This should resolve CI failures.
This was referenced Jun 22, 2025
msch-nutrient
added a commit
that referenced
this pull request
Jun 23, 2025
- Add 3 integration tests covering DOCX to PDF conversion - Add sample.docx test file for Office document testing - Test conversion to bytes, saving to file, and PDF passthrough - All tests verify output is valid PDF format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…nd tests
New Direct API Methods (Python 3.8 compatible)
split_pdf()- Split PDFs into multiple documents by page rangesduplicate_pdf_pages()- Duplicate specific pages within a PDFdelete_pdf_pages()- Remove specific pages from a PDFadd_page()- Insert blank pages into PDFsset_page_label()- Apply custom labels to page rangesComprehensive Integration Test Suite
Quality Assurance
This integration successfully adopts the excellent fork functionality while maintaining our quality standards and compatibility requirements.