Deltares / ra2ce

RA2CE helps to quantify resilience of critical infrastructure networks, prioritize interventions and adaptation measures and select the most appropriate action perspective to increase resilience considering future conditions.
https://deltares.github.io/ra2ce/
Other
10 stars 2 forks source link

Allow running analysis simply with two configuration files. #460

Closed Carsopre closed 4 months ago

Carsopre commented 4 months ago

Kind of request

Adding new functionality

Enhancement Description

Despite we have already done a big improvement in #389 we can bring it one step further by simple extending the Ra2ceHandler with another classmethod that removes the need on calling to .configure() and .run_analysis.

In short:

Ra2ceHandler.run_with_config_data(NetworkConfigData(), AnalysisConfigData())

Use case

Specially for notebooks when might want to get rid of using .ini files and reading them each time. We might as well just create the respective dataclasses with the relevant non-default values.

Additional Context

No response