feat(cli): add Kaggle dataset integration and Croissant metadata parsing#11
Open
closestfriend wants to merge 1 commit intoScrapeGraphAI:mainfrom
Open
feat(cli): add Kaggle dataset integration and Croissant metadata parsing#11closestfriend wants to merge 1 commit intoScrapeGraphAI:mainfrom
closestfriend wants to merge 1 commit intoScrapeGraphAI:mainfrom
Conversation
Add new --kaggle and --croissant CLI flags for streamlined dataset workflows: - `toon username/dataset --kaggle` downloads and converts Kaggle datasets to TOON - `toon metadata.json --croissant` parses ML Commons Croissant metadata - `--file` flag to select specific files from multi-file datasets - Auto-detection of Kaggle slugs (username/dataset-name format) New module toon/kaggle.py provides: - download_dataset(): Download Kaggle datasets via kaggle CLI - find_best_csv(): Heuristic selection of main data file - csv_to_records(): CSV to list[dict] conversion - parse_croissant(): Extract schema from Croissant JSON-LD - croissant_to_summary(): Generate human-readable dataset summaries All functions are optional imports - gracefully degrades if kaggle package is not installed. Includes comprehensive test suite (12 tests, 100% pass).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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