Coverage for python/lsst/ctrl/execute/allocationConfig.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.2.1, created at 2023-03-12 01:44 -0800

1# 

2# LSST Data Management System 

3# Copyright 2008-2016 LSST Corporation. 

4# 

5# This product includes software developed by the 

6# LSST Project (http://www.lsst.org/). 

7# 

8# This program is free software: you can redistribute it and/or modify 

9# it under the terms of the GNU General Public License as published by 

10# the Free Software Foundation, either version 3 of the License, or 

11# (at your option) any later version. 

12# 

13# This program is distributed in the hope that it will be useful, 

14# but WITHOUT ANY WARRANTY; without even the implied warranty of 

15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

16# GNU General Public License for more details. 

17# 

18# You should have received a copy of the LSST License Statement and 

19# the GNU General Public License along with this program. If not, 

20# see <http://www.lsstcorp.org/LegalNotices/>. 

21# 

22 

23import lsst.pex.config as pexConfig 

24 

25 

26class AllocatedPlatformConfig(pexConfig.Config): 

27 """Platform specific information 

28 """ 

29 queue = pexConfig.Field(doc="the scheduler queue to submit to", 

30 dtype=str, default="debug") 

31 email = pexConfig.Field(doc="line to add to the scheduler file to get email notification (if supported)", 

32 dtype=str, default=None) 

33 

34 scratchDirectory = pexConfig.Field(doc="directory on the remote system where the scheduler file is sent", 

35 dtype=str, default=None) 

36 loginHostName = pexConfig.Field(doc="the host to login and copy files to", 

37 dtype=str, default=None) 

38 utilityPath = pexConfig.Field(doc="the directory containing the scheduler commands", 

39 dtype=str, default=None) 

40 totalCoresPerNode = pexConfig.Field(doc="the TOTAL number of cores on each node", 

41 dtype=int, default=1) 

42 glideinShutdown = pexConfig.Field(doc="number of seconds of inactivity before glideins are cancelled", 

43 dtype=int, default=3600) 

44 

45 

46class AllocationConfig(pexConfig.Config): 

47 """A pex_config file describing the platform specific information required 

48 to fill out a scheduler file which will be used to submit a scheduler 

49 request. 

50 """ 

51 # this is done on two levels instead of one for future expansion of this 

52 # config class, which may require local attributes to be specified. 

53 platform = pexConfig.ConfigField("platform allocation information", AllocatedPlatformConfig)