PyFoam.Basics.RunDatabase module

Collects data about runs in a small SQLite database

class PyFoam.Basics.RunDatabase.RunDatabase(name, create=False, verbose=False)[source]

Bases: object

Database with information about runs. To be queried etc

TheRunsName = 'theRuns'
add(data, update_existing=False)[source]

Add a dictionary with data to the database

dumpToCSV(fname, selection=None, disableRunData=None, pandasFormat=True, excel=False)[source]

Dump the contents of the database to a csv-file :param name: the CSV-file :param selection: list of regular expressions. Only data entries fitting those will be added to the CSV-file (except for the basic run). If unset all data will be written

get_runID(uniqueId)[source]
id_exists(theId)[source]
initDatabase(name)[source]

Create a new database file

modify(unique_id, data)[source]

Modify a dataset for which we have a unique id with the data in a dictionary

run_id = 'runId'
separator = '//'
specialChars = {'(': 'pro', ')': 'prc', '[': 'bro', ']': 'brc', '{': 'cro', '|': 'pip', '}': 'crc'}
specialString = '_specialChar'
unique_id = 'uniqueid'