-
Notifications
You must be signed in to change notification settings - Fork 99
feat: frequency add TOON format
#3206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds TOON format support to the frequency command. TOON is a compact, human-readable encoding of the JSON data model designed for LLM prompts (see https://toonformat.dev). The implementation follows the existing pattern used for JSON and pretty-JSON output modes.
Key Changes:
- Added
--toonflag to output frequency distributions in TOON format - TOON output includes the same rich metadata as JSON (row count, field count, data type, cardinality, etc.)
- The
--no-statsflag now applies to both JSON and TOON output modes
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cmd/frequency.rs | Added --toon flag, TOON encoding logic, and extended JSON output path to handle TOON format with proper empty stats filtering |
| tests/test_frequency.rs | Added comprehensive test coverage including basic TOON output, no-headers mode, ignore-case, limit handling, all-unique columns, and whitespace visualization |
| src/cmd/schema.rs | Updated to include flag_toon: false in frequency args structure for schema command |
| README.md | Updated documentation to reference TOON format examples and capabilities |
| scripts/nyc311-1m.freqs.toon | Added example TOON output file demonstrating the format with real-world data (1M row NYC 311 dataset) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…n to other file formats as suggested by GH Copilot review
No description provided.