def __init__(self, size_proxy=None): self.size_proxy = size_proxy or self.default_size_proxy cg = ConstructiveGeometries() data = cg.data data['GLO'] = cg.all_faces for old, fixed in self.compatibility: data[old] = data[fixed] self.data = {k: set(v) for k, v in data.items()}
def test_default_setup(): cg = ConstructiveGeometries() geomatcher = Geomatcher() assert 'GLO' in geomatcher assert 'RoW' not in geomatcher assert geomatcher["RoW"] == set() assert len(geomatcher["GLO"]) > 400 assert geomatcher["AS"] == set(cg.data['AS']) assert geomatcher[('ecoinvent', 'Russia (Europe)')] == set(cg.data['Russia (Europe)']) assert geomatcher["Japan"] == set(cg.data['JP']) with pytest.raises(KeyError): geomatcher["Nope"]
def test_default_setup(): cg = ConstructiveGeometries() assert "GLO" in geomatcher assert "RoW" not in geomatcher assert geomatcher["RoW"] == set() assert len(geomatcher["GLO"]) > 400 assert geomatcher["AS"] == set(cg.data["AS"]) assert geomatcher[("ecoinvent", "Russia (Europe)")] == set(cg.data["Russia (Europe)"]) assert geomatcher["Japan"] == set(cg.data["JP"]) with pytest.raises(KeyError): geomatcher["Nope"]
"OneSpatialScaleLCA", "PandarusRemote", "remote", "reset_all_geo", "reset_geo_meta", "sha256", "topocollections", "Topography", "TopologicalExtensionTablesLCA", "TwoSpatialScalesLCA", "TwoSpatialScalesWithGenericLoadingLCA", ) from constructive_geometries import ConstructiveGeometries cg = ConstructiveGeometries() from .hashing import sha256 from .intersection import Intersection from .meta import ( extension_tables, topocollections, geocollections, intersections, loadings, ) from .lca import ( ExtensionTablesLCA, OneSpatialScaleLCA, TopologicalExtensionTablesLCA, TwoSpatialScalesLCA,
import appdirs __all__ = ( "RoWGrapher", "Report", ) __version__ = (0, 2, 1) DEFAULT_MAPPING = { # Database name: Display name '3.3 apos': 'ecoinvent 3.3 APOS', '3.3 consequential': 'ecoinvent 3.3 consequential', '3.3 cutoff': 'ecoinvent 3.3 cutoff', '3.4 apos': 'ecoinvent 3.4 APOS', '3.4 consequential': 'ecoinvent 3.4 consequential', '3.4 cutoff': 'ecoinvent 3.4 cutoff', '3.5 apos': 'ecoinvent 3.5 APOS', '3.5 consequential': 'ecoinvent 3.5 consequential', '3.5 cutoff': 'ecoinvent 3.5 cutoff', } DATADIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data") CACHEDIR = os.path.abspath(appdirs.user_data_dir("row-report", "row-reporter")) from constructive_geometries import ConstructiveGeometries cg = ConstructiveGeometries() cg.load_definitions() from .graphics import RoWGrapher from .report import Report