General Interactions

delphin_6_automation.database_interactions.general_interactions.add_to_simulation_queue(delphin_file: str, priority: str) → str[source]

Uploads and adds a Delphin project file to the simulation queue.

Parameters:
  • delphin_file – Delphin 6 project file path
  • priority – High, medium or low priority
Returns:

Database entry id

delphin_6_automation.database_interactions.general_interactions.does_simulation_exists(sim_id: str) → bool[source]

Checks if a Delphin project entry is in the database or not.

Parameters:sim_id – Database entry to check
Returns:True if it is in database otherwise returns False.
delphin_6_automation.database_interactions.general_interactions.download_full_project_from_database(document_id: str, folder: str) → bool[source]

Downloads a Delphin project file from the database.rst with all of its materials and weather.

Parameters:
  • document_id – Database entry id
  • folder – Path where the files should be written.
Returns:

True

delphin_6_automation.database_interactions.general_interactions.download_raw_result(result_id: str, download_path: str) → bool[source]

Downloads a result entry from the database.rst.

Parameters:
  • result_id – Database entry id
  • download_path – Path where the result should be written
Returns:

True

delphin_6_automation.database_interactions.general_interactions.is_simulation_finished(sim_id: str) → bool[source]

Checks if a Delphin project entry is simulated or not.

Parameters:sim_id – Database entry to check
Returns:True if it is simulated otherwise returns False.
delphin_6_automation.database_interactions.general_interactions.list_finished_simulations() → list[source]

Returns a list with Delphin entry ID’s for simulated entries.

delphin_6_automation.database_interactions.general_interactions.list_materials()[source]

List materials currently in the database

delphin_6_automation.database_interactions.general_interactions.list_weather_stations() → dict[source]

List the weather stations currently in database

delphin_6_automation.database_interactions.general_interactions.queue_priorities(priority: str) → int[source]

Generate a queue priority number.

Parameters:priority – High, medium or low priority
Returns:Priority number