Skip to content

Conversation

@jdrhyne
Copy link
Collaborator

@jdrhyne jdrhyne commented Jan 13, 2026

Summary

This PR verifies and improves the implementation of three quick-win features that were already implemented in the recent refactoring:

1. Image Watermark Support (Issue #11)

  • ✅ Already supports FileInput (str, Path, bytes, file-like, URL)
  • 📝 Improved docstring with comprehensive examples
  • 🧪 Added unit tests for bytes and Path inputs

2. Multi-Language OCR Support (Issue #10)

  • ✅ Already supports List[OcrLanguage] for multiple languages
  • 📝 Improved docstring with multi-language examples
  • 🧪 Added unit tests for three languages and ISO codes

3. Selective Annotation Flattening (Issue #12)

  • ✅ Already supports annotation_ids parameter (str or int)
  • 📝 Improved docstring with examples for string, int, and mixed IDs
  • 🧪 Added comprehensive unit tests for all ID types

Changes

  • src/nutrient_dws/client.py: Enhanced docstrings for flatten(), ocr(), and watermark_image()
  • tests/unit/test_client.py: Added 8 new unit tests for these features

Testing

All 257 unit tests passing.

Backward Compatibility

All changes maintain full backward compatibility with existing API.

This PR verifies and improves the implementation of three quick-win features
that were already implemented in the recent refactoring:

1. Image Watermark Support (Issue #11)
   - Already supports FileInput (str, Path, bytes, file-like, URL)
   - Improved docstring with comprehensive examples
   - Added unit tests for bytes and Path inputs

2. Multi-Language OCR Support (Issue #10)
   - Already supports List[OcrLanguage] for multiple languages
   - Improved docstring with multi-language examples
   - Added unit tests for three languages and ISO codes

3. Selective Annotation Flattening (Issue #12)
   - Already supports annotation_ids parameter (str or int)
   - Improved docstring with examples for string, int, and mixed IDs
   - Added comprehensive unit tests for all ID types

All features maintain backward compatibility.
257 unit tests passing.
@jdrhyne jdrhyne requested a review from HungKNguyen January 13, 2026 05:13
@jdrhyne jdrhyne self-assigned this Jan 13, 2026
@jdrhyne jdrhyne marked this pull request as ready for review January 13, 2026 05:15
Copy link
Collaborator

@HungKNguyen HungKNguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, all test are passing and documentation additions make sense

@jdrhyne jdrhyne merged commit 9099f93 into main Jan 13, 2026
17 checks passed
@jdrhyne jdrhyne deleted the feat/quick-win-improvements branch January 13, 2026 05:37
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.

3 participants