core classes

managers

ConfigManager

class pipeLion.core.configManager.ConfigManager(project=None)[source]
getDatabaseLocation()[source]

the location of the database - file

Returns:the filepath, where to find the database
Return type:string
getPipeLionSocket()[source]

method will return a dictionary which holds the host and the port of the pipeLionServer.

Returns:host and port of the pipeLionServer
Return type:dict
getProjectServer()[source]

method will return the path to the project-server depending on the current platform

Returns:projectServer
Return type:string
refreshConfig()[source]

will reparse the config

searchForConfigs(project=None)[source]

method defines files, which should be searched in order to extend the config of the pipeLion.

Parameters:project (Project) – is a project-object, which will enable this method to get a custom config of the project
Returns:a list of file-paths
Return type:list of strings

IdManager

class pipeLion.core.idManager.IdManager[source]

This class handles the ids which are needed by pipeLion. It is a singleton class and can therefore only have one instance at a time.

In this class all Ids, are stored. To avoid conflicts with older instances Id’s can also be stored on disk and reloaded into an object of this class.

The pipelion Ids consist out of four parts:

1st: request-time in seconds from the Epoch 2nd: name of the project from which the request comes from 3rd: name of the node-type the request comes from 4th: index to avoid double ids

eg:
(1234567889, ‘testProject’, ‘nodeType’, 0) (1234567889, ‘testProject’, ‘nodeType’, 1) (1234567890, ‘testProject’, ‘nodeType’, 0) (1234567890, ‘testProject’, ‘nodeType2’, 0)

for printouts the id should be shown as a dotNotation:

eg: ‘1234567889.testProject.nodeType2.0’

Note: This is one of the core-classes and must not break at any time. please make sure that mandatory functions still work, by running the unittest module for this class.

addGivenId(id, force=False)[source]

Method will add a given id to the global list. In case the given Id already exists it will raise an error

addIdFromDotNotation(dotNotation, force=False)[source]

Method will convert the dotNotation-string to an id-tuple and then add this to the global list

allIds()[source]

returns a list of all Ids which are assigned.

clearIds()[source]

Empty the __ids list

getIdRange(first, last)[source]

return a certain range of ids in the id-list helps if you don’t want to print out the whole list but only 10 entries

getLastIds(number)[source]

get the last n entries of the id-list

getNewId(project, type)[source]

function will return a new Id.and will save it as given in the id-list

latestId()[source]

returns the last id which was assigned

removeId(id)[source]

remove a certain id from the global list of ids

data-structures

Id

class pipeLion.core.id.Id(id)[source]

The Id object holds pipeLion Ids consisting of a date of creation in seconds from the epoch a name a typa and a counternumber

dateOfCreation[source]

returns the date of creation of this Id

name[source]

returns the name of an dataElement which is represented by the id

setSubversion(i)[source]

method allows to change the subversion

subversion[source]

returns the amount of other ids which have been created in the same second before the creation of this id

toDotNotation()[source]

Method will return the dotNotation of an Id

type[source]

returns the type of a dataElement represented by an Id

ConfigParser

class pipeLion.core.configParser.ConfigParser(listOfConfigFiles=None)[source]

This parser class will parse a given number of files and will create a dictionary holding all confing information

as a plus multipple ConfigParser objects can be merged together.

addFiles(files)[source]

method allows to add config files after the constructor has been parsed

Parameters:files (list of strings) – a list of filepaths
mergeConfigs(parentConfig, childConfig)[source]

method to merge to configs. The parent config will be extended by the childConfig.

Parameters:
  • parentConfig (ConfigParser) – the config which should be extended
  • childConfig (ConfigParser) – the config which should extend
Returns:

the extended parentConfig

Return type:

ConfigParser

parseConfig()[source]

method will iter over all given configFiles and create a dictionary holding all the information in a hierarchical way. If there are the same options set to different values by amultiple config files, the config file with the highest index will set its value to the option

refresh()[source]

a wrapper for the parseConfig method

error-handling

abstractError

class pipeLion.core.errors.abstractError.AbstractError(msg)[source]

coreErrors

class pipeLion.core.errors.coreErrors.IdManagerError(msg)[source]
class pipeLion.core.errors.coreErrors.IdCoflictError(conflictedId)[source]
class pipeLion.core.errors.coreErrors.OsNotSupportedError(platform)[source]

connectionErrors

class pipeLion.core.errors.connectionErrors.ConnectionError(msg)[source]
class pipeLion.core.errors.connectionErrors.ConnectionNoPublishedVersionOnDiskError(path)[source]
class pipeLion.core.errors.connectionErrors.ConnectionMethodNotImplemented(connection, method)[source]

uiErrors

class pipeLion.core.errors.uiErrors.ProjectCreationError(msg)[source]
class pipeLion.core.errors.uiErrors.UserCreationError(msg)[source]

Table Of Contents

Previous topic

Planning

Next topic

assets

This Page