Belle II Software  release-06-00-14
ValidationRoot Class Reference

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 169 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 179 of file validationserver.py.

179  def __init__(self, working_folder):
180  """
181  class initializer, which takes the path to the folders containing the
182  validation run results and plots (aka comparison)
183  """
184 
185 
186  self.working_folder = working_folder
187 
188 
189  self.last_restart = datetime.datetime.now()
190 
191 
193  os.environ["BELLE2_LOCAL_DIR"]
194  )
195 
Optional[str] get_compact_git_hash(str repo_folder)

Member Function Documentation

◆ check_comparison_status()

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

Definition at line 244 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 359 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 199 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 212 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 220 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 255 of file validationserver.py.

◆ system_info()

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

Definition at line 388 of file validationserver.py.


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