Conversation
…ython api; updating config file to use gpt-4o-mini to be more consistent
There was a problem hiding this comment.
Code Review
This pull request refactors the test suite by centralizing environment variable loading and test skipping logic into a shared conftest.py file. It also updates the NER tests to directly utilize the StructSenseFlow application logic instead of the CLI runner, supported by a new extraction-only configuration file. The review feedback suggests improving the test fixtures by using the logging module instead of print and ensuring that the environment-loading fixture is explicitly invoked in the NER tests to prevent potential failures due to missing configuration.
There was a problem hiding this comment.
Pull request overview
This PR updates the test suite to centralize shared test utilities in conftest.py, migrate the NER test from invoking the CLI to calling the Python API directly, and align the NER test config to use gpt-4o-mini for consistency.
Changes:
- Added
src/tests/conftest.pywith shared env-loading fixture and an OpenRouter skip marker. - Updated
task_detection_test.pyto use the shared fixture/skip logic. - Reworked
ner_test.pyto runStructSenseFlowdirectly using a new extraction-only YAML config.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/tests/task_detection_test.py | Switched to shared env fixture and shared OpenRouter skip marker. |
| src/tests/ner_test.py | Migrated NER test from CLI invocation to direct StructSenseFlow API execution using YAML config. |
| src/tests/conftest.py | Introduced shared load_env fixture and skip_if_no_openrouter marker. |
| src/tests/configs/ner-config_extractonly.yaml | Added extraction-only test config using openrouter/openai/gpt-4o-mini. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## fix_json_op_issue #112 +/- ##
====================================================
Coverage ? 15.48%
====================================================
Files ? 28
Lines ? 6850
Branches ? 0
====================================================
Hits ? 1061
Misses ? 5789
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
conftest.pyfor shared functions;ner_testto use python api instead of cli;gpt-4o-minito be more consistent