Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Adds test coverage and usage examples for the heart disease and loan payments datasets in the data directory.

Changes

Tests (__tests__/ava.test.ts)

  • New test suite for heart.csv with 4 tests covering age distribution, gender analysis, disease prevalence, and cholesterol levels
  • Follows existing pattern: parent beforeEach for AVA instance, nested beforeEach for CSV loading

Examples

  • examples/heart-disease-analysis.ts - Demonstrates queries for patient demographics and health metrics
  • examples/loan-payments-analysis.ts - Demonstrates queries for loan status, education levels, and borrower demographics
  • examples/companies-analysis.ts - Renamed from basic-usage.ts and updated header comment for naming consistency

All three examples follow a consistent naming pattern (<dataset>-analysis.ts) with 4 representative queries each.

// Example usage
const ava = new AVA({ llm: getLLMConfig() });
await ava.loadCSV('../data/heart.csv');
const result = await ava.analysis('What is the average age of patients?');
Original prompt
  1. 针对 data/heart.csv 数据,在 ava.test.ts 中添加一些合适的单测。
  2. 在 examples 中,增加对 data/heart.csv 和 data/loans_payments.csv 的示例。

保持代码简洁精炼。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…s.csv

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
@hustcc hustcc marked this pull request as ready for review January 30, 2026 04:32
Copilot AI and others added 2 commits January 30, 2026 04:33
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add unit tests for data/heart.csv in ava.test.ts Add unit tests and examples for heart.csv and loans_payments.csv datasets Jan 30, 2026
Copilot AI requested a review from hustcc January 30, 2026 04:36
@hustcc
Copy link
Member

hustcc commented Jan 30, 2026

@copilot examples/basic-usage.ts 改名 examples/companies-analysis.ts,保持统一。

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot examples/basic-usage.ts 改名 examples/companies-analysis.ts,保持统一。

Done. Renamed to companies-analysis.ts in commit 8b71edf.

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
@hustcc hustcc merged commit 3ccaf94 into ai Jan 30, 2026
@hustcc hustcc deleted the copilot/add-unit-tests-for-heart-csv branch January 30, 2026 04:52
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.

2 participants