Update README.md
Browse files
README.md
CHANGED
|
@@ -23,12 +23,135 @@ configs:
|
|
| 23 |
|
| 24 |
# Enterprise API Breaking Changes & SDK Migration Diffs (Community Edition)
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
-
- **Preview / Community Edition (250 traces)**: Publicly accessible under CC BY-NC 4.0 for non-commercial research and evaluation.
|
| 30 |
-
- **Enterprise Commercial Package (2,500 traces)**: Complete migration traces with full test suites and commercial training rights.
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# Enterprise API Breaking Changes & SDK Migration Diffs (Community Edition)
|
| 25 |
|
| 26 |
+
<p align="center">
|
| 27 |
+
<img src="./dataset_product_cover_1024.png" alt="Dataset Banner" width="700">
|
| 28 |
+
</p>
|
| 29 |
|
| 30 |
+
A curated dataset of breaking changes, compiler/runtime diagnostics, unified codemod patch diffs, and verification suites covering **Python, TypeScript/JavaScript, and Go**. Specifically engineered for training automated code repair models, AST codemod engines, DevSecOps agents, and software migration copilots.
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
Each record represents an end-to-end migration lifecycle:
|
| 33 |
+
$$\text{Deprecated Code} \longrightarrow \text{Compiler/Runtime Error} \longrightarrow \text{Architectural Reasoning} \longrightarrow \text{Unified Codemod Diff} \longrightarrow \text{Verification Test}$$
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## Dataset Splits & Commercial Licensing
|
| 38 |
+
|
| 39 |
+
| Split | Records | Format | Primary Use Case | License |
|
| 40 |
+
| :--- | :--- | :--- | :--- | :--- |
|
| 41 |
+
| **Community Evaluation** (This Repo) | 250 | Parquet | Benchmarking, zero-shot evaluation, academic research | **CC BY-NC 4.0** |
|
| 42 |
+
| **Enterprise Commercial Corpus** | 2,500 | Parquet + JSONL | Full fine-tuning (SFT/LoRA/DPO), proprietary copilot integration | **Commercial Enterprise License** |
|
| 43 |
+
|
| 44 |
+
### Complete Enterprise Package (2,500 Records)
|
| 45 |
+
For commercial model fine-tuning, automated pull-request bot deployment, or integrating AST refactoring tools without non-commercial restrictions:
|
| 46 |
+
|
| 47 |
+
👉 **[Purchase Enterprise Commercial License via Dodo Payments](https://checkout.dodopayments.com/buy/pdt_YOUR_DODO_PRODUCT_ID)**
|
| 48 |
+
|
| 49 |
+
* **Instant Automated Delivery:** Immediate access to `enterprise_api_migrations_2500.parquet` and `.jsonl`.
|
| 50 |
+
* **Perpetual Commercial Grant:** Complete indemnity for model training, weights redistribution, and commercial SaaS deployment.
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
## Dataset Schema
|
| 55 |
+
|
| 56 |
+
Each entry contains 9 structured fields:
|
| 57 |
+
|
| 58 |
+
```json
|
| 59 |
+
{
|
| 60 |
+
"migration_id": "MIG-2026-SQLALCHEMY-9112",
|
| 61 |
+
"ecosystem": "Python",
|
| 62 |
+
"package_name": "sqlalchemy",
|
| 63 |
+
"breaking_version_transition": "1.4.x -> 2.0.x",
|
| 64 |
+
"deprecated_code_snippet": "from sqlalchemy import Column, Integer, String\n\nclass User(Base):\n __tablename__ = 'users'\n id = Column(Integer, primary_key=True)\n name = Column(String)",
|
| 65 |
+
"runtime_error_or_warning": "DeprecationWarning: The Column class is deprecated and will be removed in a future version. Use mapped_column instead.",
|
| 66 |
+
"migration_reasoning": "The upstream API broke due to the deprecation of the Column class in favor of mapped_column. To migrate, replace all instances of Column with mapped_column and update type annotations to use Mapped.",
|
| 67 |
+
"codemod_patch_diff": "--- a/sqlalchemy_model.py\n+++ b/sqlalchemy_model.py\n@@ -1,7 +1,7 @@\n from sqlalchemy import mapped_column, Mapped, Integer, String\n-class User(Base):\n- __tablename__ = 'users'\n- id = Column(Integer, primary_key=True)\n- name = Column(String)\n+class User(Base):\n+ __tablename__ = 'users'\n+ id: Mapped[int] = mapped_column(Integer, primary_key=True)\n+ name: Mapped[str] = mapped_column(String)",
|
| 68 |
+
"verification_test": "import pytest\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy_model import Base, User\n\ndef test_migrated_model():\n engine = create_engine('sqlite:///:memory:')\n Base.metadata.create_all(engine)\n Session = sessionmaker(bind=engine)\n session = Session()\n user = User(name='John Doe')\n session.add(user)\n session.commit()\n assert session.query(User).first().name == 'John Doe'"
|
| 69 |
+
}
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
### Field Definitions
|
| 73 |
+
|
| 74 |
+
| Field | Type | Description |
|
| 75 |
+
| :--- | :--- | :--- |
|
| 76 |
+
| `migration_id` | `string` | Unique tracking identifier for the migration trace (e.g., `MIG-2026-NEXT-4174`). |
|
| 77 |
+
| `ecosystem` | `string` | Primary runtime ecosystem and programming language (`Python`, `TypeScript`, `Go`). |
|
| 78 |
+
| `package_name` | `string` | Specific upstream library, framework, or runtime undergoing migration (e.g., `next`, `react`, `sqlalchemy`, `pydantic`, `gin`, `vite`, `aws-sdk-go-v2`). |
|
| 79 |
+
| `breaking_version_transition` | `string` | Version boundary introducing breaking changes (e.g., `13.x (Pages) -> 14.x/15.x (App Router)`, `18.x -> 19.x`, `1.4.x -> 2.0.x`). |
|
| 80 |
+
| `deprecated_code_snippet` | `string` | Complete, executable source code snippet relying on legacy APIs, obsolete decorators, or deprecated patterns. |
|
| 81 |
+
| `runtime_error_or_warning` | `string` | The exact compiler error, TypeScript diagnostic, or runtime deprecation warning emitted under the modern version. |
|
| 82 |
+
| `migration_reasoning` | `string` | Structural root-cause analysis detailing why the upstream API broke and outlining the AST refactoring strategy. |
|
| 83 |
+
| `codemod_patch_diff` | `string` | Minimal, unified git patch diff (`--- a/`, `+++ b/`, `@@ ... @@`) transforming deprecated patterns into modern idioms. |
|
| 84 |
+
| `verification_test` | `string` | Executable unit test verifying that the migrated code runs cleanly on the modern runtime environment. |
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
### Core Migration Taxonomies Covered
|
| 89 |
+
|
| 90 |
+
* **Next.js (`13.x Pages` -> `14.x/15.x App Router`)**
|
| 91 |
+
* Replacing `pages/api` routes with standard `export async function POST(req: Request)` route handlers.
|
| 92 |
+
* Migrating `getStaticPaths` to `generateStaticParams`.
|
| 93 |
+
* Replacing `getServerSideProps` and `getStaticProps` with React async Server Components and direct `fetch()`.
|
| 94 |
+
* Replacing `next/head` with the unified `export const metadata` API.
|
| 95 |
+
* Adding the mandatory `'use client'` directive to components consuming interactive hooks (`useState`, `useEffect`).
|
| 96 |
+
|
| 97 |
+
* **React (`18.x` -> `19.x`)**
|
| 98 |
+
* Simplifying Context usage from `<Context.Provider value={x}>` to direct `<Context value={x}>`.
|
| 99 |
+
* Deprecating `React.forwardRef` in favor of standard component `ref` props.
|
| 100 |
+
* Replacing `useFormState` (from `react-dom`) and `useOptimistic` with the unified `useActionState` hook.
|
| 101 |
+
* Eliminating legacy component lifecycle methods (`UNSAFE_componentWillMount`) and string refs in favor of `constructor` / `componentDidMount` and `createRef`.
|
| 102 |
+
|
| 103 |
+
* **Python Pydantic (`1.10.x` -> `2.x`)**
|
| 104 |
+
* Migrating legacy `@root_validator` and `@validator` decorators to `@model_validator(mode='before'|'after')` and `@field_validator`.
|
| 105 |
+
* Refactoring inner `class Config` configurations to `model_config = ConfigDict(...)`.
|
| 106 |
+
* Replacing deprecated serialization methods `.dict()` and `.json()` with `.model_dump()` and `.model_dump_json()`.
|
| 107 |
+
* Moving from `GenericModel` to direct `BaseModel` generic parameterization.
|
| 108 |
+
|
| 109 |
+
* **SQLAlchemy (`1.4.x` -> `2.0.x`)**
|
| 110 |
+
* Replacing legacy `Column()` definitions with typed `Mapped[T]` and `mapped_column()` declarative mappings.
|
| 111 |
+
* Replacing the legacy ORM query interface (`session.query(Model).filter(...)`) with 2.0 executable queries (`session.scalars(select(Model).where(...))`).
|
| 112 |
+
* Removing `sessionmaker(autocommit=True)` to enforce explicit transaction management with `session.commit()`.
|
| 113 |
+
* Enforcing explicit `text('SELECT ...')` constructs instead of passing raw string queries to `.execute()`.
|
| 114 |
+
* Migrating model base classes from `declarative_base()` factory calls to subclassing `DeclarativeBase` directly.
|
| 115 |
+
|
| 116 |
+
* **Go Standard Library & Generics (`Go 1.17` -> `Go 1.18+`)**
|
| 117 |
+
* Replacing custom interface type switches and `interface{}` sorting with `constraints.Ordered` type parameters.
|
| 118 |
+
* Replacing reflection-based map key loops with the generic `maps.Keys(m)` function.
|
| 119 |
+
* Using the `golang.org/x/exp/slices` / `slices` package for generic containment and sorting operations.
|
| 120 |
+
* Migrating generic storage containers from `interface{}` casting to parametric types (`Container[T any]`).
|
| 121 |
+
|
| 122 |
+
* **Go Gin Engine (`v1.8.x` -> `v1.9.x+`)**
|
| 123 |
+
* Requiring `ctx := c.Copy()` before spawning background goroutines to prevent memory corruption from recycled context pools.
|
| 124 |
+
* Enforcing explicit `c.Next()` continuation or `c.AbortWithStatus(...)` termination in middleware.
|
| 125 |
+
* Requiring `engine.SetTrustedProxies(...)` to mitigate IP spoofing when calling `c.ClientIP()`.
|
| 126 |
+
* Updating struct tags to comply with strict `binding.Validator` v10 structural JSON validation rules.
|
| 127 |
+
|
| 128 |
+
* **TypeScript Tooling & Bundlers (`Vite 4` -> `5`, `Rollup 4`, `Axios 0.27` -> `1.x`)**
|
| 129 |
+
* Updating Rollup 4 plugin hooks (`resolveId`, `transform`) from synchronous return values to async promises returning `{ id }` or `{ code, map }` objects.
|
| 130 |
+
* Removing the leading tilde prefix (`~`) in Sass/Less `@import` paths in favor of direct module imports or configured path aliases.
|
| 131 |
+
* Changing `worker.format` defaults from `'iife'` to `'es'`.
|
| 132 |
+
* Updating Axios imports from default imports to named/ESM-compatible exports (`import { Axios } from 'axios'`).
|
| 133 |
+
* Migrating Axios proxy configurations from `{ host, port, auth }` objects to full URL strings.
|
| 134 |
+
|
| 135 |
+
* **AWS SDK for Go (`v1.x` -> `v2.x`)**
|
| 136 |
+
* Enforcing mandatory `context.Context` parameters as the first argument in all client SDK calls (`svc.ListBuckets(ctx, ...)` instead of `svc.ListBuckets(nil)`).
|
| 137 |
+
* Moving primitive pointer helpers (`aws.String`, `aws.Int64`) to the `aws-sdk-go-v2/aws` module path.
|
| 138 |
+
* Migrating client instantiation to `config.LoadDefaultConfig(ctx)` and `s3.NewFromConfig(cfg)`.
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
## Quickstart
|
| 145 |
+
|
| 146 |
+
```python
|
| 147 |
+
from datasets import load_dataset
|
| 148 |
+
|
| 149 |
+
#Load Community Evaluation Split
|
| 150 |
+
dataset = load_dataset("ayushjoshi2012/enterprise-api-migrations-codemod-diffs", split="train")
|
| 151 |
+
|
| 152 |
+
sample = dataset[0]
|
| 153 |
+
print(f"Migration: {sample['migration_id']} | {sample['package_name']} ({sample['breaking_version_transition']})")
|
| 154 |
+
print(f"\n--- Deprecated Code ---\n{sample['deprecated_code_snippet']}")
|
| 155 |
+
print(f"\n--- Runtime Warning / Error ---\n{sample['runtime_error_or_warning']}")
|
| 156 |
+
print(f"\n--- Unified Codemod Diff ---\n{sample['codemod_patch_diff']}")
|
| 157 |
+
```
|