if I understand correctly, in the file external_data_validation.py (lines 486 - 492), the scenario names defined in the datapackage.json are compared to the scenario names provided in the scenario_data.csv:
available_scenarios = df["scenario"].unique()
if not all(
s in scenarios for s in available_scenarios
): # check that all scenarios are available in the scenario file
raise ValueError(
f"One or several scenarios are not available in the scenario file no. {i + 1}."
)
I think, 'scnearios' and 'available_scenarios' should be interchanged to:
if not all(
s in available_scenarios for s in scenarios
):
That would make it possible to have several scenarios listed in the file scenario_data.csv (as available_scenarios) but to e.g. only use only one of them for creating a new DB. With the current code, this raises a ValueError and requires to make a new scenario_data.csv file for different DB-creations, which is a bit unpractical.
Hi @romainsacchi ,
if I understand correctly, in the file external_data_validation.py (lines 486 - 492), the scenario names defined in the datapackage.json are compared to the scenario names provided in the scenario_data.csv:
I think, 'scnearios' and 'available_scenarios' should be interchanged to:
That would make it possible to have several scenarios listed in the file scenario_data.csv (as available_scenarios) but to e.g. only use only one of them for creating a new DB. With the current code, this raises a ValueError and requires to make a new scenario_data.csv file for different DB-creations, which is a bit unpractical.