Exemplo n.º 1
0
conf_config.addOption('SCRIPTS_PATH', 'Ganga/scripts', """the search path to scripts directory.
When running a script from the system shell (e.g. ganga script) this path is used to search for script""")

conf_config.addOption('LOAD_PATH', '', "the search path for the load() function")
conf_config.addOption('RUNTIME_PATH', '',
"""path to runtime plugin packages where custom handlers may be added.
Normally you should not worry about it.
If an element of the path is just a name (like in the example below)
then the plugins will be loaded using current python path. This means that
some packages such as GangaTest may be taken from the release area.""",
        examples="RUNTIME_PATH = GangaGUIRUNTIME_PATH = /my/SpecialExtensions:GangaTest ")

conf_config.addOption('TextShell', 'IPython', """ The type of the interactive shell: IPython (cooler) or Console (limited)""")
conf_config.addOption('StartupGPI', '', 'block of GPI commands executed at startup')
conf_config.addOption('ReleaseNotes', True, 'Flag to print out the relevent subsection of release notes for each experiment at start up')
conf_config.addOption('gangadir', expandvars(None, '~/gangadir'),
                 'Location of local job repositories and workspaces. Default is ~/gangadir but in somecases (such as LSF CNAF) this needs to be modified to point to the shared file system directory.', filter=Ganga.Utility.Config.expandvars)
conf_config.addOption('repositorytype', 'LocalXML', 'Type of the repository.', examples='LocalXML')
conf_config.addOption('lockingStrategy', 'UNIX', 'Type of locking strategy which can be used. UNIX or FIXED . default = UNIX')
conf_config.addOption('workspacetype', 'LocalFilesystem',
                 'Type of workspace. Workspace is a place where input and output sandbox of jobs are stored. Currently the only supported type is LocalFilesystem.')
conf_config.addOption('user', getpass.getuser(),
    'User name. The same person may have different roles (user names) and still use the same gangadir. Unless explicitly set this option defaults to the real user name.')
conf_config.addOption('resubmitOnlyFailedSubjobs', True,
                 'If TRUE (default), calling job.resubmit() will only resubmit FAILED subjobs. Note that the auto_resubmit mechanism will only ever resubmit FAILED subjobs.')
conf_config.addOption('SMTPHost', 'localhost', 'The SMTP server for notification emails to be sent, default is localhost')
conf_config.addOption('deleteUnusedShareDir', 'always',
                 'If set to ask the user is presented with a prompt asking whether Shared directories not associated with a persisted Ganga object should be deleted upon Ganga exit. If set to never, shared directories will not be deleted upon exit, even if they are not associated with a persisted Ganga object. If set to always (the default), then shared directories will always be deleted if not associated with a persisted Ganga object.')

conf_config.addOption('autoGenerateJobWorkspace', False, 'Autogenerate workspace dirs for new jobs')
Exemplo n.º 2
0
conf_config.addOption('SCRIPTS_PATH', 'Ganga/scripts', """the search path to scripts directory.
When running a script from the system shell (e.g. ganga script) this path is used to search for script""")

conf_config.addOption('LOAD_PATH', '', "the search path for the load() function")
conf_config.addOption('RUNTIME_PATH', '',
"""path to runtime plugin packages where custom handlers may be added.
Normally you should not worry about it.
If an element of the path is just a name (like in the example below)
then the plugins will be loaded using current python path. This means that
some packages such as GangaTest may be taken from the release area.""",
        examples="RUNTIME_PATH = GangaGUIRUNTIME_PATH = /my/SpecialExtensions:GangaTest ")

conf_config.addOption('TextShell', 'IPython', """ The type of the interactive shell: IPython (cooler) or Console (limited)""")
conf_config.addOption('StartupGPI', '', 'block of GPI commands executed at startup')
conf_config.addOption('ReleaseNotes', True, 'Flag to print out the relevent subsection of release notes for each experiment at start up')
conf_config.addOption('gangadir', expandvars(None, '~/gangadir'),
                 'Location of local job repositories and workspaces. Default is ~/gangadir but in somecases (such as LSF CNAF) this needs to be modified to point to the shared file system directory.', filter=Ganga.Utility.Config.expandvars)
conf_config.addOption(
    'repositorytype', 'LocalXML', 'Type of the repository.', examples='LocalXML')
conf_config.addOption('workspacetype', 'LocalFilesystem',
                 'Type of workspace. Workspace is a place where input and output sandbox of jobs are stored. Currently the only supported type is LocalFilesystem.')
