-
Notifications
You must be signed in to change notification settings - Fork 7
Examples
PCART Bot edited this page Apr 23, 2026
·
2 revisions
Real-world usage examples for PCART.
Upgrading SciPy from version 0.19.1 to 1.0.0 for a graph kernel project.
Deep-Graph-Kernels/
├── Kronecker_Generator.py # Main entry file
└── ... (other source files)
{
"projPath": "/home/user/Deep-Graph-Kernels",
"runCommand": "python Kronecker_Generator.py",
"runFilePath": "",
"libName": "scipy",
"currentVersion": "0.19.1",
"targetVersion": "1.0.0",
"currentEnv": "/home/user/anaconda3/envs/scipy0.19.1",
"targetEnv": "/home/user/anaconda3/envs/scipy1.0.0"
}python main.py -cfg Deep-Graph-Kernels.json- Total APIs analyzed: 21
- Compatible APIs: 20
- Incompatible APIs: 1 (successfully repaired)
Upgrading aiofiles from version 22.1.0 to 23.1.0 for an async project.
async_await_invocation/aiofiles1/
├── test_asyncawait.py # Main entry file
└── ... (other source files)
{
"projPath": "/home/user/async_project",
"runCommand": "python test_asyncawait.py",
"runFilePath": "",
"libName": "aiofiles",
"currentVersion": "22.1.0",
"targetVersion": "23.1.0",
"currentEnv": "/home/user/anaconda3/envs/aiofiles22.1.0",
"targetEnv": "/home/user/anaconda3/envs/aiofiles23.1.0"
}python main.py -cfg aiofiles1.jsonUpgrading PyTorch from version 1.7.1 to 1.9.0 for a deep learning project.
{
"projPath": "/home/user/mytorch_project",
"runCommand": "python train.py",
"runFilePath": "src",
"libName": "torch",
"currentVersion": "1.7.1",
"targetVersion": "1.9.0",
"currentEnv": "/home/user/anaconda3/envs/torch1.7.1",
"targetEnv": "/home/user/anaconda3/envs/torch1.9.0"
}-
runFilePath: "src"because the entry file is in thesrc/subdirectory - PyTorch may require GPU-enabled environments for full testing
Upgrading Flask from version 2.0 to 3.0 for a web application.
{
"projPath": "/home/user/flask_app",
"runCommand": "python app.py",
"runFilePath": "",
"libName": "flask",
"currentVersion": "2.0.0",
"targetVersion": "3.0.0",
"currentEnv": "/home/user/venv/flask2.0",
"targetEnv": "/home/user/venv/flask3.0"
}Upgrading NumPy from version 1.20 to 1.24 for a data processing project.
{
"projPath": "/home/user/data_project",
"runCommand": "python process.py",
"runFilePath": "",
"libName": "numpy",
"currentVersion": "1.20.0",
"targetVersion": "1.24.0",
"currentEnv": "/home/user/venv/numpy1.20",
"targetEnv": "/home/user/venv/numpy1.24"
}PCART works with any Python library. Common examples:
| Library | libName | Example Configurations |
|---|---|---|
| PyTorch | torch |
pytorch_upgrade.json |
| NumPy | numpy |
(create your own) |
| SciPy | scipy |
Deep-Graph-Kernels.json |
| Pillow | PIL |
(create your own) |
| aiofiles | aiofiles |
aiofiles1.json |
| Flask | flask |
flask1.json, flask2.json |
| Click | click |
click1.json, click2.json, click3.json |
| TensorFlow | tensorflow |
tensorflow1.json, tensorflow2.json |
- Determine current and target versions of your library
- Create virtual environments with both versions
- Create a JSON configuration file in
Configure/directory - Run PCART
For more examples, see PCBench - a large-scale benchmark with 47,478 test cases covering 844 parameter-changed APIs from 33 popular Python third-party libraries.
See Configuration-Guide for detailed field descriptions.
- Quick-Start: Basic usage tutorial
- Configuration-Guide: Configuration reference
- Troubleshooting: Common issues and solutions