Coverage for python/lsst/ctrl/execute/condorConfig.py: 90%
21 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-10-11 01:45 -0700
« prev ^ index » next coverage.py v7.10.6, created at 2025-10-11 01:45 -0700
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"""
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",
36 dtype=str,
37 default=None,
38 )
39 fileSystemDomain = pexConfig.Field(doc="network domain name of remote system", dtype=str, default=None)
40 eupsPath = pexConfig.Field(doc="location of remote EUPS stack", dtype=str, default=None)
41 nodeSetRequired = pexConfig.Field(doc="is the nodeset required", dtype=bool, default=False)
42 scheduler = pexConfig.Field(doc="scheduler type", dtype=str, default=None)
43 peakcpus = pexConfig.Field(doc="peakcpus", dtype=int, default=None)
44 manager = pexConfig.Field(doc="workflow manager", dtype=str, default=None)
45 setup_using = pexConfig.Field(doc="environment setup type", dtype=str, default=None)
46 manager_software_home = pexConfig.Field(
47 doc="location of workflow manager software", dtype=str, default=None
48 )
51class CondorConfig(pexConfig.Config):
52 """A pex_config file describing the platform specific information required
53 to fill out templates for running ctrl_orca jobs
54 """
56 platform = pexConfig.ConfigField("platform configuration", PlatformConfig)
59class FakeTypeMap(dict):
60 def __init__(self, configClass):
61 self.configClass = configClass
63 def __getitem__(self, k):
64 return self.setdefault(k, self.configClass)