Develop#43
Merged
Merged
Conversation
* feat: Implement Core Data Models, Loader, and Strategies - Added `OptimizerConfig` for configuration. - Defined core interfaces (`Construct`, `LLMClient`, `Metric`, `PromptOptimizer`). - Implemented `TrainingExample` and `OptimizedManifest` data models. - Implemented `Dataset` loader for CSV and JSONL with splitting logic. - Implemented `RandomSelector` and `IdentityMutator` strategies. - Added comprehensive tests achieving high coverage. - Configured project dependencies and resolved `mypy` issues. 2a9f34a
* feat: implement Metric Adapter and standard metrics - Added `src/coreason_optimizer/core/metrics.py` with `ExactMatch`, `F1Score`, and `MetricFactory`. - Implemented text normalization logic (SQuAD style). - Added comprehensive tests in `tests/core/test_metrics.py`. - Satisfies AUC-4 of the implementation plan. 287bd97
* feat: implement BootstrapFewShot strategy - Add BootstrapFewShot class in `strategies/bootstrap.py` - Implement compilation loop for mining successful traces - Add comprehensive tests in `tests/strategies/test_bootstrap.py` - Ensure 100% test coverage including edge cases and logger initialization * feat: implement BootstrapFewShot strategy - Add BootstrapFewShot class in `strategies/bootstrap.py` - Implement compilation loop for mining successful traces - Add comprehensive tests in `tests/strategies/test_bootstrap.py` - Add complex scenario tests in `tests/strategies/test_bootstrap_complex.py` - Ensure 100% test coverage including edge cases and logger initialization 7659b26
) - Create professional README.md with required badges and content - Generate requirements.txt - Update docstrings for all python files to Google Style Guide - Ensure code passes ruff format/check and pre-commit hooks 504589a
…ecks (#33) (#34) - Add `docs/product_requirements.md` with PRD content. - Update `README.md` with project details, badges, and usage examples. - Generate `requirements.txt` based on source code analysis. - Add Google-style docstrings to all public modules and classes. - Ensure code quality with `ruff` and `pre-commit`.
* Refactor Core Logic to Async-Native with Sync Facade - Updated `pyproject.toml` with `anyio`, `httpx`, `aiofiles`. - Refactored `src/coreason_optimizer/core/client.py`: - Created `OpenAIClientAsync` and `OpenAIEmbeddingClientAsync` as Async-Native cores. - Created `OpenAIClient` and `OpenAIEmbeddingClient` as Sync Facades using `anyio.run`. - Updated BudgetAware wrappers to be compatible (async wrappers created, sync wrappers preserved). - Updated `src/coreason_optimizer/core/interfaces.py` to include Async protocols. - Updated tests in `tests/core/test_client.py` and `tests/core/test_client_embedding.py` to verify both Async and Sync behavior using `AsyncMock` and `pytest-asyncio`. - Verified no `threading.local` usage. - Ensured strict lifecycle management with `__aenter__` and `__enter__`. * Fix poetry.lock and Refactor Core Logic - Ran `poetry lock` to synchronize `poetry.lock` with `pyproject.toml` changes (added `anyio`, `httpx`, `aiofiles`). - Refactored `src/coreason_optimizer/core/client.py`: - Created `OpenAIClientAsync` and `OpenAIEmbeddingClientAsync` as Async-Native cores. - Created `OpenAIClient` and `OpenAIEmbeddingClient` as Sync Facades using `anyio.run`. - Updated BudgetAware wrappers to be compatible (async wrappers created, sync wrappers preserved). - Updated `src/coreason_optimizer/core/interfaces.py` to include Async protocols. - Updated tests in `tests/core/test_client.py` and `tests/core/test_client_embedding.py` to verify both Async and Sync behavior. * Fix CI issues and Async Mocking - Added `pytest-asyncio` to `pyproject.toml` dev dependencies and regenerated `poetry.lock`. - Updated `tests/core/test_client_edge_cases.py` to use `AsyncMock` for `OpenAIClient` (which uses `AsyncOpenAI` internally) and support async/await patterns properly. - Updated `tests/test_readme_usage.py` to patch `AsyncOpenAI` instead of `OpenAI` and properly mock async responses. - Verified local tests pass with `pytest-asyncio` mode auto. 93770a1
* Fix merge conflicts and pre-commit errors Resolves merge conflicts in: - src/coreason_optimizer/core/config.py - src/coreason_optimizer/core/metrics.py - src/coreason_optimizer/main.py - src/coreason_optimizer/strategies/bootstrap.py - src/coreason_optimizer/strategies/mutator.py - src/coreason_optimizer/strategies/selector.py Added missing fields to OptimizerConfig and created src/coreason_optimizer/utils/exceptions.py to fix imports. Updated tests to match API changes and removed obsolete test_main.py. Fixes mypy errors and pre-commit hooks. 9e3111c
Tempdevelop
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
No description provided.