Belle II Software  release-05-01-25
validation_tools.helpers Namespace Reference

Functions

def get_basf2_repo_folder ()
 
def get_basf2_repo (non_dirty_check=False)
 
def checkout_git_revision (revision, repo=None, use_stash=False)
 
def compile_basf2 (compile_options=None)
 
def run_basf2_validation (validation_options=None)
 
def fix_root_command_line ()
 
def get_git_hashes_between (git_end_hash, git_start_hash)
 

Detailed Description

Helper scripts needed to run tools and checks on the validation.
Mainly for git checkout and compilation.

  Author: The Belle II Collaboration
  Contributors: Nils Braun, Thomas Hauth

Function Documentation

◆ checkout_git_revision()

def validation_tools.helpers.checkout_git_revision (   revision,
  repo = None,
  use_stash = False 
)
Checkout the given revision in the basf2 repository.
ATTENTION: this does not check for dirty files etc.

:param revision: which revision to checkout
:param repo: basf2 repo object (None will use the default basf2 repo)

Definition at line 48 of file helpers.py.

48 def checkout_git_revision(revision, repo=None, use_stash=False):
49  """
50  Checkout the given revision in the basf2 repository.
51  ATTENTION: this does not check for dirty files etc.
52 
53  :param revision: which revision to checkout
54  :param repo: basf2 repo object (None will use the default basf2 repo)
55  """
56  if not repo:
57  repo = get_basf2_repo()
58 
59  if use_stash:
60  repo.git.stash()
61  repo.git.checkout(revision)
62  if use_stash:
63  repo.git.stash("pop")
64 
65 

◆ compile_basf2()

def validation_tools.helpers.compile_basf2 (   compile_options = None)
Compile basf2 with the given options as list.

:param compile_options: List of cmd options given to scons.

Definition at line 66 of file helpers.py.

◆ fix_root_command_line()

def validation_tools.helpers.fix_root_command_line ( )
Fix for ROOT to give the command line options directly to python.

Definition at line 88 of file helpers.py.

◆ get_basf2_repo()

def validation_tools.helpers.get_basf2_repo (   non_dirty_check = False)
Return a git repo object of the current basf2 repository

:param non_dirty_check: Check if the repo is dirty and issue a printed warning if yes.

Definition at line 32 of file helpers.py.

◆ get_basf2_repo_folder()

def validation_tools.helpers.get_basf2_repo_folder ( )
Return the folder name of the basf2 repository currently set up

Definition at line 21 of file helpers.py.

◆ get_git_hashes_between()

def validation_tools.helpers.get_git_hashes_between (   git_end_hash,
  git_start_hash 
)
Return list of git hashes between `git_end_hash` and `git_start_hash`
(but not including them).

Definition at line 96 of file helpers.py.

◆ run_basf2_validation()

def validation_tools.helpers.run_basf2_validation (   validation_options = None)
Run the basf2 validation.
:param validation_options: List of options given to the b2validation call.

Definition at line 79 of file helpers.py.