Skip to content

Commit

Permalink
Merge pull request #117 from pjamesjoyce/ecoinvent3_3_compatability
Browse files Browse the repository at this point in the history
Ecoinvent 3.3 compatability - IAI locations
  • Loading branch information
cmutel committed Sep 23, 2016
2 parents 649756b + 3bbd7a8 commit 24a4364
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ocelot/transformations/locations/_topology.py
Expand Up @@ -15,6 +15,13 @@ class Topology(object):
('IAI Area 3', "IAI Area 3, South America"),
("IAI Area 4&5 without China", 'IAI Area 4&5, without China'),
('IAI Area 8', "IAI Area 8, Gulf"),
# Compatability for ecoinvent 3.3
('IAI Area, North America, without Quebec', 'IAI Area 2, without Quebec'),
('IAI Area, South America', 'IAI Area 3, South America'),
('IAI Area, Russia & RER w/o EU27 & EFTA', 'IAI Area, Europe outside EU & EFTA'),
('IAI Area, Asia, without China and GCC', 'IAI Area 4&5, without China'),
('IAI Area, Gulf Cooperation Council', 'IAI Area 8, Gulf'),
('IAI Area, Africa', 'IAI Area 1, Africa'),
]

def __init__(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/locations/topology.py
Expand Up @@ -23,6 +23,10 @@ def test_topology_intersects():
assert topology.intersects('RoW') == set()
# Test compatibility labels
assert topology.intersects('IAI Area 8')
# Test new Ecoinvent 3.3 compatablility labels
assert topology.intersects('IAI Area, Asia, without China and GCC')
assert topology.intersects('IAI Area, Gulf Cooperation Council')

with pytest.raises(KeyError):
topology.intersects('foo')

Expand Down

0 comments on commit 24a4364

Please sign in to comment.