conf_config.addOption('user', getpass.getuser(),
    'User name. The same person may have different roles (user names) and still use the same gangadir. Unless explicitly set this option defaults to the real user name.')
conf_config.addOption('resubmitOnlyFailedSubjobs', True,
                 'If TRUE (default), calling job.resubmit() will only resubmit FAILED subjobs. Note that the auto_resubmit mechanism will only ever resubmit FAILED subjobs.')
conf_config.addOption('SMTPHost', 'localhost', 'The SMTP server for notification emails to be sent, default is localhost')
conf_config.addOption('deleteUnusedShareDir', 'always',
                 'If set to ask the user is presented with a prompt asking whether Shared directories not associated with a persisted Ganga object should be deleted upon Ganga exit. If set to never, shared directories will not be deleted upon exit, even if they are not associated with a persisted Ganga object. If set to always (the default), then shared directories will always be deleted if not associated with a persisted Ganga object.')

conf_config.addOption('autoGenerateJobWorkspace', False, 'Autogenerate workspace dirs for new jobs')
Exemplo n.º 3
0
import os
try:
    import unittest2 as unittest
except ImportError:
    import unittest

# remove previous test gangadirs
os.system('rm -rf ~/gangadir_testing/TutorialTests')

# load the config system
from Ganga.Utility.Config import getConfig, expandvars
conf = getConfig('Configuration')
conf.setSessionValue('gangadir', expandvars(None, '~/gangadir_testing/TutorialTests'))

# Now we can start ganga properly
#from ganga import *
from Ganga.testlib.GangaUnitTest import GangaUnitTest

class TutorialTests(GangaUnitTest):

    # A set of tests that are explicitly quoted in the tutorial docs
    # DON'T CHANGE THE COMMENTS as these are used to pick out the code!
    # Should also add more checks for completed jobs, etc.
    def setUp(self):
        """Make sure that the Tasks object isn't destroyed between tests"""
        extra_opts = [('TestingFramework', 'AutoCleanup', 'False')]
        super(TutorialTests, self).setUp(extra_opts=extra_opts)

    def test_a_InstallAndBasicUsage(self):
        from Ganga.GPI import Job, jobs
Exemplo n.º 4
0
    examples=
    "RUNTIME_PATH = GangaGUIRUNTIME_PATH = /my/SpecialExtensions:GangaTest ")

conf_config.addOption(
    'TextShell', 'IPython',
    """ The type of the interactive shell: IPython (cooler) or Console (limited)"""
)
conf_config.addOption('StartupGPI', '',
                      'block of GPI commands executed at startup')
conf_config.addOption(
    'ReleaseNotes', True,
    'Flag to print out the relevent subsection of release notes for each experiment at start up'
)
conf_config.addOption(
    'gangadir',
    expandvars(None, '~/gangadir'),
    'Location of local job repositories and workspaces. Default is ~/gangadir but in somecases (such as LSF CNAF) this needs to be modified to point to the shared file system directory.',
    filter=Ganga.Utility.Config.expandvars)
conf_config.addOption('repositorytype',
                      'LocalXML',
                      'Type of the repository.',
                      examples='LocalXML')
conf_config.addOption(
    'lockingStrategy', 'UNIX',
    'Type of locking strategy which can be used. UNIX or FIXED . default = UNIX'
)
conf_config.addOption(
    'workspacetype', 'LocalFilesystem',
    'Type of workspace. Workspace is a place where input and output sandbox of jobs are stored. Currently the only supported type is LocalFilesystem.'
)
conf_config.addOption(
Exemplo n.º 5
0
import os
try:
    import unittest2 as unittest
except ImportError:
    import unittest

# remove previous test gangadirs
os.system('rm -rf ~/gangadir_testing/TutorialTests')

# load the config system
from Ganga.Utility.Config import getConfig, expandvars
conf = getConfig('Configuration')
conf.setSessionValue('gangadir',
                     expandvars(None, '~/gangadir_testing/TutorialTests'))

# Now we can start ganga properly
#from ganga import *
from Ganga.testlib.GangaUnitTest import GangaUnitTest


class TutorialTests(GangaUnitTest):

    # A set of tests that are explicitly quoted in the tutorial docs
    # DON'T CHANGE THE COMMENTS as these are used to pick out the code!
    # Should also add more checks for completed jobs, etc.
    def setUp(self):
        """Make sure that the Tasks object isn't destroyed between tests"""
        extra_opts = [('TestingFramework', 'AutoCleanup', 'False')]
        super(TutorialTests, self).setUp(extra_opts=extra_opts)

    def test_a_InstallAndBasicUsage(self):