Team Ai
Apppublic

razak123/code-migration-env

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
openenv.yaml71 linesDownload Raw Back to root
1spec_version: 12name: code_migration_env3type: space4runtime: fastapi5app: server.app:app6port: 80007 8# openenv.yaml9version: 0.1.010description: "A real-world code migration benchmark covering Python modernization, Python-to-Node API migration, and pandas-to-Polars data pipeline rewrites."11author: "Md Razak"12license: "MIT"13 14tasks:15  - id: "python_modernize"16    difficulty: "easy"17    description: "Migrate Python 3.8 script to Python 3.12 idioms (match/case, pathlib, type hints)"18    source_lang: "python"19    target_lang: "python"20    requirements: "Use structural pattern matching, pathlib.Path, explicit type hints"21    test_desc: "Tests validate functional equivalence + modern syntax usage"22    required_idioms:23      - "match "24      - "case "25      - "Path("26      - "->"27      - ": str"28    grader: "syntax_check + test_run + idiom_match"29    30  - id: "python_to_node"31    difficulty: "medium"32    description: "Convert Python requests script to Node.js fetch with async/await"33    source_lang: "python"34    target_lang: "javascript"35    requirements: "Use async/await, fetch API, query-parameter construction, JSON parsing, and explicit error handling."36    test_desc: "Validates fetch behavior, query string handling, headers, JSON parsing, and error propagation."37    required_idioms:38      - "async function"39      - "await fetch("40      - "response.ok"41      - "response.json("42      - "URL("43    grader: "syntax_check + test_run + idiom_match"44 45  - id: "pandas_to_polars_advanced"46    difficulty: "hard"47    description: "Migrate pandas DataFrame pipeline to Polars lazy evaluation"48    source_lang: "python"49    target_lang: "python"50    requirements: "Migrate to Polars LazyFrame. Handle: null filling with group median, rolling window aggregation, string normalization, multi-column groupby aggregations, no pandas usage."51    test_desc: "Validates output correctness, window logic, filtering, aggregation, and Polars usage"52    required_idioms:53      - "pl.scan_csv"54      - "with_columns"55      - ".collect()"56      - "pl.col"57      - ".over("58    grader: "syntax_check + test_run + idiom_match"59 60graders:61  syntax_check:62    type: "programmatic"63    weight: 0.364  test_run:65    type: "programmatic"66    weight: 0.567    timeout: 2.068  idiom_match:69    type: "keyword_overlap"70    weight: 0.471