Skip to content

Expand test suite to 147 tests (93% coverage), fix agent bugs, add cookbook#7

Merged
rrahimi-uci merged 1 commit into
mainfrom
expand-test-suite-and-agent-fixes
Jul 1, 2026
Merged

Expand test suite to 147 tests (93% coverage), fix agent bugs, add cookbook#7
rrahimi-uci merged 1 commit into
mainfrom
expand-test-suite-and-agent-fixes

Conversation

@rrahimi-uci

Copy link
Copy Markdown
Owner

Summary

Expands the test suite from 31 → 147 tests at ~93% branch coverage, fixes two real agent bugs surfaced by the new tests, wires coverage + Allure into CI, and adds a library-usage cookbook.

Testing & CI

  • +116 tests across 6 new files: base-agent JSON-RPC error paths, config defaults, extended math / data-analyst / orchestrator behaviour, and the simple client + hybrid demo.
  • Tests annotated with @allure.feature/story/title so an Allure report reads as living behaviour docs.
  • CI runs pytest --cov with a 90% coverage gate and uploads Allure results as an artifact.
  • Added pytest-cov + allure-pytest dev deps and [tool.coverage.*] config.

Bug fixes

  • math_agent._extract_matrices: previously treated every [...] as a separate single-row matrix, so [[1,2],[3,4]] parsed wrong. Now groups rows into full 2D matrices. Also adds determinant handling and negative-number support in matrix/array parsing.
  • data_analyst_agent: emits "N/A" for undefined skewness/kurtosis on tiny samples (was printing nan); supports negative numbers in array/tuple parsing; drops unused imports (seaborn, io, base64, tempfile).

Docs / misc

  • examples/simple_hybrid_demo.py: works both as a script and as an imported package module.
  • README badges updated (147 tests, 93% coverage) + coverage/Allure instructions.
  • New COOKBOOK.md with copy-pasteable library recipes; allure-results/ gitignored.

Verification

  • pytest --cov147 passed, 93.37% coverage (gate 90%) locally on Python 3.14.
  • All changed modules import cleanly; no dangling references to removed imports.
  • Hybrid demo runs end-to-end in both import modes.

🤖 Generated with Claude Code

…okbook

Testing & CI:
- Add 116 new tests across 6 files (base-agent errors, config, extended
  math/data-analyst/orchestrator behaviour, simple client + hybrid demo),
  bringing the suite to 147 tests at ~93% branch coverage.
- Annotate tests with Allure feature/story/title metadata.
- CI now runs pytest with coverage (90% gate) and uploads Allure results.
- Add pytest-cov + allure-pytest dev deps and coverage config in pyproject.

Bug fixes:
- math_agent: _extract_matrices now groups rows into full 2D matrices instead
  of treating each [...] as a separate single-row matrix; add determinant
  handling; support negative numbers in array/matrix parsing.
- data_analyst_agent: show "N/A" for undefined skewness/kurtosis on tiny
  samples (was emitting nan); support negative numbers in array/tuple parsing;
  drop unused imports (seaborn, io, base64, tempfile).

Other:
- examples/simple_hybrid_demo: support both script and package import modes.
- README: update badges (147 tests, 93% coverage), document coverage + Allure.
- Add COOKBOOK.md with library-usage recipes; ignore allure output dirs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@rrahimi-uci rrahimi-uci left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Ship it

@rrahimi-uci
rrahimi-uci merged commit c7715e0 into main Jul 1, 2026
4 checks passed
@rrahimi-uci
rrahimi-uci deleted the expand-test-suite-and-agent-fixes branch July 1, 2026 21:46
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.

1 participant