Global Constants

Here you can find global constants. These constants define the data supported by the storage service and the standard parameter, maximum length of comments, messages for storing and loading etc.

This module contains constants defined for a global scale and used across most pypet modules.

It contains constants defining the maximum length of a parameter/result name or constants that are recognized by storage services to determine how to store and load data.

pypet.pypetconstants.PARAMETERTYPEDICT = {<class '__name__'>: <Mock object at 0x7fa325dfa250>, <class '__name__'>: <Mock object at 0x7fa325dfa450>, <class '__name__'>: <Mock object at 0x7fa325dfa290>, <class '__name__'>: <Mock object at 0x7fa325dfa2d0>, 'int': <type 'int'>, <class '__name__'>: <Mock object at 0x7fa325dfa350>, 'float': <type 'float'>, 'long': <type 'long'>, <class '__name__'>: <Mock object at 0x7fa325dfa4d0>, <class '__name__'>: <Mock object at 0x7fa325dfa410>, <class '__name__'>: <Mock object at 0x7fa325dfa210>, <class '__name__'>: <Mock object at 0x7fa325dfa490>, 'complex': <type 'complex'>, 'bool': <type 'bool'>, <class '__name__'>: <Mock object at 0x7fa325dfa3d0>, 'unicode': <type 'unicode'>, 'str': <type 'str'>, <class '__name__'>: <Mock object at 0x7fa325dfa390>, <class '__name__'>: <Mock object at 0x7fa325dfa510>, <class '__name__'>: <Mock object at 0x7fa325dfa550>, <class '__name__'>: <Mock object at 0x7fa325dfa310>}

A Mapping (dict) from the the string representation of a type and the type.

These are the so far supported types of the storage service and the standard parameter!

pypet.pypetconstants.PARAMETER_SUPPORTED_DATA = (<Mock object at 0x7fa325dfa590>, <Mock object at 0x7fa325dfa5d0>, <Mock object at 0x7fa325dfa610>, <Mock object at 0x7fa325dfa650>, <Mock object at 0x7fa325dfa690>, <Mock object at 0x7fa325dfa6d0>, <Mock object at 0x7fa325dfa710>, <Mock object at 0x7fa325dfa750>, <Mock object at 0x7fa325dfa790>, <Mock object at 0x7fa325dfa7d0>, <Mock object at 0x7fa325dfa810>, <Mock object at 0x7fa325dfa850>, <Mock object at 0x7fa325dfa890>, <Mock object at 0x7fa325dfa8d0>, <Mock object at 0x7fa325dfa910>, <Mock object at 0x7fa325dfa950>, <Mock object at 0x7fa325dfa990>, <Mock object at 0x7fa325dfa9d0>, <Mock object at 0x7fa325dfaa10>, <Mock object at 0x7fa325dfaa50>, <Mock object at 0x7fa325dfaa90>, <type 'unicode'>, <type 'str'>)

Set of supported scalar types by the storage service and the standard parameter

pypet.pypetconstants.HDF5_STRCOL_MAX_NAME_LENGTH = 128

Maximum length of a (short) name

pypet.pypetconstants.HDF5_STRCOL_MAX_LOCATION_LENGTH = 512

Maximum length of the location string

pypet.pypetconstants.HDF5_STRCOL_MAX_VALUE_LENGTH = 64

Maximum length of a value string

pypet.pypetconstants.HDF5_STRCOL_MAX_COMMENT_LENGTH = 512

Maximum length of a comment

pypet.pypetconstants.HDF5_STRCOL_MAX_RANGE_LENGTH = 1024

Maximum length of a parameter array summary

pypet.pypetconstants.HDF5_STRCOL_MAX_RUNTIME_LENGTH = 18

Maximum length of human readable runtime, 18 characters allows to display up to 999 days excluding the microseconds

pypet.pypetconstants.HDF5_MAX_OVERVIEW_TABLE_LENGTH = 1000

Maximum number of entries in an overview table

pypet.pypetconstants.WRAP_MODE_QUEUE = 'QUEUE'

For multiprocessing, queue multiprocessing mode

pypet.pypetconstants.WRAP_MODE_LOCK = 'LOCK'

Lock multiprocessing mode

pypet.pypetconstants.WRAP_MODE_NONE = 'NONE'

No multiprocessing wrapping for the storage service

pypet.pypetconstants.WRAP_MODE_PIPE = 'PIPE'

Pipe multiprocessing mode

pypet.pypetconstants.WRAP_MODE_LOCAL = 'LOCAL'

Data is only stored on the local machine

pypet.pypetconstants.WRAP_MODE_NETLOCK = 'NETLOCK'

Lock multiprocessing mode over a network

pypet.pypetconstants.WRAP_MODE_NETQUEUE = 'NETQUEUE'

Queue multiprocessing mode over a network

pypet.pypetconstants.LOAD_SKELETON = 1

For trajectory loading, loads only the skeleton.

pypet.pypetconstants.LOAD_DATA = 2

Loads skeleton and data.

pypet.pypetconstants.LOAD_NOTHING = 0

Loads nothing

pypet.pypetconstants.UPDATE_SKELETON = 1

