ramp_database.tools.event.add_problem

ramp_database.tools.event.add_problem(session, problem_name, kit_dir, data_dir, force=False)

Add a RAMP problem to the database.

Parameters
sessionsqlalchemy.orm.Session

The session to directly perform the operation on the database.

problem_namestr

The name of the problem to register in the database.

kit_dirstr

The directory where the RAMP kit are located. It will corresponds to the key ramp_kit_dir of the dictionary created with ramp_utils.generate_ramp_config.

data_dirstr

The directory where the RAMP data are located. It will corresponds to the key ramp_data_dir of the dictionary created with ramp_utils.generate_ramp_config.

forcebool, default is False

Whether to force add the problem. If force=False, an error is raised if the problem was already in the database.