Add GitHub repository seed reader plugin#4
Open
eric-tramel wants to merge 3 commits intomainfrom
Open
Conversation
This reverts commit ebf47e1.
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.
What
Adds
data-designer-github, a new Data Designer seed-reader plugin that turns GitHub and local git repositories into seed datasets. The plugin registers agithubseed source and emits one row per selected repository file with repository metadata, path metadata, language hints, file size, content SHA-256, and hydrated file content.Why
Code repositories are a useful seed surface for Data Designer workflows: review, labeling, transformation, synthetic instruction generation, quality analysis, and repository-scale experimentation all start from the same need to reliably get source files into a tabular seed dataset.
The earlier ad hoc workflow cloned repositories and extracted narrow function-level examples. This plugin generalizes the useful part into reusable NDD tooling: read public GitHub repos or local git repos, preserve provenance, and let downstream Data Designer columns decide what to analyze, transform, filter, or synthesize.
Usage
Read files from a public GitHub repository:
Read local git repositories instead:
The emitted seed columns include:
repo_id,repo_url,commit_sha,source_kindrepository_path,source_path,relative_path,file_name,file_extensioncode_lang,size_bytes,content_sha256,contentHow
The implementation follows the existing Data Designer filesystem seed-reader architecture instead of building a separate ingestion path.
GitHubSeedSourceextendsFileSystemSeedSourceand registers through thedata_designer.pluginsentry point asPluginType.SEED_READER.GitHubSeedReaderprepares local repository roots during filesystem context creation, then lets the baseFileSystemSeedReadermachinery handle manifest sampling, batching, hydration, and schema validation.Important behavior:
owner/name,https://github.com/owner/name, or.gitURLs and clone into an attachment-scoped temporary directory.file_pattern, recursion, extension/name allowlists, exclude globs, max file size, and encoding.git clone --branch; commit SHA refs are checked out after clone.Validation
make allmake build-plugin PLUGIN=data-designer-githubpallets/markupsafe: cloned from GitHub, found 12 Python seed rows, and previewed 2 hydrated rows (bench.py,docs/conf.py).