DEPRECATED: Updates skeleton, i.e. adds only items that are not part of your current trajectory.

pypet.pypetconstants.UPDATE_DATA = 2

DEPRECATED: Updates skeleton and data, adds only items that are not part of your current trajectory.

pypet.pypetconstants.STORE_NOTHING = 0

Stores nothing to disk

pypet.pypetconstants.STORE_DATA_SKIPPING = 1

Stores only data of instances that have not been stored before

pypet.pypetconstants.STORE_DATA = 2

Stored all data to disk adds to existing data

pypet.pypetconstants.OVERWRITE_DATA = 3

Overwrites data on disk

pypet.pypetconstants.LEAF = 'LEAF'

For trajectory or item storage, stores a leaf node, i.e. parameter or result object

pypet.pypetconstants.TRAJECTORY = 'TRAJECTORY'

Stores the whole trajectory

pypet.pypetconstants.MERGE = 'MERGE'

Merges two trajectories

pypet.pypetconstants.GROUP = 'GROUP'

Stores a group node, can be recursive.

pypet.pypetconstants.LIST = 'LIST'

Stores a list of different things, in order to avoid reopening and closing of the hdf5 file.

pypet.pypetconstants.SINGLE_RUN = 'SINGLE_RUN'

Stores a single run

pypet.pypetconstants.PREPARE_MERGE = 'PREPARE_MERGE'

Updates a trajectory before it is going to be merged

pypet.pypetconstants.BACKUP = 'BACKUP'

Backs up a trajectory

pypet.pypetconstants.DELETE = 'DELETE'

Removes an item from hdf5 file

Removes a soft link from hdf5 file

pypet.pypetconstants.TREE = 'TREE'

Stores a subtree of the trajectory

pypet.pypetconstants.ACCESS_DATA = 'ACCESS_DATA'

Access and manipulate data directly in the hdf5 file

pypet.pypetconstants.CLOSE_FILE = 'CLOSE_FILE'

Close a still opened HDF5 file

pypet.pypetconstants.OPEN_FILE = 'OPEN_FILE'

Opens an HDF5 file and keeps it open until CLOSE_FILE is passed.

pypet.pypetconstants.FLUSH = 'FLUSH'

Tells the storage to flush the file

pypet.pypetconstants.FORMAT_ZEROS = 8

Number of leading zeros

pypet.pypetconstants.RUN_NAME = 'run_'

Name of a single run

pypet.pypetconstants.RUN_NAME_DUMMY = 'run_ALL'

Dummy name if not created during run

pypet.pypetconstants.FORMATTED_RUN_NAME = 'run_%08d'

Name formatted with leading zeros

pypet.pypetconstants.SET_FORMAT_ZEROS = 5

Number of leading zeros for set

pypet.pypetconstants.SET_NAME = 'run_set_'

Name of a run set

pypet.pypetconstants.SET_NAME_DUMMY = 'run_set_ALL'

Dummy name if not created during run

pypet.pypetconstants.FORMATTED_SET_NAME = 'run_set_%05d'

Name formatted with leading zeros

pypet.pypetconstants.ARRAY = 'ARRAY'

Stored as array

pypet.pypetconstants.CARRAY = 'CARRAY'

Stored as carray

pypet.pypetconstants.EARRAY = 'EARRAY'

Stored as earray_e.

pypet.pypetconstants.VLARRAY = 'VLARRAY'

Stored as vlarray

pypet.pypetconstants.TABLE = 'TABLE'

Stored as pytable

pypet.pypetconstants.DICT = 'DICT'

Stored as dict.

In fact, stored as pytable, but the dictionary wil be reconstructed.

pypet.pypetconstants.FRAME = 'FRAME'

Stored as pandas DataFrame

pypet.pypetconstants.SERIES = 'SERIES'

Store data as pandas Series

pypet.pypetconstants.PANEL = 'PANEL'

Store data as pandas Panel(4D)

pypet.pypetconstants.SPLIT_TABLE = 'SPLIT_TABLE'

If a table was split due to too many columns

pypet.pypetconstants.DATATYPE_TABLE = 'DATATYPE_TABLE'

If a table contains the data types instead of the attrs

pypet.pypetconstants.SHARED_DATA = 'SHARED_DATA_'

An HDF5 data object for direct interaction

pypet.pypetconstants.NESTED_GROUP = 'NESTED_GROUP'

An HDF5 group containing nested data

pypet.pypetconstants.LOG_ENV = '$env'

Wildcard replaced by name of environment

pypet.pypetconstants.LOG_TRAJ = '$traj'

Wildcard replaced by name of trajectory

pypet.pypetconstants.LOG_RUN = '$run'

Wildcard replaced by name of current run

pypet.pypetconstants.LOG_PROC = '$proc'

Wildcard replaced by the name of the current process

pypet.pypetconstants.LOG_HOST = '$host'

Wildcard replaced by the name of the current host

pypet.pypetconstants.LOG_SET = '$set'

Wildcard replaced by the name of the current run set

pypet.pypetconstants.DEFAULT_LOGGING = 'DEFAULT'

Default logging configuration