ecamo19 / sureau_ecos_py

Repo containing the Python code for the SurEau model
https://ecamo19.github.io/sureau_ecos_py/
Apache License 2.0
0 stars 1 forks source link

Not appropiate ValueError for finding duplicate parameters #16

Open ecamo19 opened 10 months ago

ecamo19 commented 10 months ago

I used these lines to detect if duplicated parameters are included:

# Make sure there are no duplicate parameters -------------------------------
    if len(soil_data["Name"]) is not len(set(soil_data["Name"])):
        raise ValueError(
            "Improve this line. Parameter repeated several times in input soil parameter file"
        )

However, I think this should be improved because an error will be raised in the case of including more parameters (even if these are not duplicated)