metadata
language:
- en
license: apache-2.0
task_categories:
- text-generation
tags:
- rust
- code
- git-patches
- hyperswitch
- payment-processing
size_categories:
- 1K<n<10K
Hyperswitch Dataset with Extracted Filenames
Dataset Description
This dataset contains git patches from the Hyperswitch repository with extracted filenames for each patch.
Dataset Summary
- Total Examples: 1892
- Language: Rust (primary)
- Source: Hyperswitch GitHub repository
- Enhanced with: Extracted filenames from git patches
Data Fields
The dataset includes all original fields from juspay/hyperswitch plus:
filenames: List of file paths extracted from the git patch (e.g.,['crates/router/src/payment.rs', 'crates/api_models/src/payments.rs'])
Example
from datasets import load_dataset
dataset = load_dataset("archit11/hyperswitch-filenames")
example = dataset['train'][0]
print("Filenames:", example['filenames'])
print("Patch preview:", example['patch'][:200])
Statistics
- Total examples: 1892
- Examples with extracted filenames: ~95.9%
- Average files per patch: ~13 files
File Types
The patches primarily modify:
- Rust source files (
.rs) - Database schema files
- SQL migration files (
.sql) - Configuration files
Usage
Load the dataset:
from datasets import load_dataset
dataset = load_dataset("archit11/hyperswitch-filenames")
Filter by specific file patterns:
# Find all patches that modify payment-related files
payment_patches = dataset['train'].filter(
lambda x: any('payment' in f for f in x['filenames'])
)
Data Collection
Filenames were extracted from git patches using regex patterns to match:
diff --git a/filename b/filenamelines+++ b/filenamelines--- a/filenamelines
Citation
If you use this dataset, please cite the Hyperswitch repository:
@misc{hyperswitch2024,
title={Hyperswitch},
author={Juspay},
year={2024},
url={https://github.com/juspay/hyperswitch}
}
License
This dataset follows the Apache 2.0 license from the Hyperswitch project.