Skip to content

Commit

Permalink
Zone model: add emissionFactors field to allow pydantic validation to…
Browse files Browse the repository at this point in the history
… pass
  • Loading branch information
jayaddison committed Oct 12, 2023
1 parent eb39522 commit e4e701c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions electricitymap/contrib/config/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class Zone(StrictBaseModelWithAlias):
key: ZoneKey # This is not part of zones/{zone_key}.yaml, but added here to enable self referencing
estimation_method: str | None
sources: dict[str, Source] | None
emissionFactors: dict | None # TODO: represent using CO2eqParameters model?

def neighbors(self) -> list[ZoneKey]:
return ZONE_NEIGHBOURS.get(self.key, [])
Expand Down

0 comments on commit e4e701c

Please sign in to comment.