Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
topRow = [ "Packages" ]
topRow.extend(["P%02d"%(i+1) for i in range(numPackages)] )
projectDepsTable.append(topRow)
for packageDeps in self.__packagesList:
i = packageDeps.packageID
row = ["P%02d"%(i+1)+") "+packageDeps.packageName]
row.extend(["" for i in range(numPackages)])
projectDepsTable.append(row)
for packageDeps in self.__packagesList:
#print("\npackageName =", packageDeps.packageName)
i = packageDeps.packageID
projectDepsTable[i+1][i+1] = "X"
self.updatePackageDeps(libsOnly, i, i, DepStats(True, True, False), projectDepsTable)
return projectDepsTable
depPackage = self.getPackageByName(dep)
#print("\n depPackageName =", depPackage.packageName)
dep_i = depPackage.packageID
self.updateDepCell(packageRow, dep_i, depStats, depCategoryName)
if not depStats.isRequired:
isRequiredDep = False
elif depCategoryName[-1]=="R":
isRequiredDep = True
else:
isRequiredDep = False
childDepStats = DepStats(False, isRequiredDep, depStats.isTestDepChain)
self.updatePackageDeps(libsOnly, packageRowID, dep_i, childDepStats,
projectDepsTable)
projectDepsTable
):
self.updatePackageDepsCategory(libsOnly, packageRowID, packageID,
"libRequiredDepPackages", "LR", depStats, projectDepsTable)
self.updatePackageDepsCategory(libsOnly, packageRowID, packageID,
"libOptionalDepPackages", "LO", depStats, projectDepsTable)
# Only process the test dependencies if we are asked to do so
# (i.e. libsOnly=True) or if this is the top-level package. The tests for
# dependent packages are not any kind of dependency for tests for the
# top-level package. However, we need to record that these are test
# dependencies so that any package libraries that get recursed are
# recorded as 'ITR' or 'ITO' and not as library dependencies.
if not libsOnly and depStats.isDirect:
libDepStats = DepStats(True, depStats.isRequired, True)
self.updatePackageDepsCategory(False, packageRowID, packageID,
"testRequiredDepPackages", "TR", libDepStats, projectDepsTable)
self.updatePackageDepsCategory(False, packageRowID, packageID,
"testOptionalDepPackages", "TO", libDepStats, projectDepsTable)