High-level Client with Image Handling etc.#5
Merged
Merged
Conversation
97d7fbc to
52d4d06
Compare
- Implement async transformers for image resizing, compression, and classification input conversion - Add request batching middleware for ClassifyRequest streaming - Add tests for async transformers and batching logic - Update dependencies: add anyio, brotli, numpy, pytest-cov - Update .gitignore for .env files - Add coverage reporting to CI workflow - Document async pipeline and correlation ID TODOs in README
f694586 to
9136fb2
Compare
Coverage Report
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8d46b94 to
d8a2a0b
Compare
9a45508 to
55d73f4
Compare
* docs: add basic sphinx docs * docs: update docs
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a comprehensive async-enabled Athena client library for image classification, featuring OAuth authentication, image processing pipeline, and streaming capabilities. The implementation provides a high-level interface while maintaining extensibility through modular components.
Key changes include:
- OAuth credential helper with automatic token refresh and secure channel creation
- Async image processing pipeline with resizing, compression, and format conversion transformers
- Comprehensive test suite with mock utilities and enhanced CI/CD coverage reporting
Reviewed Changes
Copilot reviewed 65 out of 74 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/athena_client/client/athena_client.py |
Main client class with async context management and streaming classification |
src/athena_client/client/channel.py |
OAuth credential helper and secure channel creation utilities |
src/athena_client/client/transformers/ |
Modular async pipeline with image resizing, compression, and batching |
tests/ |
Comprehensive test coverage with mock utilities and timeout behavior tests |
examples/ |
Working examples demonstrating OAuth authentication and image processing |
docs/ |
Complete documentation with API reference, examples, and development guides |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
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.
This pull request introduces a new async-enabled Athena client library for image classification, including a modular pipeline for image preprocessing, compression, batching, and classification. It also adds example usage, developer documentation, and improves test coverage reporting. The changes are grouped below by theme.
Core Athena Client Implementation:
AthenaClientclass with async methods for image classification, supporting context management and error handling (src/athena_client/client/athena_client.py).AthenaOptionsdataclass for client configuration, including host, deployment, batching, and transformation options (src/athena_client/client/athena_options.py).src/athena_client/client/channel.py).src/athena_client/client/deployment_selector.py).src/athena_client/client/exceptions.py).Async Image Processing Pipeline:
src/athena_client/client/transformers/async_transfomer.py).src/athena_client/client/transformers/image_resizer.py).src/athena_client/client/transformers/brotli_compressor.py).src/athena_client/client/transformers/classification_input.py).src/athena_client/client/transformers/request_batcher.py).Documentation and Examples:
examples/example.py).README.mdwith TODOs for async pipelines and correlation ID strategies.src/athena_client/client/__init__.py,src/athena_client/client/transformers/__init__.py,tests/transformers/__init__.py) [1] [2] [3].Build and Test Improvements:
.github/workflows/build_and_test.yml).pytest-covto dev dependencies and updated Python dependencies for async/image processing (pyproject.toml).pyproject.toml).Constants and Utilities:
src/athena_client/client/consts.py).These changes collectively establish a robust, extensible async client for Athena image classification and lay the groundwork for future pipeline enhancements and developer usability.