|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -All notable changes to the nutrient-dws Python client library will be documented in this file. |
| 3 | +All notable changes to this project will be documented in this file. |
4 | 4 |
|
5 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
6 | 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
7 | 7 |
|
8 | | -## [1.0.1] - 2025-06-20 |
9 | | - |
10 | | -### Fixed |
11 | | - |
12 | | -#### Critical Bug Fixes |
13 | | -- **Documentation Error**: Fixed README.md to correctly use `NutrientTimeoutError` instead of `TimeoutError` in import examples and exception handling |
14 | | -- **Exception Naming**: Resolved inconsistency where code exported `NutrientTimeoutError` but documentation referenced `TimeoutError` |
15 | | - |
16 | | -#### CI/Testing Improvements |
17 | | -- **Test Collection**: Fixed pytest collection failures in CI environments with proper setuptools configuration |
18 | | -- **TOML Configuration**: Removed duplicate setuptools configuration that caused parsing errors during installation |
19 | | -- **Type Checking**: Resolved mypy errors across all modules with proper type annotations |
20 | | -- **Linting**: Fixed all ruff linting issues (W292, W293, RUF034, SIM115, B017, E501) |
21 | | -- **Test Dependencies**: Simplified test suite to remove problematic mock dependencies |
| 8 | +## [1.0.1] - 2024-06-20 |
22 | 9 |
|
23 | 10 | ### Added |
| 11 | +- 🎉 First stable release on PyPI |
| 12 | +- Comprehensive test suite with 94% coverage (154 tests) |
| 13 | +- Full support for Python 3.8 through 3.12 |
| 14 | +- Type hints for all public APIs |
| 15 | +- PyPI package publication |
24 | 16 |
|
25 | | -#### Testing Infrastructure |
26 | | -- **Comprehensive Unit Tests**: Added 31 unit tests covering all major components: |
27 | | - - HTTP client tests (5 tests) |
28 | | - - File handler tests (5 tests) |
29 | | - - Builder API tests (5 tests) |
30 | | - - Exception handling tests |
31 | | - - Client functionality tests |
32 | | -- **Integration Test Framework**: Added CI workflow for integration testing against live API |
33 | | - - Runs on all Python versions (3.8-3.12) |
34 | | - - Secure API key handling via GitHub secrets |
35 | | - - Automatic config cleanup after tests |
36 | | - - Basic smoke test for API connectivity |
37 | | - |
38 | | -#### Development Quality |
39 | | -- **Repository Setup**: Enhanced GitHub repository with proper badges, issue templates, and documentation |
40 | | -- **CI Pipeline**: Improved CI workflow with better error handling and debugging capabilities |
| 17 | +### Fixed |
| 18 | +- CI pipeline compatibility for all Python versions |
| 19 | +- Package metadata format for older setuptools versions |
| 20 | +- Type checking errors with mypy strict mode |
| 21 | +- File handler edge cases with BytesIO objects |
41 | 22 |
|
42 | 23 | ### Changed |
| 24 | +- Improved error messages for better debugging |
| 25 | +- Enhanced file handling with proper position restoration |
| 26 | +- Updated coverage from 92% to 94% |
43 | 27 |
|
44 | | -#### Internal Improvements |
45 | | -- **Error Handling**: Improved error messages and exception context throughout the codebase |
46 | | -- **Code Quality**: Applied consistent formatting and linting across all files |
47 | | -- **Type Safety**: Enhanced type annotations for better IDE support and static analysis |
48 | | - |
49 | | -### Technical Details |
50 | | -- All tests now pass on Python 3.8-3.12 |
51 | | -- CI pipeline is stable and reliable |
52 | | -- Integration tests provide continuous API validation |
53 | | -- Code coverage and quality metrics are consistently tracked |
54 | | - |
55 | | -## [1.0.0] - 2025-06-17 |
| 28 | +## [1.0.0] - 2024-06-19 |
56 | 29 |
|
57 | 30 | ### Added |
| 31 | +- Initial implementation of Direct API with 7 methods: |
| 32 | + - `convert_to_pdf` - Convert documents to PDF |
| 33 | + - `convert_from_pdf` - Convert PDFs to other formats |
| 34 | + - `ocr_pdf` - Perform OCR on PDFs |
| 35 | + - `watermark_pdf` - Add watermarks to PDFs |
| 36 | + - `flatten_annotations` - Flatten PDF annotations |
| 37 | + - `rotate_pages` - Rotate PDF pages |
| 38 | + - `merge_pdfs` - Merge multiple PDFs |
| 39 | +- Builder API for complex document workflows |
| 40 | +- Comprehensive error handling with custom exceptions |
| 41 | +- Automatic retry logic with exponential backoff |
| 42 | +- File streaming support for large documents |
| 43 | +- Full type hints and py.typed marker |
| 44 | +- Extensive documentation and examples |
| 45 | +- MIT License |
58 | 46 |
|
59 | | -#### Core Features |
60 | | -- **NutrientClient**: Main client class with support for both Direct API and Builder API patterns |
61 | | -- **Direct API Methods**: Convenient methods for single operations: |
62 | | - - `convert_to_pdf()` - Convert Office documents to PDF (uses implicit conversion) |
63 | | - - `flatten_annotations()` - Flatten PDF annotations and form fields |
64 | | - - `rotate_pages()` - Rotate specific or all pages |
65 | | - - `ocr_pdf()` - Apply OCR to make PDFs searchable |
66 | | - - `watermark_pdf()` - Add text or image watermarks |
67 | | - - `apply_redactions()` - Apply existing redaction annotations |
68 | | - - `merge_pdfs()` - Merge multiple PDFs and Office documents |
69 | | - |
70 | | -- **Builder API**: Fluent interface for chaining multiple operations: |
71 | | - ```python |
72 | | - client.build(input_file="document.docx") \ |
73 | | - .add_step("rotate-pages", {"degrees": 90}) \ |
74 | | - .add_step("ocr-pdf", {"language": "english"}) \ |
75 | | - .execute(output_path="processed.pdf") |
76 | | - ``` |
77 | | - |
78 | | -#### Infrastructure |
79 | | -- **HTTP Client**: |
80 | | - - Connection pooling for performance |
81 | | - - Automatic retry logic with exponential backoff |
82 | | - - Bearer token authentication |
83 | | - - Comprehensive error handling |
84 | | - |
85 | | -- **File Handling**: |
86 | | - - Support for multiple input types (paths, Path objects, bytes, file-like objects) |
87 | | - - Automatic streaming for large files (>10MB) |
88 | | - - Memory-efficient processing |
89 | | - |
90 | | -- **Exception Hierarchy**: |
91 | | - - `NutrientError` - Base exception |
92 | | - - `AuthenticationError` - API key issues |
93 | | - - `APIError` - General API errors with status codes |
94 | | - - `ValidationError` - Request validation failures |
95 | | - - `TimeoutError` - Request timeouts |
96 | | - - `FileProcessingError` - File operation failures |
97 | | - |
98 | | -#### Development Tools |
99 | | -- **Testing**: 82 unit tests with 92.46% code coverage |
100 | | -- **Type Safety**: Full mypy type checking support |
101 | | -- **Linting**: Configured with ruff |
102 | | -- **Pre-commit Hooks**: Automated code quality checks |
103 | | -- **CI/CD**: GitHub Actions for testing, linting, and releases |
104 | | -- **Documentation**: Comprehensive README with examples |
105 | | - |
106 | | -### Changed |
107 | | -- Package name updated from `nutrient` to `nutrient-dws` for PyPI |
108 | | -- Source directory renamed from `src/nutrient` to `src/nutrient_dws` |
109 | | -- API endpoint updated to https://api.pspdfkit.com |
110 | | -- Authentication changed from X-Api-Key header to Bearer token |
111 | | - |
112 | | -### Discovered |
113 | | -- **Implicit Document Conversion**: The API automatically converts Office documents (DOCX, XLSX, PPTX) to PDF when processing, eliminating the need for explicit conversion steps |
114 | | - |
115 | | -### Fixed |
116 | | -- Watermark operation now correctly requires width/height parameters |
117 | | -- OCR language codes properly mapped (e.g., "en" → "english") |
118 | | -- All API operations updated to use the Build API endpoint |
119 | | -- Type annotations corrected throughout the codebase |
120 | | - |
121 | | -### Security |
122 | | -- API keys are never logged or exposed |
123 | | -- Support for environment variable configuration |
124 | | -- Secure handling of authentication tokens |
| 47 | +### Technical Details |
| 48 | +- Built on `requests` library (only dependency) |
| 49 | +- Supports file inputs as paths, bytes, or file-like objects |
| 50 | +- Memory-efficient processing with streaming |
| 51 | +- Connection pooling for better performance |
125 | 52 |
|
126 | | -[1.0.0]: https://github.com/jdrhyne/nutrient-dws-client-python/releases/tag/v1.0.0 |
| 53 | +[1.0.1]: https://github.com/PSPDFKit/nutrient-dws-client-python/compare/v1.0.0...v1.0.1 |
| 54 | +[1.0.0]: https://github.com/PSPDFKit/nutrient-dws-client-python/releases/tag/v1.0.0 |
0 commit comments