diff --git a/data/Makefile b/data/Makefile index 4455829bc..35134a23d 100644 --- a/data/Makefile +++ b/data/Makefile @@ -38,7 +38,7 @@ sync_datapackages: @$(call DOCKER,python3 common/sync_datapackages.py) delete_database: - @$(call DOCKER,python3 common/delete_database.py $(DB)) + @$(call DOCKER,python3 common/delete_database.py "$(DB)") delete_method: @$(call DOCKER,python3 common/delete_methods.py) diff --git a/data/common/__init__.py b/data/common/__init__.py index 6ccc11f07..aea71deda 100644 --- a/data/common/__init__.py +++ b/data/common/__init__.py @@ -5,15 +5,15 @@ def normalization_factors(impact_defs): - normalization_factors = {} + factors = {} for k, v in impact_defs.items(): - if v.get("ecoscore"): - normalization_factors[k] = ( - v["ecoscore"]["weighting"] / v["ecoscore"]["normalization"] - ) + if v.get("ecoscore") and "normalization" in v.get("ecoscore", {}): + factors[k] = v["ecoscore"]["normalization"] + elif v.get("pef") and "normalization" in v.get("pef", {}): + factors[k] = v["pef"]["normalization"] else: - normalization_factors[k] = 0 - return normalization_factors + pass + return factors def spproject(activity): @@ -28,6 +28,8 @@ def spproject(activity): return "ADEME UPR" case "Woolmark": return "Woolmark" + case "WFLDB": + return "WFLDB" case "PastoEco": return "AGB3.1.1 2023-03-06" case _: @@ -153,6 +155,8 @@ def calculate_aggregate(process_impacts, normalization_factors): def bytrigram(definitions, bynames): """takes the impact definitions and some impacts by name, return the impacts by trigram""" + if type(bynames) is not dict: + return {} trigramsByName = {method[1]: trigram for trigram, method in definitions.items()} return { trigramsByName.get(name): amount["amount"] diff --git a/data/common/export.py b/data/common/export.py index 40704c1d6..ce5d76050 100644 --- a/data/common/export.py +++ b/data/common/export.py @@ -225,7 +225,7 @@ def compute_impacts(frozen_processes, default_db, impacts_py): progress_bar(index, len(processes)) # Don't compute impacts if its a hardcoded activity if process.get("impacts"): - logger.info(f"This process has hardcoded impacts: {process['displayName']}") + logger.info(f"This process has hardcoded impacts: {process['name']}") continue # simapro activity = cached_search( @@ -234,7 +234,7 @@ def compute_impacts(frozen_processes, default_db, impacts_py): if not activity: raise Exception(f"This process was not found in brightway: {process}") - results = compute_simapro_impacts(activity, main_method, impacts_py) + results = None # compute_simapro_impacts(activity, main_method, impacts_py) # WARNING assume remote is in m3 or MJ (couldn't find unit from COM intf) if process["unit"] == "kWh" and isinstance(results, dict): results = {k: v * 3.6 for k, v in results.items()} @@ -319,8 +319,8 @@ def plot_impacts(process_name, impacts_smp, impacts_bw, folder, impacts_py): ] nf = normalization_factors(impacts_py) - simapro_values = [impacts_smp[label] * nf[label] for label in trigrams] - brightway_values = [impacts_bw[label] * nf[label] for label in trigrams] + simapro_values = [impacts_smp[label] / nf[label] for label in trigrams] + brightway_values = [impacts_bw[label] / nf[label] for label in trigrams] x = numpy.arange(len(trigrams)) width = 0.35 @@ -394,7 +394,13 @@ def find_id(dbname, activity): def compute_simapro_impacts(activity, method, impacts_py): - strprocess = urllib.parse.quote(activity["name"], encoding=None, errors=None) + name = ( + activity["name"] + if spproject(activity) != "WFLDB" + # TODO this should probably done through disabling a strategy + else f"{activity['name']}/{activity['location']} U" + ) + strprocess = urllib.parse.quote(name, encoding=None, errors=None) project = urllib.parse.quote(spproject(activity), encoding=None, errors=None) method = urllib.parse.quote(main_method, encoding=None, errors=None) api_request = f"http://simapro.ecobalyse.fr:8000/impact?process={strprocess}&project={project}&method={method}" diff --git a/data/common/import_.py b/data/common/import_.py index 4000ce7e4..c21a3296a 100644 --- a/data/common/import_.py +++ b/data/common/import_.py @@ -235,6 +235,7 @@ def import_simapro_csv( database.apply_strategies() database.statistics() + # try to link remaining unlinked technosphere activities database.apply_strategy( functools.partial( @@ -252,8 +253,8 @@ def import_simapro_csv( print("### Adding unlinked flows and activities...") # comment to enable stopping on unlinked activities and creating an excel file - database.add_unlinked_flows_to_biosphere_database(biosphere) - database.add_unlinked_activities() + # database.add_unlinked_flows_to_biosphere_database(biosphere) + # database.add_unlinked_activities() # stop if there are unlinked activities if len(list(database.unlinked)): diff --git a/data/common/sync_datapackages.py b/data/common/sync_datapackages.py index 709abe2bc..53c71896d 100644 --- a/data/common/sync_datapackages.py +++ b/data/common/sync_datapackages.py @@ -1,11 +1,20 @@ +# Configure logger +import sys + import bw2data +from loguru import logger + +logger.remove() # Remove default handler +logger.add(sys.stderr, format="{time} {level} {message}", level="INFO") PROJECT = "default" print("Syncing datapackages...") bw2data.projects.set_current(PROJECT) for method in bw2data.methods: + logger.info(f"Syncing method {method}...") bw2data.Method(method).process() for database in bw2data.databases: + logger.info(f"Syncing database {database}...") bw2data.Database(database).process() print("done") diff --git a/data/docker/simapro-biosphere.json b/data/docker/simapro-biosphere.json index 197e7d9c7..f4d29de73 100644 --- a/data/docker/simapro-biosphere.json +++ b/data/docker/simapro-biosphere.json @@ -849,11 +849,12 @@ ["water", "Benzene, 1,2-dichloro-", "o-Dichlorobenzene"], ["water", "Benzo(a)anthracene", "Benz(a)anthracene"], ["water", "Benzo(g,h,i)perylene", "Benzo(ghi)perylene"], - ["water", "Cadmium", "Cadmium, ion"], + ["water", "Cadmium", "Cadmium II"], ["water", "Calcium", "Calcium, ion"], ["water", "Carbamic acid, butyl-, 3-iodo-2-propynyl ester", "Butylcarbamate, iodopropynyl"], ["water", "Carbon", "Elemental carbon"], ["water", "Chromium", "Chromium, ion"], + ["soil", "Chromium", "Chromium, ion"], ["water", "Copper", "Copper, ion"], ["soil", "Copper", "Copper, ion"], ["water", "Ethane, chloro-", "Monochloroethane"], diff --git a/data/import_ecoinvent.py b/data/import_ecoinvent.py index f49d8e7c3..676874cb6 100755 --- a/data/import_ecoinvent.py +++ b/data/import_ecoinvent.py @@ -47,6 +47,18 @@ def organic_cotton_irrigation(db): STRATEGIES = [organic_cotton_irrigation] +def use_unit_processes(db): + """the woolmark dataset comes with dependent processes + which are set as system processes. + EI3.10 has these processes but as unit processes. + So we change the name such as the linking be done""" + for ds in db: + for exc in ds["exchanges"]: + if exc["name"].endswith("Cut-off, S"): + exc["name"].replace("Cut-off, S", "Cut-off, U") + return db + + def main(): projects.set_current(PROJECT) # projects.create_project(PROJECT, activate=True, exist_ok=True) @@ -79,6 +91,7 @@ def main(): import_simapro_csv( join("..", "..", "dbfiles", WOOL), db, + first_strategies=[use_unit_processes], external_db="Ecoinvent 3.10", # wool is linked with EI 3.10 excluded_strategies=EXCLUDED, ) diff --git a/data/spapi/simapro.py b/data/spapi/simapro.py index 52b03ba44..1ef4e6cc6 100644 --- a/data/spapi/simapro.py +++ b/data/spapi/simapro.py @@ -41,16 +41,19 @@ async def impact(_: Request, project: str, process: str, method: str): server.OpenProject(project, "") print("Computing results...") + # hack because the open project is "WFLDB" + # but the process are in the library project "World Food LCA Database" + tmpproject = "World Food LCA Database" if project == "WFLDB" else project existing = [ e for e in [ - ((i, server.FindProcess(project, i, process)[0])) for i in range(12) + ((i, server.FindProcess(tmpproject, i, process)[0])) for i in range(12) ] if e[1] ] found = existing[0] if len(existing) else None if found: - server.Analyse(project, found[0], process, "Methods", method, "") + server.Analyse(tmpproject, found[0], process, "Methods", method, "") results, i = {}, 0 try: # try the first and stop if it raises (typically on a Dummy process. @@ -66,6 +69,8 @@ async def impact(_: Request, project: str, process: str, method: str): results[r.IndicatorName] = {"amount": r.Amount, "unit": r.UnitName} i += 1 impacts.setdefault(f"{project}/{process}", {}) + if not results: + return results impacts[f"{project}/{process}"][method] = results with open("impacts.json", "w") as fp: json.dump(impacts, fp, ensure_ascii=False) diff --git a/data/textile/export.py b/data/textile/export.py index 5202c960f..cd12e86a4 100755 --- a/data/textile/export.py +++ b/data/textile/export.py @@ -160,16 +160,16 @@ def csv_export_impact_comparison(compared_impacts): ) csv_export_impact_comparison(impacts_compared_dic) for process_name, values in impacts_compared_dic.items(): - displayName = processes[process_name]["displayName"] - print(f"Plotting {displayName}") + name = processes[process_name]["name"] + print(f"Plotting {name}") if "simapro_impacts" not in values and "brightway_impacts" not in values: - print(f"This hardcopied process cannot be plot: {displayName}") + print(f"This hardcopied process cannot be plot: {name}") continue simapro_impacts = values["simapro_impacts"] brightway_impacts = values["brightway_impacts"] os.makedirs(GRAPH_FOLDER, exist_ok=True) plot_impacts( - displayName, + name, simapro_impacts, brightway_impacts, GRAPH_FOLDER, diff --git a/public/data/object/processes.json b/public/data/object/processes.json index 986e8cc17..96557fc85 100644 --- a/public/data/object/processes.json +++ b/public/data/object/processes.json @@ -31,8 +31,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 23650.509942608354, - "pef": 27363.305839091667 + "ecs": 23630.543538072445, + "pef": 27347.019127874755 } }, { diff --git a/public/data/textile/processes.json b/public/data/textile/processes.json index 6d6247d3b..a64e2f266 100644 --- a/public/data/textile/processes.json +++ b/public/data/textile/processes.json @@ -27,8 +27,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 62.603613830244775, - "pef": 67.572468289423 + "ecs": 62.57872661370621, + "pef": 67.55287600947277 }, "density": 0, "heat_MJ": 0, @@ -64,8 +64,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 50.96801179489731, - "pef": 57.27286314080849 + "ecs": 50.950898014968395, + "pef": 57.26022855348023 }, "density": 0, "heat_MJ": 0, @@ -101,8 +101,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 51.822724893794756, - "pef": 53.85203360338701 + "ecs": 51.8181268674865, + "pef": 53.84359684091906 }, "density": 0, "heat_MJ": 0, @@ -138,8 +138,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 25.102886152180908, - "pef": 26.67819894378467 + "ecs": 25.09415296521656, + "pef": 26.665205526410173 }, "density": 0, "heat_MJ": 0, @@ -175,8 +175,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 32.48733569845634, - "pef": 35.86926390471668 + "ecs": 32.47434269977069, + "pef": 35.85402358385308 }, "density": 0, "heat_MJ": 0, @@ -212,8 +212,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 74.8811841164527, - "pef": 82.61994342367964 + "ecs": 74.84317597593513, + "pef": 82.60154514453502 }, "density": 0, "heat_MJ": 0, @@ -249,8 +249,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 64.24164844469438, - "pef": 69.15842379973827 + "ecs": 64.21509912844209, + "pef": 69.13677326928355 }, "density": 0, "heat_MJ": 0, @@ -286,8 +286,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 11.253818771171867, - "pef": 11.83347642985147 + "ecs": 11.247839394160824, + "pef": 11.826228575284874 }, "density": 0, "heat_MJ": 0, @@ -323,8 +323,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 17.343952123426455, - "pef": 19.062951024438945 + "ecs": 17.339191888951348, + "pef": 19.051452338381544 }, "density": 0, "heat_MJ": 0, @@ -360,8 +360,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 10.094869860855908, - "pef": 10.552637688310561 + "ecs": 10.08896044409847, + "pef": 10.54283581120147 }, "density": 0, "heat_MJ": 0, @@ -397,8 +397,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 61.81782996352887, - "pef": 67.28467836877752 + "ecs": 61.78655048124069, + "pef": 67.2618333758912 }, "density": 0, "heat_MJ": 0, @@ -434,8 +434,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 15.746902213915206, - "pef": 15.162720126799286 + "ecs": 15.739630538702247, + "pef": 15.145492851340714 }, "density": 0, "heat_MJ": 0, @@ -471,8 +471,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 25.75909111969023, - "pef": 27.79539379175755 + "ecs": 25.750419473847614, + "pef": 27.780920353583667 }, "density": 0, "heat_MJ": 0, @@ -508,8 +508,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 31.74088404695165, - "pef": 35.36398153017472 + "ecs": 31.728154431004942, + "pef": 35.346580386776765 }, "density": 0, "heat_MJ": 0, @@ -545,8 +545,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 24.088594861524538, - "pef": 26.676201035245835 + "ecs": 24.07808483685078, + "pef": 26.6571806018743 }, "density": 0, "heat_MJ": 0, @@ -582,8 +582,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 22.203313846657093, - "pef": 26.457894467307508 + "ecs": 22.19797511483865, + "pef": 26.44188807789911 }, "density": 0, "heat_MJ": 0, @@ -619,8 +619,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 23.363843709081053, - "pef": 25.296764431669217 + "ecs": 23.35696060072163, + "pef": 25.288771754646316 }, "density": 0, "heat_MJ": 0, @@ -656,8 +656,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 93.04829599496097, - "pef": 101.62695244753462 + "ecs": 93.00616180083071, + "pef": 101.60170001309415 }, "density": 0, "heat_MJ": 0, @@ -730,8 +730,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 494.2911338622397, - "pef": 550.0740644734477 + "ecs": 493.9575094354713, + "pef": 549.8559153831944 }, "density": 0, "heat_MJ": 0, @@ -767,8 +767,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 877.3715835740272, - "pef": 768.8582369858626 + "ecs": 863.5537836968798, + "pef": 774.9359709953978 }, "density": 0, "heat_MJ": 0, @@ -804,8 +804,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 198.79025180939377, - "pef": 222.14731849829033 + "ecs": 198.66219691666936, + "pef": 221.9414111609737 }, "density": 0, "heat_MJ": 0, @@ -841,8 +841,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 279.6462646839095, - "pef": 309.71558911493605 + "ecs": 279.25222069260633, + "pef": 308.5331935690739 }, "density": 0, "heat_MJ": 0, @@ -878,8 +878,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 133.09616729865036, - "pef": 138.9890125263651 + "ecs": 132.65223195254222, + "pef": 137.78288504325857 }, "density": 0, "heat_MJ": 0, @@ -915,8 +915,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 518.2094523470295, - "pef": 570.2684161564904 + "ecs": 517.2121726231479, + "pef": 569.7999201971751 }, "density": 0, "heat_MJ": 0, @@ -952,8 +952,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 261.3178608717324, - "pef": 256.951793458764 + "ecs": 257.36607215919065, + "pef": 238.45573586198412 }, "density": 0, "heat_MJ": 0, @@ -989,8 +989,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 2781.800631273725, - "pef": 2931.4802301799327 + "ecs": 2212.518626964698, + "pef": 2657.373797261458 }, "density": 0, "heat_MJ": 0, @@ -1063,8 +1063,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 1636.4706545472218, - "pef": 573.0550833318028 + "ecs": 1633.0298497632953, + "pef": 574.0768259958293 }, "density": 0, "heat_MJ": 0, @@ -1100,8 +1100,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 421.8780180420624, - "pef": 488.6208132830078 + "ecs": 454.1643201694362, + "pef": 540.4391380647093 }, "density": 0, "heat_MJ": 0, @@ -1137,8 +1137,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 294.4297784688472, - "pef": 50.42407156564021 + "ecs": 294.3272993752236, + "pef": 50.53752013147224 }, "density": 0, "heat_MJ": 0, @@ -1174,8 +1174,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 354.939293800587, - "pef": 354.5790491655871 + "ecs": 353.8128796008963, + "pef": 354.02862638452024 }, "density": 0, "heat_MJ": 0, @@ -1544,8 +1544,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 1.3052891375827191, - "pef": 1.4322921637269501 + "ecs": 1.3046924947645946, + "pef": 1.4302640036532845 }, "density": 0, "heat_MJ": 0, @@ -1581,8 +1581,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 59.40178064207564, - "pef": 57.19662380793924 + "ecs": 59.388316835843, + "pef": 57.18557935046641 }, "density": 0, "heat_MJ": 0, @@ -1618,8 +1618,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 5.485982019299962, - "pef": 5.8322976988226625 + "ecs": 5.482069780267972, + "pef": 5.829746053425438 }, "density": 0, "heat_MJ": 0, @@ -1655,8 +1655,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 15.589216092520365, - "pef": 13.909104855022996 + "ecs": 15.545768167811074, + "pef": 13.896787428535804 }, "density": 0, "heat_MJ": 0, @@ -1729,8 +1729,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 33.025501055000106, - "pef": 36.09204359775752 + "ecs": 33.01986620061097, + "pef": 36.084473312453426 }, "density": 0, "heat_MJ": 0, @@ -1766,8 +1766,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 45.86611638957674, - "pef": 50.22894252636405 + "ecs": 45.844890024687764, + "pef": 50.21324111293862 }, "density": 0, "heat_MJ": 0, @@ -1803,8 +1803,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 51.1431823374395, - "pef": 54.133563259006316 + "ecs": 51.13450087993605, + "pef": 54.12459540535732 }, "density": 0, "heat_MJ": 0, @@ -1840,8 +1840,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 14.333816620551765, - "pef": 15.438721259967162 + "ecs": 14.323883702333235, + "pef": 15.424025449108882 }, "density": 0, "heat_MJ": 0, @@ -1877,8 +1877,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 58.22000934018208, - "pef": 64.21583493522782 + "ecs": 58.196888245803784, + "pef": 64.19940115519978 }, "density": 0, "heat_MJ": 0, @@ -1914,8 +1914,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 2.599211396644681, - "pef": 2.420402496037708 + "ecs": 2.595981474800645, + "pef": 2.4135913665809876 }, "density": 0, "heat_MJ": 0, @@ -1951,8 +1951,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 57.38090586175485, - "pef": 62.24016310342568 + "ecs": 57.357062986082944, + "pef": 62.22691626110181 }, "density": 0, "heat_MJ": 0, @@ -1988,8 +1988,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 42.162212750927814, - "pef": 47.60564420358556 + "ecs": 42.14626758179576, + "pef": 47.58934760756345 }, "density": 0, "heat_MJ": 0, @@ -2025,8 +2025,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 35.933618510081594, - "pef": 38.48886281648279 + "ecs": 35.92579265903659, + "pef": 38.47823177287373 }, "density": 0, "heat_MJ": 0, @@ -2062,8 +2062,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 34.256207010996604, - "pef": 37.757485039069145 + "ecs": 34.2424990545826, + "pef": 37.74225757857223 }, "density": 0, "heat_MJ": 0, @@ -2099,8 +2099,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 44.984063407619814, - "pef": 48.94992432662239 + "ecs": 44.96431469837587, + "pef": 48.934486713424796 }, "density": 0, "heat_MJ": 0, @@ -2876,8 +2876,8 @@ "swe": 0, "tre": 0, "wtu": 0, - "ecs": 10.10050562041144, - "pef": 10.471103597886401 + "ecs": 9.94872366194237, + "pef": 10.424195308063478 }, "density": 0, "heat_MJ": 10.74, diff --git a/tests/Data/Object/SimulatorTest.elm b/tests/Data/Object/SimulatorTest.elm index 77792d808..60b0273c5 100644 --- a/tests/Data/Object/SimulatorTest.elm +++ b/tests/Data/Object/SimulatorTest.elm @@ -36,7 +36,7 @@ suite = |> Example.findByName "Table" |> Result.andThen (.query >> getEcsImpact db) |> Result.withDefault 0 - |> Expect.within (Expect.Absolute 1) 3979 + |> Expect.within (Expect.Absolute 1) 3976 |> asTest "should compute impact for an example table" ] ] diff --git a/tests/Data/Textile/SimulatorTest.elm b/tests/Data/Textile/SimulatorTest.elm index 3850b3579..c110e8b52 100644 --- a/tests/Data/Textile/SimulatorTest.elm +++ b/tests/Data/Textile/SimulatorTest.elm @@ -50,7 +50,7 @@ suite = [ { tShirtCotonFrance | countrySpinning = Nothing } - |> expectImpact db ecs 1401.079098395078 + |> expectImpact db ecs 1399.5099442192766 |> asTest "should compute a simulation ecs impact" , describe "disabled steps" [ { tShirtCotonFrance | disabledSteps = [ Label.Ennobling ] } diff --git a/tests/e2e-textile.json b/tests/e2e-textile.json index f7611355e..967532652 100644 --- a/tests/e2e-textile.json +++ b/tests/e2e-textile.json @@ -10,62 +10,27 @@ "countryMaking=FR" ], "impacts": { - "acd": 0.040947160149247784, - "cch": 6.020701956249272, - "etf": 135.78900205151768, - "etf-c": 283.51321048507714, - "fru": 108.6350507389818, - "fwe": 0.0015733111263051323, - "htc": 3.738578351692862e-9, - "htc-c": 1.3872597680236832e-9, - "htn": 3.130465194657146e-8, - "htn-c": 3.394789226206709e-8, - "ior": 13.317990301220913, - "ldu": 105.23255671822369, - "mru": 0.000048106569616382006, - "ozd": 0.000030295918999428996, - "pco": 0.017755685651354356, - "pma": 3.558623580234299e-7, - "swe": 0.025306657195578727, - "tre": 0.12504221221166, - "wtu": 2.3980964862351737, - "ecs": 1401.079098395078, - "pef": 852.7913691316962 - } - }, - { - "name": "T-shirt 100% coton France, Filature au Turquie", - "query": [ - "mass=0.17", - "product=tshirt", - "materials[]=ei-coton;1", - "countrySpinning=TR", - "countryFabric=FR", - "countryDyeing=FR", - "countryMaking=FR" - ], - "impacts": { - "acd": 0.04008199745739389, - "cch": 5.6002494617244825, - "etf": 134.80981524048227, - "etf-c": 282.5613190115607, - "fru": 105.01689679306604, - "fwe": 0.0021586693533881844, - "htc": 3.657076062345066e-9, - "htc-c": 1.374638533739503e-9, - "htn": 2.6854658174302617e-8, - "htn-c": 3.3560996251498214e-8, - "ior": 13.275397491794092, - "ldu": 103.91944670857092, - "mru": 0.000048156836174357224, - "ozd": 0.000030298743557511143, - "pco": 0.016517345592070812, - "pma": 2.953802109717606e-7, - "swe": 0.02491217048719188, - "tre": 0.1195103385097931, - "wtu": 2.429190904043678, - "ecs": 1380.942755042525, - "pef": 831.9551006228857 + "acd": 0.04094716004467842, + "cch": 6.020701797320939, + "etf": 135.07297679838496, + "etf-c": 282.7857946660227, + "fru": 108.63505044633327, + "fwe": 0.0015733111388660495, + "htc": 4.200428738927075e-9, + "htc-c": 1.3872274119208886e-9, + "htn": 3.106534007516346e-8, + "htn-c": 3.3945101391026917e-8, + "ior": 13.317990258540677, + "ldu": 105.2220733785658, + "mru": 0.0000481065707610554, + "ozd": 0.00003029591900137675, + "pco": 0.017748088709759528, + "pma": 3.55862354981669e-7, + "swe": 0.02530665647693498, + "tre": 0.1250422175716538, + "wtu": 2.398095035819664, + "ecs": 1399.5099442192766, + "pef": 853.0750428888641 } }, { @@ -80,27 +45,27 @@ "countryMaking=FR" ], "impacts": { - "acd": 0.05705837775901931, - "cch": 11.410537103071833, - "etf": 15.994260234159302, - "etf-c": 35.7502046985735, - "fru": 206.3809957143016, - "fwe": 0.001167912765750946, - "htc": 1.6210896145721436e-9, - "htc-c": 9.841777290141749e-10, - "htn": 3.111945227971613e-8, - "htn-c": 8.571887962625597e-9, - "ior": 13.26888555872635, - "ldu": 21.483643430235055, - "mru": 0.00007156779046345629, - "ozd": 0.00005134183108933046, - "pco": 0.03415288826919107, - "pma": 5.31497095825386e-7, - "swe": 0.011679808224231652, - "tre": 0.07851922877288305, - "wtu": 0.35742608687319033, - "ecs": 1614.2247688286495, - "pef": 1139.8664507587937 + "acd": 0.05705837693834587, + "cch": 11.410536875864487, + "etf": 15.824603700817953, + "etf-c": 35.580333315637304, + "fru": 206.38099565743642, + "fwe": 0.0011679127715148367, + "htc": 1.4053366388575756e-9, + "htc-c": 9.841284067187111e-10, + "htn": 3.111198771232787e-8, + "htn-c": 8.571772413322643e-9, + "ior": 13.268885508725266, + "ldu": 21.470100816075497, + "mru": 0.00007156779089810241, + "ozd": 0.000051341831090446085, + "pco": 0.03414792872750732, + "pma": 5.31497100286034e-7, + "swe": 0.011679808091408509, + "tre": 0.07851923089250194, + "wtu": 0.35742448325619525, + "ecs": 1613.8545095442814, + "pef": 1139.5344551695785 } }, { @@ -116,27 +81,27 @@ "countryMaking=FR" ], "impacts": { - "acd": 0.031063700185326604, - "cch": 5.716064407502163, - "etf": 75.2563528025129, - "etf-c": 152.55860112776116, - "fru": 115.23040090071464, - "fwe": 0.0011870561324447027, - "htc": 2.7422549156075255e-9, - "htc-c": 1.3766699133221376e-9, - "htn": 3.070824652025457e-8, - "htn-c": 1.914423535491044e-8, - "ior": 13.31497935431314, - "ldu": 60.35403878273187, - "mru": 0.0000496675959493475, - "ozd": 0.000033016430347223084, - "pco": 0.01563516218747952, - "pma": 2.9452924171701e-7, - "swe": 0.015214712910854909, - "tre": 0.07979584350887753, - "wtu": 1.3728384780538796, - "ecs": 1233.3475311091088, - "pef": 769.7428128625023 + "acd": 0.031063699954692096, + "cch": 5.716064290506764, + "etf": 74.86749791834325, + "etf-c": 152.1641248403615, + "fru": 115.23040077621114, + "fwe": 0.0011870561505095945, + "htc": 2.768029032745294e-9, + "htc-c": 1.3766261772801369e-9, + "htn": 3.0581183038621384e-8, + "htn-c": 1.9142810673203377e-8, + "ior": 13.314979313559315, + "ldu": 60.34371973025152, + "mru": 0.000049667597237042045, + "ozd": 0.00003301643030224541, + "pco": 0.015610419917550982, + "pma": 2.945292386181043e-7, + "swe": 0.015214712544849726, + "tre": 0.07979584663503317, + "wtu": 1.3728371340971044, + "ecs": 1232.4770932699835, + "pef": 769.5948770297662 } }, { @@ -151,27 +116,27 @@ "disabledSteps=ennobling" ], "impacts": { - "acd": 0.032347737353195634, - "cch": 3.437872592610936, - "etf": 133.45593115259405, - "etf-c": 254.3299782963392, - "fru": 83.41172967590721, - "fwe": 0.0012579831124224156, - "htc": 3.458559713270163e-9, - "htc-c": 1.1362488234760849e-9, - "htn": 2.5387720281663114e-8, - "htn-c": 3.342421263914828e-8, - "ior": 12.849147091529362, - "ldu": 100.08356626878921, - "mru": 0.000011871883404573001, - "ozd": 1.0337418496863485e-7, - "pco": 0.014218708576989184, - "pma": 2.744677504062268e-7, - "swe": 0.022505615643301485, - "tre": 0.11658690468750123, - "wtu": 2.35191350274551, - "ecs": 1143.8639031360874, - "pef": 624.098287254228 + "acd": 0.03234773724061794, + "cch": 3.43787244111404, + "etf": 132.75231339546556, + "etf-c": 253.6149947317547, + "fru": 83.41172944196327, + "fwe": 0.0012579831233006803, + "htc": 3.9330555054153785e-9, + "htc-c": 1.136219718335209e-9, + "htn": 2.5149998198809928e-8, + "htn-c": 3.342143468793868e-8, + "ior": 12.849147053933349, + "ldu": 100.07478605512826, + "mru": 0.00001187188448261368, + "ozd": 1.0337418678886518e-7, + "pco": 0.014211319206122458, + "pma": 2.7446774718177436e-7, + "swe": 0.022505614922485564, + "tre": 0.1165869099516617, + "wtu": 2.3519122041423595, + "ecs": 1142.3217572802848, + "pef": 624.4024093341452 } }, { @@ -188,63 +153,27 @@ "airTransportRatio=1" ], "impacts": { - "acd": 0.17191777308291448, - "cch": 28.538386449582482, - "etf": 403.5534247612614, - "etf-c": 934.6755681241924, - "fru": 305.53756017608885, - "fwe": 0.005633025303477838, - "htc": 1.2405391705950967e-8, - "htc-c": 6.18122720598352e-9, - "htn": 2.147242044493958e-7, - "htn-c": 9.015920973192776e-8, - "ior": 16.54558122597707, - "ldu": 271.79968244617976, - "mru": 0.00012993706600417844, - "ozd": 0.00008035518721291681, - "pco": 0.09649762426760249, - "pma": 0.0000018851659734231127, - "swe": 0.07863250004223703, - "tre": 0.48854214594340006, - "wtu": 6.253609274282903, - "ecs": 4591.6117903663435, - "pef": 2795.4686913481846 - } - }, - { - "name": "Jean 100% coton naturel, Turquie", - "query": [ - "mass=0.45", - "product=jean", - "fabricProcess=weaving", - "materials[]=ei-coton;1", - "countryFabric=TR", - "countryDyeing=TR", - "countryMaking=TR", - "fading=true" - ], - "impacts": { - "acd": 0.19496824715783034, - "cch": 26.759719143175857, - "etf": 399.3132679073461, - "etf-c": 994.0072897114582, - "fru": 269.9197382949202, - "fwe": 0.013135843120805, - "htc": 1.2870457158038291e-8, - "htc-c": 6.046176305094514e-9, - "htn": 1.733967909353147e-7, - "htn-c": 9.717713118384634e-8, - "ior": 16.251663557536894, - "ldu": 313.52676812062714, - "mru": 0.00013246025629646985, - "ozd": 0.00008240911347570446, - "pco": 0.08209606904956485, - "pma": 0.000001952520570863601, - "swe": 0.0856224706188067, - "tre": 0.45913718462591685, - "wtu": 6.852480892284013, - "ecs": 4727.584129434572, - "pef": 2858.0861753836784 + "acd": 0.17191776791802527, + "cch": 28.538385122580024, + "etf": 401.6726601263405, + "etf-c": 932.76726081306, + "fru": 305.53756053281336, + "fwe": 0.005633025262418831, + "htc": 1.34709257086876e-8, + "htc-c": 6.181135863777437e-9, + "htn": 2.1416307205817783e-7, + "htn-c": 9.015243836000086e-8, + "ior": 16.545581112655317, + "ldu": 271.7702038006188, + "mru": 0.00012993706846199763, + "ozd": 0.00008035518721662526, + "pco": 0.0964767990312508, + "pma": 0.0000018851658995838431, + "swe": 0.07863249737078243, + "tre": 0.48854215822961294, + "wtu": 6.253604341286705, + "ecs": 4587.494233202928, + "pef": 2796.039975532669 } }, { @@ -260,27 +189,27 @@ "fading=false" ], "impacts": { - "acd": 0.16646017956782644, - "cch": 22.879178368242588, - "etf": 390.1456775807663, - "etf-c": 984.0749101539045, - "fru": 233.48514310083218, - "fwe": 0.011127703819799214, - "htc": 1.1744054814893857e-8, - "htc-c": 4.894635092425342e-9, - "htn": 1.4363939214056022e-7, - "htn-c": 9.563648076098458e-8, - "ior": 16.22632047738496, - "ldu": 294.1840496310243, - "mru": 0.00013035906133172692, - "ozd": 0.00008238143726818768, - "pco": 0.06988459465174668, - "pma": 0.0000015227470457985697, - "swe": 0.07904133924856241, - "tre": 0.4199064630455665, - "wtu": 6.760515566278536, - "ecs": 4426.914344460029, - "pef": 2525.157047689932 + "acd": 0.1664601789156855, + "cch": 22.87917795051884, + "etf": 388.06063632388924, + "etf-c": 981.9586033525842, + "fru": 233.48514631558538, + "fwe": 0.011127704590406032, + "htc": 1.3046189599233988e-8, + "htc-c": 4.894535717871939e-9, + "htn": 1.4295009002043327e-7, + "htn-c": 9.562877380813141e-8, + "ior": 16.226320426264856, + "ldu": 294.1537752791369, + "mru": 0.00013035906445679608, + "ozd": 0.00008238143727278753, + "pco": 0.06986220371308176, + "pma": 0.0000015227470393339052, + "swe": 0.07904133728785925, + "tre": 0.41990648106800055, + "wtu": 6.760514005359902, + "ecs": 4422.348908242551, + "pef": 2525.931139841305 } }, { @@ -296,27 +225,27 @@ "reparability=1.15" ], "impacts": { - "acd": 0.040947160149247784, - "cch": 6.020701956249272, - "etf": 135.78900205151768, - "etf-c": 283.51321048507714, - "fru": 108.6350507389818, - "fwe": 0.0015733111263051323, - "htc": 3.738578351692862e-9, - "htc-c": 1.3872597680236832e-9, - "htn": 3.130465194657146e-8, - "htn-c": 3.394789226206709e-8, - "ior": 13.317990301220913, - "ldu": 105.23255671822369, - "mru": 0.000048106569616382006, - "ozd": 0.000030295918999428996, - "pco": 0.017755685651354356, - "pma": 3.558623580234299e-7, - "swe": 0.025306657195578727, - "tre": 0.12504221221166, - "wtu": 2.3980964862351737, - "ecs": 1401.079098395078, - "pef": 852.7913691316962 + "acd": 0.04094716004467842, + "cch": 6.020701797320939, + "etf": 135.07297679838496, + "etf-c": 282.7857946660227, + "fru": 108.63505044633327, + "fwe": 0.0015733111388660495, + "htc": 4.200428738927075e-9, + "htc-c": 1.3872274119208886e-9, + "htn": 3.106534007516346e-8, + "htn-c": 3.3945101391026917e-8, + "ior": 13.317990258540677, + "ldu": 105.2220733785658, + "mru": 0.0000481065707610554, + "ozd": 0.00003029591900137675, + "pco": 0.017748088709759528, + "pma": 3.55862354981669e-7, + "swe": 0.02530665647693498, + "tre": 0.1250422175716538, + "wtu": 2.398095035819664, + "ecs": 1399.5099442192766, + "pef": 853.0750428888641 } }, { @@ -331,27 +260,27 @@ "makingWaste=0" ], "impacts": { - "acd": 0.03515341117555045, - "cch": 5.252900371584849, - "etf": 115.70338427950517, - "etf-c": 241.36148939715773, - "fru": 100.12009913155448, - "fwe": 0.0013599531678901153, - "htc": 3.2175663683017604e-9, - "htc-c": 1.2101642149173232e-9, - "htn": 2.727681405568267e-8, - "htn-c": 2.8926698640265072e-8, - "ior": 13.169817649242683, - "ldu": 90.92989613362748, - "mru": 0.00004143076684583559, - "ozd": 0.00002576313038871996, - "pco": 0.015386730643937313, - "pma": 3.080836844070077e-7, - "swe": 0.02162950077214327, - "tre": 0.10704876572145422, - "wtu": 2.0515959089024456, - "ecs": 1242.1625430398944, - "pef": 764.0073474658005 + "acd": 0.03515341109416683, + "cch": 5.252900238252441, + "etf": 115.09256314998147, + "etf-c": 240.7409746916511, + "fru": 100.12009883754094, + "fwe": 0.0013599531794897999, + "htc": 3.6026683215963667e-9, + "htc-c": 1.2101356250904956e-9, + "htn": 2.7073798871761118e-8, + "htn-c": 2.8924322805276785e-8, + "ior": 13.169817609439457, + "ldu": 90.92061218034702, + "mru": 0.00004143076785550451, + "ozd": 0.000025763130390441016, + "pco": 0.015380199088967834, + "pma": 3.0808368197688924e-7, + "swe": 0.021629500163487102, + "tre": 0.10704877032874369, + "wtu": 2.0515945711105963, + "ecs": 1240.8239178656167, + "pef": 764.2384356926611 } }, { @@ -366,63 +295,27 @@ "makingWaste=0.25" ], "impacts": { - "acd": 0.04609715923697874, - "cch": 6.703192253728761, - "etf": 153.6428845155289, - "etf-c": 320.98140700767215, - "fru": 116.20389661225052, - "fwe": 0.001762962644896259, - "htc": 4.201700114707176e-9, - "htc-c": 1.5446780374515596e-9, - "htn": 3.4884952294028174e-8, - "htn-c": 3.8411175481446677e-8, - "ior": 13.44969932520156, - "ldu": 117.94603279342037, - "mru": 0.0000540406165235344, - "ozd": 0.00003432506443117035, - "pco": 0.019861423435725067, - "pma": 3.9833229012691655e-7, - "swe": 0.028575240683076916, - "tre": 0.14103638686962075, - "wtu": 2.7060969994198234, - "ecs": 1542.3382587107967, - "pef": 931.7104995013814 - } - }, - { - "name": "Robe coton 9kppm, 300g/m² France", - "query": [ - "mass=0.3", - "product=tshirt", - "materials[]=ei-coton;1", - "countryFabric=FR", - "countryDyeing=FR", - "countryMaking=FR", - "picking=9000", - "surfaceMass=300" - ], - "impacts": { - "acd": 0.07179838793190436, - "cch": 10.516654081983287, - "etf": 239.11018133346673, - "etf-c": 499.62769769169125, - "fru": 175.63493266541343, - "fwe": 0.002755166104250066, - "htc": 6.512459089998315e-9, - "htc-c": 2.3842499199092752e-9, - "htn": 5.384438258446115e-8, - "htn-c": 5.978803659177539e-8, - "ior": 22.77203692533042, - "ldu": 185.22014066324124, - "mru": 0.00008401983311143018, - "ozd": 0.00005345903170339494, - "pco": 0.03097798143817123, - "pma": 6.217506747638934e-7, - "swe": 0.04452196281687977, - "tre": 0.2196505548019769, - "wtu": 4.2015677450610545, - "ecs": 2441.682294173816, - "pef": 1468.2132147865102 + "acd": 0.046097159111799846, + "cch": 6.703192072048492, + "etf": 152.8333444858548, + "etf-c": 320.15896797657535, + "fru": 116.20389632081532, + "fwe": 0.001762962658311604, + "htc": 4.731771332109925e-9, + "htc-c": 1.5446423335479048e-9, + "htn": 3.4613376700409983e-8, + "htn-c": 3.840801568947151e-8, + "ior": 13.449699279963982, + "ldu": 117.93448333253805, + "mru": 0.00005404061778821173, + "ozd": 0.00003432506443331962, + "pco": 0.01985287948379659, + "pma": 3.9833228654147325e-7, + "swe": 0.028575239866666446, + "tre": 0.14103639289868497, + "wtu": 2.706095448894393, + "ecs": 1540.564189866974, + "pef": 932.0409159521554 } }, { @@ -438,27 +331,27 @@ "printing=pigment" ], "impacts": { - "acd": 0.07306792884847084, - "cch": 10.786309873553689, - "etf": 239.69274424945215, - "etf-c": 511.9951958266947, - "fru": 184.7694804793395, - "fwe": 0.0028554521517683558, - "htc": 6.590378548015632e-9, - "htc-c": 2.45281244042113e-9, - "htn": 5.544773865900382e-8, - "htn-c": 6.014907721306291e-8, - "ior": 23.05013495896086, - "ldu": 186.4753840041616, - "mru": 0.00008457660535093935, - "ozd": 0.00005346959268974566, - "pco": 0.031786495229857256, - "pma": 6.367642320829064e-7, - "swe": 0.04557133006008848, - "tre": 0.2216507330089366, - "wtu": 4.218678725192593, - "ecs": 2494.994679014393, - "pef": 1500.5474792306345 + "acd": 0.07306792865215882, + "cch": 10.786309590327345, + "etf": 238.4312677056276, + "etf-c": 510.7136326979624, + "fru": 184.76948002935933, + "fwe": 0.0028554521726487105, + "htc": 7.416026635116858e-9, + "htc-c": 2.4527568559252084e-9, + "htn": 5.5024755379047716e-8, + "htn-c": 6.014415618767906e-8, + "ior": 23.050134888730284, + "ldu": 186.4568981615751, + "mru": 0.00008457660731936167, + "ozd": 0.000053469592693088116, + "pco": 0.03177316955131011, + "pma": 6.367642264757967e-7, + "swe": 0.045571328788311355, + "tre": 0.2216507423983879, + "wtu": 4.2186763170199235, + "ecs": 2492.230192913127, + "pef": 1501.0619000212293 } }, { @@ -474,27 +367,27 @@ "printing=substantive" ], "impacts": { - "acd": 0.07358652532550262, - "cch": 10.815742988475913, - "etf": 239.7995331322814, - "etf-c": 504.94576328192426, - "fru": 185.64410517826187, - "fwe": 0.002880775709801625, - "htc": 6.604315483571971e-9, - "htc-c": 2.4652013942855755e-9, - "htn": 5.574219706746126e-8, - "htn-c": 5.995698798484122e-8, - "ior": 23.090717913556556, - "ldu": 186.64323618904862, - "mru": 0.00008480944213787278, - "ozd": 0.00005346831112123995, - "pco": 0.03186907408107042, - "pma": 6.401113856435828e-7, - "swe": 0.045629500817958725, - "tre": 0.22192531068270466, - "wtu": 4.221483187683524, - "ecs": 2483.5997196573276, - "pef": 1505.1426430274853 + "acd": 0.07358652513022386, + "cch": 10.815742705492104, + "etf": 238.53787258299204, + "etf-c": 503.66401488322197, + "fru": 185.64410472245137, + "fwe": 0.002880775730794797, + "htc": 7.429032065729056e-9, + "htc-c": 2.4651456769234172e-9, + "htn": 5.531927240908784e-8, + "htn-c": 5.995206660493097e-8, + "ior": 23.09071784287966, + "ldu": 186.6247491034684, + "mru": 0.00008480944411082097, + "ozd": 0.0000534683111245907, + "pco": 0.031855741323767, + "pma": 6.401113800574663e-7, + "swe": 0.045629499546495866, + "tre": 0.22192532007824095, + "wtu": 4.221480766230091, + "ecs": 2480.8348291693446, + "pef": 1505.6558514006967 } }, { @@ -510,62 +403,27 @@ "printing=pigment;0.5" ], "impacts": { - "acd": 0.07477517447937593, - "cch": 11.13310933842311, - "etf": 240.56658862343028, - "etf-c": 530.5464430292, - "fru": 197.20818801337742, - "fwe": 0.00294252369580311, - "htc": 6.707257735041608e-9, - "htc-c": 2.555656221188913e-9, - "htn": 5.785277277081782e-8, - "htn-c": 6.069063814499417e-8, - "ior": 23.466409977593276, - "ldu": 188.08183936827675, - "mru": 0.00008514419277594706, - "ozd": 0.00005347834816710268, - "pco": 0.03276397004381298, - "pma": 6.554784367801162e-7, - "swe": 0.04585391369358409, - "tre": 0.2244119534774611, - "wtu": 4.2443451953899, - "ecs": 2568.4726714975122, - "pef": 1541.2828229145937 - } - }, - { - "name": "T-shirt 100% coton France, remanufacturé", - "query": [ - "mass=0.17", - "product=tshirt", - "materials[]=ei-coton;1", - "countryFabric=FR", - "countryDyeing=FR", - "countryMaking=FR", - "upcycled=true" - ], - "impacts": { - "acd": 0.0029684389160825604, - "cch": 1.0533507809876295, - "etf": 2.611699490013451, - "etf-c": 3.470506252261882, - "fru": 74.43874194730016, - "fwe": 0.0001807903624435816, - "htc": 3.845977063038087e-10, - "htc-c": 2.9631160106200145e-10, - "htn": 6.417546290440587e-9, - "htn-c": 6.418271715724139e-10, - "ior": 13.355919010592899, - "ldu": 10.559703146213762, - "mru": 0.000004828921846527799, - "ozd": 8.344478356276785e-8, - "pco": 0.0024607649057391493, - "pma": 4.609038147994612e-8, - "swe": 0.0009839518757980366, - "tre": 0.006500693075677745, - "wtu": 0.13074518638023463, - "ecs": 321.4493132956767, - "pef": 312.4315514782177 + "acd": 0.07477517429377221, + "cch": 11.133109057710293, + "etf": 239.3032051138794, + "etf-c": 529.2629598298704, + "fru": 197.20818750297397, + "fwe": 0.002942523717852656, + "htc": 7.523252043630827e-9, + "htc-c": 2.5555992597156337e-9, + "htn": 5.743039702362758e-8, + "htn-c": 6.068571344542781e-8, + "ior": 23.466409902737205, + "ldu": 188.06334064375554, + "mru": 0.00008514419479127408, + "ozd": 0.00005347834817053128, + "pco": 0.032750571003609855, + "pma": 6.554784313905723e-7, + "swe": 0.04585391242506393, + "tre": 0.22441196292997495, + "wtu": 4.244342649580219, + "ecs": 2565.703994479362, + "pef": 1541.7846786523041 } } ] diff --git a/tests/server.spec.js b/tests/server.spec.js index 2ef7d289b..b5a48ca92 100644 --- a/tests/server.spec.js +++ b/tests/server.spec.js @@ -325,8 +325,8 @@ describe("API", () => { const response = await makeRequest("/api/textile/simulator/detailed", successQuery); expectStatus(response, 200); - expect(response.body.impacts.ecs).toBeCloseTo(1574.39, 1); - expect(response.body.impactsWithoutDurability.ecs).toBeCloseTo(1054.84, 1); + expect(response.body.impacts.ecs).toBeCloseTo(1573.4, 1); + expect(response.body.impactsWithoutDurability.ecs).toBeCloseTo(1054.18, 1); }); }); @@ -570,11 +570,11 @@ describe("API", () => { // Add tolerance check for impacts Object.entries(impacts).forEach(([key, value]) => { - expect(response.body.results.total[key]).toBeCloseTo(value, 12); + expect(response.body.results.total[key]).toBeCloseTo(value, 10); }); Object.entries(scoring).forEach(([key, value]) => { - expect(response.body.results.scoring[key]).toBeCloseTo(value, 12); + expect(response.body.results.scoring[key]).toBeCloseTo(value, 10); }); }); }