Coverage for python/lsst/ctrl/execute/condorConfig.py: 90%
20 statements
« prev ^ index » next coverage.py v7.2.1, created at 2023-03-12 01:44 -0800
« prev ^ index » next coverage.py v7.2.1, created at 2023-03-12 01:44 -0800
1#!/usr/bin/env python
3#
4# LSST Data Management System
5# Copyright 2008-2016 LSST Corporation.
6#
7# This product includes software developed by the
8# LSST Project (http://www.lsst.org/).
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the LSST License Statement and
21# the GNU General Public License along with this program. If not,
22# see <http://www.lsstcorp.org/LegalNotices/>.
23#
25import lsst.pex.config as pexConfig
28class PlatformConfig(pexConfig.Config):
29 """Platform specific information
30 """
31 defaultRoot = pexConfig.Field(doc="remote root for working directories", dtype=str, default=None)
32 localScratch = pexConfig.Field(doc="local Condor scratch directory", dtype=str, default=None)
33 idsPerJob = pexConfig.Field(doc="number of ids to work on per job", dtype=int, default=1)
34 dataDirectory = pexConfig.Field(
35 doc="remote directory where date that jobs will use is kept", dtype=str, default=None)
36 fileSystemDomain = pexConfig.Field(doc="network domain name of remote system", dtype=str, default=None)
37 eupsPath = pexConfig.Field(doc="location of remote EUPS stack", dtype=str, default=None)
38 nodeSetRequired = pexConfig.Field(doc="is the nodeset required", dtype=bool, default=False)
39 scheduler = pexConfig.Field(doc="scheduler type", dtype=str, default=None)
40 manager = pexConfig.Field(doc="workflow manager", dtype=str, default=None)
41 setup_using = pexConfig.Field(doc="environment setup type", dtype=str, default=None)
42 manager_software_home = pexConfig.Field(doc="location of workflow manager software",
43 dtype=str, default=None)
46class CondorConfig(pexConfig.Config):
47 """A pex_config file describing the platform specific information required
48 to fill out templates for running ctrl_orca jobs
49 """
50 platform = pexConfig.ConfigField("platform configuration", PlatformConfig)
53class FakeTypeMap(dict):
55 def __init__(self, configClass):
56 self.configClass = configClass
58 def __getitem__(self, k):
59 return self.setdefault(k, self.configClass)