Belle II Software  release-05-02-19
ValidationRoot Class Reference
Inheritance diagram for ValidationRoot:
Collaboration diagram for ValidationRoot:

Public Member Functions

def __init__ (self, working_folder)
 
def create_comparison (self)
 
def index (self)
 
def plots (self, *args)
 
def check_comparison_status (self)
 
def revisions (self, revision_label=None)
 
def comparisons (self, comparison_label=None)
 
def system_info (self)
 

Public Attributes

 working_folder
 html folder that contains plots etc.
 
 last_restart
 Date when this object was instantiated.
 
 version
 Git version.
 

Detailed Description

Root Validation class to handle non-static HTTP requests into the
validation server. The two main functions are to hand out compiled json
objects of revisions and comparisons and to start and monitor the
creation of comparison plots.

Definition at line 159 of file validationserver.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  working_folder 
)
class initializer, which takes the path to the folders containing the
validation run results and plots (aka comparison)

Definition at line 169 of file validationserver.py.

169  def __init__(self, working_folder):
170  """
171  class initializer, which takes the path to the folders containing the
172  validation run results and plots (aka comparison)
173  """
174 
175 
176  self.working_folder = working_folder
177 
178 
179  self.last_restart = datetime.datetime.now()
180 
181 
183  os.environ["BELLE2_LOCAL_DIR"]
184  )
185 

Member Function Documentation

◆ check_comparison_status()

def check_comparison_status (   self)
Checks on the status of a comparison creation

Definition at line 235 of file validationserver.py.

◆ comparisons()

def comparisons (   self,
  comparison_label = None 
)
return the json file of the comparison results of one specific
comparison

Definition at line 361 of file validationserver.py.

◆ create_comparison()

def create_comparison (   self)
Triggers the start of a now comparison between the revisions supplied
in revision_list

Definition at line 189 of file validationserver.py.

◆ index()

def index (   self)
forward to the static landing page if
the default url is used (like http://localhost:8080/)

Definition at line 203 of file validationserver.py.

◆ plots()

def plots (   self,
args 
)
Serve file from the html/plot directory.
:param args: For the request /plots/a/b/c, these will be the strings
    "a", "b", "c"

Definition at line 211 of file validationserver.py.

◆ revisions()

def revisions (   self,
  revision_label = None 
)
Return a combined json object with all revisions and
mark the newest one with the field most_recent=true

Definition at line 247 of file validationserver.py.

◆ system_info()

def system_info (   self)
Returns:
    JSON file containing git versions and time of last restart

Definition at line 391 of file validationserver.py.


The documentation for this class was generated from the following file:
validationfunctions.get_compact_git_hash
Optional[str] get_compact_git_hash(str repo_folder)
Definition: validationfunctions.py:44