FLEXPART Testing Environment CTBTO WO8
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Private Attributes | List of all members
distrotest.RunCase.RunCase Class Reference
Inheritance diagram for distrotest.RunCase.RunCase:
Inheritance graph
[legend]
Collaboration diagram for distrotest.RunCase.RunCase:
Collaboration graph
[legend]

Public Member Functions

def __init__
 
def get_descr
 
def get_case_dir
 
def get_control_data_dir
 
def get_test_list
 

Private Attributes

 _description
 
 _case_dir
 
 _control_data_dir
 
 _test_list
 

Detailed Description

RunCase.py - container that stores properties of a particular run, including 
description, directory of case files, and a list of BasicTest objects to be 
applied.  A Case corresponds to a specific simulation (e.g. forward or backward,
specific set of inputs, specific domain, species, etc.)

Definition at line 13 of file RunCase.py.

Constructor & Destructor Documentation

def distrotest.RunCase.RunCase.__init__ (   self,
  descr = None,
  case_dir = None,
  control_data_dir = None,
  test_list = None 
)
descr : (optional) Description string
case_dir : directory where case configuration files is located
control_data_dir : (optional).  Alternate location of control output
data.  If not defined, then defaults to <case_dir>/output
test_list : (optional) List of BasicTest objects.  Defaults to None.

Definition at line 24 of file RunCase.py.

24 
25  control_data_dir=None, test_list=None):
26 
27  """
28  descr : (optional) Description string
29  case_dir : directory where case configuration files is located
30  control_data_dir : (optional). Alternate location of control output
31  data. If not defined, then defaults to <case_dir>/output
32  test_list : (optional) List of BasicTest objects. Defaults to None.
33  """
34 
35  if descr:
36  self._description = descr
37 
38  if case_dir:
39  if os.path.isdir(case_dir):
40  self._case_dir = case_dir
41  else:
42  raise Exception('Cannot find case_dir: ' + case_dir)
43  else:
44  raise Exception('case_dir not defined')
45 
46 
47  if control_data_dir:
48  self._control_data_dir = control_data_dir
49  else:
50  self._control_data_dir = self._case_dir + '/output'
51 
52  # Default to the "output" dir of the case directory
53  #print control_data_dir, self._control_data_dir
54  if not os.path.isdir(self._control_data_dir):
55  raise Exception('control_data_dir not valid: ' + self._control_data_dir)
56 
57  # Make sure all elements of test_list are indeed BasicTest objects
58  if test_list:
59  for the_test in test_list:
60  if not isinstance(the_test, (BasicTest.BasicTest)):
61  raise Exception('item in test_list not a BasicTest obj')
62  self._test_list = test_list
63  else:
64  self._test_list = []
65 

Member Function Documentation

def distrotest.RunCase.RunCase.get_case_dir (   self)

Definition at line 69 of file RunCase.py.

69 
70  def get_case_dir(self):
71  return self._case_dir
def distrotest.RunCase.RunCase.get_control_data_dir (   self)

Definition at line 72 of file RunCase.py.

72 
73  def get_control_data_dir(self):
74  return self._control_data_dir
75 
def distrotest.RunCase.RunCase.get_descr (   self)

Definition at line 66 of file RunCase.py.

66 
67  def get_descr(self):
68  return self._description
def distrotest.RunCase.RunCase.get_test_list (   self)

Definition at line 76 of file RunCase.py.

76 
77  def get_test_list(self):
78  return self._test_list
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 

Member Data Documentation

distrotest.RunCase.RunCase._case_dir
private

Definition at line 39 of file RunCase.py.

distrotest.RunCase.RunCase._control_data_dir
private

Definition at line 47 of file RunCase.py.

distrotest.RunCase.RunCase._description
private

Definition at line 35 of file RunCase.py.

distrotest.RunCase.RunCase._test_list
private

Definition at line 61 of file RunCase.py.


The documentation for this class was generated from the following file: