Delphin Interactions¶
-
delphin_6_automation.database_interactions.delphin_interactions.
add_sampling_dict
(delphin_id: str, sample_data: dict) → str[source]¶ Adds a sample metadata dict to a Delphin project in the database.
-
delphin_6_automation.database_interactions.delphin_interactions.
change_entry_kirchhoff_potential
(sim_id, set_to)[source]¶ Change the Kirchhoff potential of a Delphin project
-
delphin_6_automation.database_interactions.delphin_interactions.
change_entry_simulation_length
(sim_id, length, unit)[source]¶ Change the simulation length of a Delphin project
-
delphin_6_automation.database_interactions.delphin_interactions.
change_entry_solver_relative_tolerance
(sim_id, rel_tol)[source]¶ Change the solver relative tolerance of a Delphin project
-
delphin_6_automation.database_interactions.delphin_interactions.
check_delphin_file
(delphin_dict: dict)[source]¶ Checks if a Delphin project file is valid for simulation.
Returns:
-
delphin_6_automation.database_interactions.delphin_interactions.
download_delphin_entry
(delphin_document: delphin_6_automation.database_interactions.db_templates.delphin_entry.Delphin, path: str) → bool[source]¶ Converts a database.rst entry to Delphin 6 project file.
Parameters: - delphin_document – Database entry id.
- path – Path to where the files should be written.
Returns: True
-
delphin_6_automation.database_interactions.delphin_interactions.
download_result_files
(result_obj: delphin_6_automation.database_interactions.db_templates.result_raw_entry.Result, download_path: str) → bool[source]¶ Writes out all the result files from a result database entry.
Parameters: - result_obj – Raw result entry
- download_path – Where to write the files
Returns: True
-
delphin_6_automation.database_interactions.delphin_interactions.
upload_delphin_dict_to_database
(delphin_dict: dict, queue_priority: int) → <mongoengine.base.fields.ObjectIdField object at 0x000001AD7C662898>[source]¶ Uploads a Delphin file to a database.rst.
Parameters: - delphin_dict – Dict with a Delphin 6 project
- queue_priority – Queue priority for the simulation
Returns: Database entry id
-
delphin_6_automation.database_interactions.delphin_interactions.
upload_delphin_to_database
(delphin_file: str, queue_priority: int) → <mongoengine.base.fields.ObjectIdField object at 0x000001AD7C662898>[source]¶ Uploads a Delphin file to a database.rst.
Parameters: - delphin_file – Path to a Delphin 6 project file
- queue_priority – Queue priority for the simulation
Returns: Database entry id
-
delphin_6_automation.database_interactions.delphin_interactions.
upload_processed_results
(folder: str, delphin_id: str, raw_result_id: str, simulation_interrupted: bool = False) → <mongoengine.base.fields.ObjectIdField object at 0x000001AD7AE46DD8>[source]¶ Process simulation results and upload them to the database
-
delphin_6_automation.database_interactions.delphin_interactions.
upload_results_to_database
(path_: str, delete_files: bool = True, result_length=None) → str[source]¶ Uploads the results from a Delphin simulation.
Parameters: - path – folder path containing the result files
- delete_files – if True the result folder will be deleted. Default is True
Returns: Result entry id