Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config sensitive to field-ordering #12

Open
benjimin opened this issue Apr 18, 2019 · 0 comments
Open

Config sensitive to field-ordering #12

benjimin opened this issue Apr 18, 2019 · 0 comments

Comments

@benjimin
Copy link
Contributor

These two config files differ only in the list-ordering, but produce different outcomes.

This works:

- template: wind_v3
- load_exposure:
    exposure_latitude: LATITUDE
    exposure_longitude: LONGITUDE
    file_name: .../exposure.csv
- load_wind_ascii: NetCDF:.../gust.nc:vmax
- calc_struct_loss:
    replacement_value_label: REPLACEMENT_VALUE
- save: .../test_impact.csv

This fails:

- calc_struct_loss:
    replacement_value_label: REPLACEMENT_VALUE
- load_wind_ascii: NetCDF:.../gust.nc:vmax
- save: .../test_impact.csv
- template: wind_v3
- load_exposure:
    exposure_latitude: LATITUDE
    exposure_longitude: LONGITUDE
    file_name: .../exposure.csv

With uninformative message (from config_build.py, called from templates.py, called from config.py):

RuntimeError: 
Invalid key in config file; calc_struct_loss 

Possibly the template must be specified first, to control how subsequent fields are parsed. This is either a bug or should be clearly documented. (At minimum, since the config is the primary user interface, the error message should be more helpful.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant