Resolver

class Environment(zooConfig)

Bases: object

Parameters:

zooConfig (zoo.core.manager.Zoo) – The zoo configuration instance

environmentPath()

The environment config path on disk

Returns:

The package_version.config file path

Return type:

str

loadEnvironmentFile()

Method which loads the environment File

Internal use only.

Returns:

The json data from the environment File.

Return type:

dict

updateEnvironmentDescriptorFromDict(descriptor)

Update’s The currently load environment with the provided descriptor dict.

Parameters:

descriptor (dict) – The descriptor dict in the same format as the environment data

removeDescriptorFromEnvironment(descriptor)

Remove’s the provided descriptor instance from the currently loaded environment.

Parameters:

descriptor (descriptor.Descriptor) – The descriptor instance to delete.

Returns:

True if deleting the descriptor was successful.

Return type:

bool

createEnvironmentFile(env=None)

Creates an Environment file with the corresponding package data if the File doesn’t already exist.

Location of the environment file:

zooRootPath/config/env/package_version.config
Returns:

True if the environment file was created

Return type:

bool

resolveFromPath(requestPath, **kwargs)
resolve(requestsInfo, apply=True, runCommandScripts=True)
shutdown()
packageFromPath(path)

Returns a Package instance from the given path.

The path can either be the directory containing the package or the zoo_package.json file.

Parameters:

path (str) – The directory or the zoo_package.json absolute path

Returns:

Return type:

Package

packageForDescriptor(descriptor)
existingPackage(pkg)
Parameters:

pkg (package.Package) –

Returns:

Return type:

package.Package

packageByName(packageName)

Finds the package from the cache by name.

Return type:

package.Package or None

testPackagesInCurrentEnv()

Package

isPackageDirectory(directory)
class Package(packagePath=None)

Bases: object

classmethod fromData(data)
setVersion(versionStr)
processFile(packagePath)
setPath(path)
exists()
processData(data)
dirname()
setName(name)
delete()
searchStr()
static nameForPackageNameAndVersion(packageName, packageVersion)
resolve(applyEnvironment=True)
resolveEnvPath(key, values, applyEnvironment=True)
save()
updateAndWriteVersion(newVersion)
createZip(destinationDirectory=None)
static copyTo(package, destination, ignore=<function ignore_patterns.<locals>._ignore_patterns>)
runInstall()
runUninstall()
runStartup()
shutdown()