basic
Package¶
exceptions
¶
- exception tvb.basic.exceptions.TVBException(message, parent_exception=None)[source]¶
Bases:
Exception
Base class for all TVB exceptions.
- exception tvb.basic.exceptions.ValidationException(message, parent_exception=None)[source]¶
Bases:
TVBException
Exception class for problems that occurs during HasTraits validations on fields.
profile
¶
TVB Profile Manager (top level in TVB profile & settings).
This class is responsible for referring towards application settings, based on current running environment (e.g. dev vs deployment), or developer profile choice (e.g. web vs console).
- class tvb.basic.profile.TvbProfile[source]¶
Bases:
object
ENUM-like class with current TVB profile and accepted values.
- ALL = ['LIBRARY_PROFILE', 'COMMAND_PROFILE', 'WEB_PROFILE', 'MATLAB_PROFILE', 'TEST_POSTGRES_PROFILE', 'TEST_SQLITE_PROFILE', 'TEST_LIBRARY_PROFILE']¶
- COMMAND_PROFILE = 'COMMAND_PROFILE'¶
- CURRENT_PROFILE_NAME = 'LIBRARY_PROFILE'¶
- LIBRARY_PROFILE = 'LIBRARY_PROFILE'¶
- MATLAB_PROFILE = 'MATLAB_PROFILE'¶
- REGISTERED_PROFILES = {'LIBRARY_PROFILE': <class 'tvb.basic.config.profile_settings.LibrarySettingsProfile'>, 'MATLAB_PROFILE': <class 'tvb.basic.config.profile_settings.MATLABLibraryProfile'>, 'TEST_LIBRARY_PROFILE': <class 'tvb.basic.config.profile_settings.TestLibraryProfile'>}¶
- TEST_LIBRARY_PROFILE = 'TEST_LIBRARY_PROFILE'¶
- TEST_POSTGRES_PROFILE = 'TEST_POSTGRES_PROFILE'¶
- TEST_SQLITE_PROFILE = 'TEST_SQLITE_PROFILE'¶
- WEB_PROFILE = 'WEB_PROFILE'¶
- current = <tvb.basic.config.profile_settings.LibrarySettingsProfile object>¶
- env = <tvb.basic.config.environment.Environment object>¶
readers
¶
This module contains basic reading mechanism for default DataType fields.
- class tvb.basic.readers.FileReader(file_path)[source]¶
Bases:
object
Read one or multiple numpy arrays from a text/bz2 file.
- class tvb.basic.readers.H5Reader(h5_path)[source]¶
Bases:
object
Read one or many numpy arrays from a H5 file.
- class tvb.basic.readers.ZipReader(zip_path)[source]¶
Bases:
object
Read one or many numpy arrays from a ZIP archive.
- tvb.basic.readers.copy_zip_entry_into_temp(source, file_suffix, buffer_size=1048576)[source]¶
Copy a ZIP Entry into a new file created under system temporary folder.
- Parameters:
source – ZipEntry
file_suffix – String suffix to be added to the temporary file name
buffer_size – Buffer size used when copying the file-content
- Returns:
the path towards the new file.
- tvb.basic.readers.try_get_absolute_path(relative_module, file_suffix)[source]¶
- Parameters:
relative_module – python module to be imported. When import of this fails, we will return the file_suffix
file_suffix – In case this is already an absolute path, return it immediately, otherwise append it after the module path
- Returns:
Try to build an absolute path based on a python module and a file-suffix
Subpackages¶
config
Packageenvironment
Environment
Environment.PYTHON_FOLDER
Environment.append_to_path()
Environment.get_library_folder()
Environment.is_distribution()
Environment.is_framework_present()
Environment.is_linux()
Environment.is_linux_deployment()
Environment.is_mac()
Environment.is_mac_deployment()
Environment.is_windows()
Environment.is_windows_deployment()
Environment.setup_python_path()
Environment.setup_tk_tcl_environ()
profile_settings
BaseSettingsProfile
BaseSettingsProfile.ACCESS_MODE_TVB_FILES
BaseSettingsProfile.BIN_FOLDER
BaseSettingsProfile.DEFAULT_STORAGE
BaseSettingsProfile.FIRST_RUN_STORAGE
BaseSettingsProfile.LOGGER_CONFIG_FILE_NAME
BaseSettingsProfile.MAGIC_NUMBER
BaseSettingsProfile.PYTHON_INTERPRETER_PATH
BaseSettingsProfile.TVB_CONFIG_FILE
BaseSettingsProfile.TVB_USER_HOME
BaseSettingsProfile.initialize_for_deployment()
BaseSettingsProfile.initialize_profile()
BaseSettingsProfile.prepare_for_operation_mode()
LibrarySettingsProfile
MATLABLibraryProfile
TestLibraryProfile
settings
ClusterSettings
ClusterSettings.CLUSTER_NODE_NAME
ClusterSettings.IN_OPERATION_EXECUTION_PROCESS
ClusterSettings.IS_RUNNING_ON_CLUSTER_NODE
ClusterSettings.JOB_ID_STRING
ClusterSettings.NODE_ENV
ClusterSettings.SCHEDULER_OAR
ClusterSettings.SCHEDULER_SLURM
ClusterSettings.SCHEDULE_COMMAND
ClusterSettings.STATUS_COMMAND
ClusterSettings.STOP_COMMAND
DBSettings
HPCSettings
HPCSettings.CAN_RUN_HPC
HPCSettings.CRYPT_BUFFER_SIZE
HPCSettings.CRYPT_PASS_SIZE
HPCSettings.HPC_LAUNCHER_SH_SCRIPT
HPCSettings.IN_OPERATION_EXECUTION_PROCESS
HPCSettings.JOB_MOUNT_POINT_KEY
HPCSettings.JOB_STATUS_KEY
HPCSettings.UNICORE_ARGS_KEY
HPCSettings.UNICORE_EXE_KEY
HPCSettings.UNICORE_PROJECT_KEY
HPCSettings.UNICORE_RESOURCER_KEY
VersionSettings
WebAdminSettings
WebSettings
stored
utils
logger
Packageneotraits
Package