calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
299 stars 94 forks source link

Allowed/Not allowed characters in model configuration .yaml files #441

Closed FraSanvit closed 9 months ago

FraSanvit commented 1 year ago

Problem description

By chance, I tried to run an old model I used to run with Calliope v0.6.8. The following model error came up:

ModelError: Some data not extracted from inputs into model dataset

Apparently, the error is triggered by using special characters (in this case I used the & symbol) for naming technologies in yaml files. Substituting the ampersand with and solves the problem.

The question is whether special characters should be allowed or not.

Steps to reproduce the problem

Introduce a technology name as follows:

 oil_&_other:
    essentials:
        name: 'Other fossil fuels plant'
        parent: supply
        carrier_out: electricity
    constraints:
        resource: inf
        energy_eff: 0.35 
        energy_ramping: 0.6 
        lifetime: 35 

Calliope version

v0.7.0 vs v0.6.8

brynpickering commented 1 year ago

This relates to having a YAML schema against which we validate model config files (#230). We would catch something like this if we did.

brynpickering commented 9 months ago

As of v0.7, we now have a YAML schema that will manage this.