Skip to content

Commit

Permalink
Adjust context for fossil resources which are not tied to ground in F…
Browse files Browse the repository at this point in the history
…EDEFL
  • Loading branch information
bl-young committed Feb 19, 2020
1 parent de0359a commit 5af1cb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lciafmt/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,13 @@ def _determine_compartments(sheet: xlrd.book.sheet) -> (str, int):
log.warning("no compartment column; assuming 'air'")
return "air", -1

elif _containstr(sheet.name, "mineral", "resource", "scarcity") \
or _containstr(sheet.name, "fossil", "resource", "scarcity"):
elif _containstr(sheet.name, "mineral", "resource", "scarcity"):
log.warning("no compartment column; assuming 'resource/ground'")
return "resource/ground", -1

elif _containstr(sheet.name, "fossil", "resource", "scarcity"):
log.warning("no compartment column; assuming 'resource'")
return "resource", -1

if _containstr(sheet.name, "water", "consumption"):
log.warning("no compartment column; assuming 'resource/fresh water'")
Expand Down

0 comments on commit 5af1cb7

Please sign in to comment.