Coverage for python / lsst / ctrl / execute / condorConfig.py: 91%
23 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-14 23:57 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-14 23:57 +0000
1# This file is part of ctrl_execute.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# This software is dual licensed under the GNU General Public License and also
10# under a 3-clause BSD license. Recipients may choose which of these licenses
11# to use; please see the files gpl-3.0.txt and/or bsd_license.txt,
12# respectively. If you choose the GPL option then the following text applies
13# (but note that there is still no warranty even if you opt for BSD instead):
14#
15# This program is free software: you can redistribute it and/or modify
16# it under the terms of the GNU General Public License as published by
17# the Free Software Foundation, either version 3 of the License, or
18# (at your option) any later version.
19#
20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with this program. If not, see <https://www.gnu.org/licenses/>.
28import lsst.pex.config as pexConfig
31class PlatformConfig(pexConfig.Config):
32 """Platform specific information"""
34 defaultRoot = pexConfig.Field(doc="remote root for working directories", dtype=str, default=None)
35 localScratch = pexConfig.Field(doc="local Condor scratch directory", dtype=str, default=None)
36 idsPerJob = pexConfig.Field(doc="number of ids to work on per job", dtype=int, default=1)
37 dataDirectory = pexConfig.Field(
38 doc="remote directory where date that jobs will use is kept",
39 dtype=str,
40 default=None,
41 )
42 fileSystemDomain = pexConfig.Field(doc="network domain name of remote system", dtype=str, default=None)
43 eupsPath = pexConfig.Field(doc="location of remote EUPS stack", dtype=str, default=None)
44 nodeSetRequired = pexConfig.Field(doc="is the nodeset required", dtype=bool, default=False)
45 scheduler = pexConfig.Field(doc="scheduler type", dtype=str, default=None)
46 peakcpus = pexConfig.Field(doc="peakcpus", dtype=int, default=None)
47 peakmemory = pexConfig.Field(doc="peakmemory", dtype=int, default=None)
48 collector = pexConfig.Field(doc="collector", dtype=str, default=None)
49 manager = pexConfig.Field(doc="workflow manager", dtype=str, default=None)
50 setup_using = pexConfig.Field(doc="environment setup type", dtype=str, default=None)
51 manager_software_home = pexConfig.Field(
52 doc="location of workflow manager software", dtype=str, default=None
53 )
56class CondorConfig(pexConfig.Config):
57 """A pex_config file describing the platform specific information required
58 to fill out templates for running ctrl_orca jobs
59 """
61 platform = pexConfig.ConfigField("platform configuration", PlatformConfig)
64class FakeTypeMap(dict):
65 def __init__(self, configClass):
66 self.configClass = configClass
68 def __getitem__(self, k):
69 return self.setdefault(k, self.configClass)