feat(cli): add Kaggle dataset integration and Croissant metadata parsing #11
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.
Description
Add Kaggle dataset integration and Croissant (ML Commons) metadata parsing to streamline dataset-to-TOON workflows. This enables users to download Kaggle datasets and convert them to TOON format in a single command.
Features
New CLI flags:
--kaggle- Treat input as Kaggle dataset slug--croissant- Parse input as Croissant JSON-LD metadata--file / -f- Select specific file from multi-file datasetsUsage examples:
New Python API:
Implementation
New module
toon/kaggle.pyprovides:download_dataset()- Download Kaggle datasets via kaggle CLIfind_best_csv()- Heuristic selection of main data filecsv_to_records()- CSV to list[dict] conversionparse_croissant()- Extract schema from Croissant JSON-LDcroissant_to_summary()- Generate human-readable summariesis_kaggle_slug()- Detect Kaggle dataset slug formatAll imports are optional - gracefully degrades if
kagglepackage is not installed.Type of Change
Testing
Checklist