premise icon indicating copy to clipboard operation
premise copied to clipboard

external scenario LCI name capitalization

Open marc-vdm opened this issue 1 year ago • 1 comments

I am creating external scenarios and ran into the following problem:

In my LCI, I have an activity with the name Advanced Dry Recovery (ADR) and an activity with the name ADR. These activities have variables attached in my configuration, where I refer to these names to match them.

I found that the ADR activity matched without issue, but the Advanced Dry Recovery (ADR) would not. After inspection, it turns out that the second process is written to Brightway as advanced Dry Recovery (ADR) (note the lower case first letter). After changing my LCI and config file to advanced Dry Recovery (ADR), Premise matched the correct variable without issue.

Somehow Premise is lower-casing the first letter (but only in some cases??), which cause Premise to fail to link.

marc-vdm avatar Sep 18 '24 09:09 marc-vdm

There's a function that indeed lower-caps names and reference products of datasets and exchanges, except if it starts with an acronym. This is to align more with the ecoinvent naming convention.

I think https://github.com/polca/premise/commit/399923109553eb3940d775041adca9262d5917a3 fixes the issue. Can you try it?

romainsacchi avatar Oct 03 '24 12:10 romainsacchi