banana package
- banana.register(path)[source]
Register configurations.
This function is provided for its simple heuristics for configuration file detection. The idea behind is that it can be invoked by runner scripts in the following way:
import banana banana.register(__file__)
Thus, if it’s pointing to a file with a name different from the conventional one (see
cfg.name
), it is assumed that this file is in the same folder of the configuration file, that is named with the conventional name.- Parameters:
path (str or os.PathLike) – a path pointing to configuration file, its parent directory, or another file in the same directory
Subpackages
- banana.benchmark package
- Subpackages
- Submodules
- banana.benchmark.runner module
BenchmarkRunner
BenchmarkRunner.banana_cfg
BenchmarkRunner.console
BenchmarkRunner.db()
BenchmarkRunner.db_base_cls
BenchmarkRunner.external
BenchmarkRunner.insert_external()
BenchmarkRunner.insert_log()
BenchmarkRunner.load_external()
BenchmarkRunner.load_ocards()
BenchmarkRunner.log()
BenchmarkRunner.run()
BenchmarkRunner.run_config()
BenchmarkRunner.run_external()
BenchmarkRunner.run_me()
get_pdf()
pdf_name()
- banana.data package
cartesian_product()
- Submodules
- banana.data.db module
Cache
CalcResult
Log
MyBase
Theory
Theory.CKM
Theory.Comments
Theory.DAMP
Theory.EScaleVar
Theory.FNS
Theory.GF
Theory.HQ
Theory.IB
Theory.IC
Theory.ID
Theory.MP
Theory.MW
Theory.MZ
Theory.MaxNfAs
Theory.MaxNfPdf
Theory.ModEv
Theory.NfFF
Theory.PTO
Theory.Q0
Theory.QED
Theory.Qedref
Theory.Qmb
Theory.Qmc
Theory.Qmt
Theory.Qref
Theory.SIN2TW
Theory.SxOrd
Theory.SxRes
Theory.TMC
Theory.XIF
Theory.XIR
Theory.alphaqed
Theory.alphas
Theory.atime
Theory.ctime
Theory.fact_to_ren_scale_ratio
Theory.global_nx
Theory.hash
Theory.kDISbThr
Theory.kDIScThr
Theory.kDIStThr
Theory.kbThr
Theory.kcThr
Theory.ktThr
Theory.mb
Theory.mc
Theory.mt
Theory.mtime
Theory.nfref
Theory.uid
create_db()
engine()
- banana.data.dfdict module
- banana.data.sql module
- banana.data.theories module
- banana.navigator package
launch_navigator()
register_globals()
- Submodules
- banana.navigator.navigator module
NavigatorApp
NavigatorApp.cache_as_dfd()
NavigatorApp.change_external()
NavigatorApp.compare_external()
NavigatorApp.crashed_log()
NavigatorApp.get()
NavigatorApp.get_all()
NavigatorApp.get_by_log()
NavigatorApp.hash_len
NavigatorApp.is_valid_physical_object()
NavigatorApp.list_all()
NavigatorApp.list_all_similar_logs()
NavigatorApp.load_dfd()
NavigatorApp.log_as_dfd()
NavigatorApp.myname
NavigatorApp.remove()
NavigatorApp.show_full_logs()
NavigatorApp.subtract_tables()
NavigatorApp.table_manager()
NavigatorApp.table_name()
NavigatorApp.table_objects
NavigatorApp.truncate()
- banana.navigator.table_manager module
- banana.navigator.utils module
Submodules
banana.cfg module
Configurations related objects.
This module contains the functions used to manage configurations.
Moreover, the actual loaded configurations are stored in the module variable
cfg
, that is used as the source of truth for them.
- banana.cfg.cfg = None
Global store for configurations
- banana.cfg.detect(path=None)[source]
Search configurations file.
It searches the configuration file in the following places, sorted:
provided path (e.g. CLI argument)
current directory
home directory
user default configurations directory
system default configurations directory
If the path resolved is a directory (all cases but file path provided), it is assumed that the file name is that stored in the module level variable
name
.- Parameters:
path (str ot os.PathLike) – path to a configuration file, or to a folder containing it
- Returns:
the resolved path
- Return type:
- Raises:
FileNotFoundError – if the configuration file is not foundd in any of the places above
- banana.cfg.load(path)[source]
Load configurations.
Load everything as a dictionary. Determines root from the loaded dictionary:
if the key root is found in the configuration file, it is treated as an absolute path, or a relative one (relative to the configuration file parent folder)
otherwise root is assigned to the configuration file parent folder itself
For the section “path”, all paths are converted to
pathlib.Path
type, and (if not absolute) they are considered to be relative to root.No other conversion is performed.
- Parameters:
path (str or os.PathLike) – configurations file path
- Returns:
loaded configurations
- Return type:
- banana.cfg.name = 'banana.yaml'
Configurations file conventional name
banana.toy module
This module contains the Toy PDF.
It is defined at the initial scale \(Q = sqrt(2) GeV\).
- class banana.toy.MockPDF[source]
Bases:
object
Imitates a lhapdf.PDF
- name = None
- xpdf = {}