PCART  v1.4
Automated Repair of Python API Parameter Compatibility Issues
Functions
main Namespace Reference

Functions

def backward (projPath, libName, currentVersion, currentEnv, targetVersion, targetEnv, runCommand, runPath, workspace, pcresolveLookup=None)
 Generate pkl files and perform detection and repair tasks 生成项目调用API的pkl文件以及执行检测与修复任务 More...
 
def backwardTask (args)
 One process handles one file 一个进程处理一个文件 More...
 
def main ()
 Main function of PCART PCART主函数 More...
 
def run (config, cleanWorkspace=False)
 Run PCART with an isolated workspace 在隔离工作区中运行PCART. More...
 

Function Documentation

◆ backward()

def main.backward (   projPath,
  libName,
  currentVersion,
  currentEnv,
  targetVersion,
  targetEnv,
  runCommand,
  runPath,
  workspace,
  pcresolveLookup = None 
)

Generate pkl files and perform detection and repair tasks 生成项目调用API的pkl文件以及执行检测与修复任务

Parameters
projPathThe path to the project / 项目路径
libNameThe upgraded Python third-party library name / 升级的第三方库名
currentVersionThe upgraded lib's current version / 库的当前版本
currentEnvCurrent version's virtual environment / 当前版本的虚拟环境
targetVersionThe upgraded lib's target version / 库的目标版本
targetEnvTarget version's virtual environment / 目标版本的虚拟环境
runCommandThe run command of the project / 项目运行命令
runPathThe relative path of the run file / 运行文件的相对路径
workspaceRunWorkspace object for this execution / 本次执行的运行工作区
pcresolveLookupOptional pre-built PCResolve lookup table shared with preprocessing

Definition at line 168 of file main.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ backwardTask()

def main.backwardTask (   args)

One process handles one file 一个进程处理一个文件

Parameters
argsInput parameters for processing one project file (13 values normally, 14 values with a PCResolve lookup)
Returns
(ansDict,fileRelativePath,invokedAPINum) ansDict: detection and repair results; fileRelativePath: the file being processed; invokedAPINum: number of invoked APIs

Definition at line 38 of file main.py.

Here is the call graph for this function:

◆ main()

def main.main ( )

Main function of PCART PCART主函数

Definition at line 290 of file main.py.

Here is the call graph for this function:

◆ run()

def main.run (   config,
  cleanWorkspace = False 
)

Run PCART with an isolated workspace 在隔离工作区中运行PCART.

This function keeps old config fields unchanged, creates a RunWorkspace, runs preprocessing and analysis inside the workspace, then exports reports. 该函数保持旧配置字段不变,创建运行工作区,在工作区内完成预处理和分析, 最后导出用户可见报告。

Parameters
configThe config file path or config file name under Configure
cleanWorkspaceWhether to remove a successful run workspace
Returns
RunWorkspace object for this execution

Definition at line 246 of file main.py.

Here is the call graph for this function:
Here is the caller graph for this function: