|
PCART
v1.4
Automated Repair of Python API Parameter Compatibility Issues
|
Run workspace helpers for isolating PCART execution artifacts. More...
Classes | |
| class | RunWorkspace |
| Run workspace path object PCART单次运行的工作区路径对象 More... | |
Functions | |
| def | cleanupRunWorkspace (workspace) |
| Remove one completed PCART run workspace 删除一次已完成的PCART运行工作区 More... | |
| def | createRunWorkspace (repoRoot, projPath, runCommand, runPath, libName, currentVersion, targetVersion, currentEnv, targetEnv, commandId='cmd-001', timestamp=None) |
| Create an isolated workspace for one PCART run command 为一次PCART运行命令创建隔离工作区 More... | |
| def | exportRunReport (workspace) |
| Export internal report files to user-visible report directory 将工作区内部报告导出到用户可见报告目录 More... | |
| def | getRepoRoot () |
| Get PCART repository root path 获取PCART仓库根目录路径 More... | |
| def | getRuntimePaths (workspace) |
| Return runtime artifact paths for the current execution 返回当前执行使用的运行产物路径 More... | |
| def | slugifyProjectName (projPath) |
| Convert project path/name to a filesystem-safe slug 将项目路径或项目名转换为可作为目录名使用的slug. More... | |
| def | workspaceCwd (path) |
| def | writeMetadata (workspace, metadata) |
| Write workspace metadata 写入运行工作区元数据 More... | |
Run workspace helpers for isolating PCART execution artifacts.
Provides createRunWorkspace() to create isolated run directories under PCARTRuns/runs/ with unique run_id and command_id, exportRunReport() to export internal reports to Report/runs/, and workspaceCwd() for temporary working directory switching. Each workspace contains Copy/, Dynamic/, data/, temp/, Report/ subdirectories and a metadata.json snapshot. 提供createRunWorkspace()在PCARTRuns/runs/下创建带唯一run_id和command_id的 隔离运行目录,exportRunReport()导出内部报告到Report/runs/,workspaceCwd() 用于临时切换工作目录。每个工作区包含Copy/、Dynamic/、data/、temp/、Report/ 子目录和metadata.json快照。
提供PCART运行工作区的创建、编号、元数据记录和报告导出能力
| def workspace.cleanupRunWorkspace | ( | workspace | ) |
Remove one completed PCART run workspace 删除一次已完成的PCART运行工作区
Only a direct child of <repo>/PCARTRuns/runs can be removed. 只允许删除<repo>/PCARTRuns/runs的直接子目录。
| workspace | RunWorkspace object for this execution |
Definition at line 264 of file workspace.py.
| def workspace.createRunWorkspace | ( | repoRoot, | |
| projPath, | |||
| runCommand, | |||
| runPath, | |||
| libName, | |||
| currentVersion, | |||
| targetVersion, | |||
| currentEnv, | |||
| targetEnv, | |||
commandId = 'cmd-001', |
|||
timestamp = None |
|||
| ) |
Create an isolated workspace for one PCART run command 为一次PCART运行命令创建隔离工作区
The workspace stores intermediate Copy/Dynamic/data/temp/Report artifacts under PCARTRuns, while user-visible reports are exported under Report/runs. 运行中间态保存在PCARTRuns中,用户可见报告导出到Report/runs中。
| repoRoot | The PCART repository root path |
| projPath | The project path under test |
| runCommand | The project run command |
| runPath | The relative path of the run file |
| libName | The upgraded Python third-party library name |
| currentVersion | The current library version |
| targetVersion | The target library version |
| currentEnv | The virtual environment for current library version |
| targetEnv | The virtual environment for target library version |
| commandId | The command id under this run, default cmd-001 |
| timestamp | Optional timestamp, mainly used by tests |
Definition at line 113 of file workspace.py.
| def workspace.exportRunReport | ( | workspace | ) |
Export internal report files to user-visible report directory 将工作区内部报告导出到用户可见报告目录
| workspace | The RunWorkspace object |
Definition at line 239 of file workspace.py.
| def workspace.getRepoRoot | ( | ) |
Get PCART repository root path 获取PCART仓库根目录路径
Definition at line 52 of file workspace.py.
| def workspace.getRuntimePaths | ( | workspace | ) |
Return runtime artifact paths for the current execution 返回当前执行使用的运行产物路径
Internal pipeline code should use these paths instead of cwd-relative Copy/Dynamic/data/Report paths. 流水线内部代码应使用这些路径,而非相对于当前工作目录的Copy/Dynamic/data/Report路径。
| workspace | RunWorkspace object |
Definition at line 207 of file workspace.py.
| def workspace.slugifyProjectName | ( | projPath | ) |
Convert project path/name to a filesystem-safe slug 将项目路径或项目名转换为可作为目录名使用的slug.
| projPath | The project path or project name |
Definition at line 61 of file workspace.py.
| def workspace.workspaceCwd | ( | path | ) |
| def workspace.writeMetadata | ( | workspace, | |
| metadata | |||
| ) |
Write workspace metadata 写入运行工作区元数据
| workspace | The RunWorkspace object |
| metadata | Additional metadata collected from config |
Definition at line 192 of file workspace.py.