AGRIBALYSECommunity workspaceGitHub

AGRIBALYSE 3.2: import and build

We ran the same AGRIBALYSE 3.2 import on ecoinvent 3.9.1 using two source files. The climate check asks whether at least 99% of comparable foods fall within 5% of ADEME’s published result.

AGRIBALYSE 3.2 inputFoods within 5% of ADEMEOutside tolerance99% target
Distributable source2,163 of 2,450 (88.3%)287Missed
Full licensed source2,446 of 2,450 (99.8%)4Passed

The distributable file omits 210 processes that ADEME adapted from ecoinvent. Where reconstruction is incomplete, the import can link to an unmodified supplier or leave an input unlinked. The full licensed file retains those adaptations. Why the source changed · See the verification run.

Both inputs produced a local Brightway export. The distributable input also passed the strip-and-refill check. The exporter stopped the full-source inventory from being packaged for sharing because it still contains licensed ecoinvent blocks.

The replay below follows the distributable source through all six stages. Select Score for its climate check or Export for the strip-and-refill test.

Recorded import run

All stages completed

Unmet requirement Climate change within 5% of ADEME for at least 99% of products.

Import run of , 12:49 UTC, on commit 2f7f8f3. Not a run on GitHub. It ran on a machine of its own, GitHub holds no record of it, and what is shown here is what the run wrote about itself.

  1. 1ADEME's exportunder 1 s
  2. 2Licensed files0 s
  3. 3Registry1 min 56 s
  4. 4Link1 min 26 s
  5. 5Score53 s
  6. 6Export1 min 34 s

Step 1 of 6 · completed · under 1 s

ADEME's export, as it is shipped

The repository holds ADEME's export of the release without the ecoinvent datasets it carried. The run unpacks it, compares it with the checksum recorded beside it and counts its processes. Nothing in it is changed.

processes
17,966
ecoinvent datasets taken out
2,474
bytes shipped
3,079,372
  • Checked against source/agribalyse-3.2-stripped-ecoinvent-processes.json: checksum 54dc5fcd61f6. Nothing in the export is changed.

Step 2 of 6 · completed · 0 s

Read the licensed inputs

The run reads the ecoinvent and method snapshots already prepared on the licensed machine, plus the harmonised flow list. It computes a checksum for each.

local background and method files
4
harmonised flow list
1

Step 3 of 6 · completed · 1 min 56 s

One registry of every mapping

Every mapping, flow list and factor table is put into one registry. Every later stage reads the registry.

Step 4 of 6 · completed · 1 min 26 s

Assemble the linked inventory

The import applies the curated changes, resolves supplier and elementary-flow links and records how many exchanges reach the scoring package.

activities
40,359
products
40,359
biosphere flows
4,221

Step 5 of 6 · completed · 53 s

Scored and compared with ADEME's results

Every mapped product is scored with the 19 headline EF 3.1 methods, and each score is compared with ADEME's reference value.

climate scores within 5%
2,163
climate scores compared
2,450
  • 2,163 of 2,450 climate scores are within 5% of ADEME (88.3%). The acceptance target is 99%.

Step 6 of 6 · completed · 1 min 34 s

Export, strip and refill

The run creates a local Brightway package, strips licensed columns from the scoring package, and checks the refilled matrices and impact scores against the original.

  • Passed — stripped package: nothing on the columns to refill, no copied ecoinvent block.
  • Passed — stripped package: no correction value on the columns to refill.
  • Passed — refilled package equals the original, entry for entry.
  • Passed — bundle scores equal adapter scores within 1e-05.
What the run printed · 2f7f8f3
[ADEME's export] source/AGB32_ecoinvent_free.CSV.xz: 3,079,372 bytes as shipped
[ADEME's export] unpacked: 94,867,858 bytes, sha256 54dc5fcd61f65bdbd0f73fbf7aded26f964f73ea2efcb93f7d741cdc87cdf559
[ADEME's export] 17,966 processes in the export; 2,474 ecoinvent datasets were taken out before it was shipped
[ADEME's export] the export is the file its manifest records
[Licensed files] Read ecoinvent-3.9.1-cutoff-exchanges.parquet (SHA-256 aed537db96dcba777522f38ba682e7e4a26f295dd9454256a08aa730cd6c5497).
[Licensed files] Read ecoinvent-3.9.1-cutoff-activities.json (SHA-256 bf11607864959d8d59f62bdec9f6cc4f8181a28d9951aeb29d635a6413ba2fae).
[Licensed files] Read ecoinvent-3.9.1-biosphere-flows.json (SHA-256 452361c68319f705f3154b3879925cf6e4774ab81a13e63e7783de403f8e7bd6).
[Licensed files] Read ef-v31-methods.json (SHA-256 e32076acde952f90a1995f9cbff3a28a5e4b8b8680ae3cd4a5326e6d14c29edd).
[Licensed files] Read harmonised-flows-simple.json.gz (SHA-256 47850016a251ca00d4f806f305293eaa735e3cb59219ea2a27ef7ceb12028271).
[Registry] worktree adapter
[Registry] worktree adapter finished in 2.2 s (exit 0).
[Registry] environment adapter
[Registry] environment adapter finished in 23.3 s (exit 0).
[Registry] imports own code adapter
[Registry] imports own code adapter finished in 0.1 s (exit 0).
[Registry] umfpack adapter
[Registry] umfpack adapter finished in 0.6 s (exit 0).
[Registry] dds-fetch-harmonised-flows
[Registry] dds-fetch-harmonised-flows finished in 43.2 s (exit 0).
[Registry] dds-build-registry
[Registry] dds-build-registry finished in 23.3 s (exit 0).
[Registry] dds-build-ef-flows-registry
[Registry] dds-build-ef-flows-registry finished in 3.1 s (exit 0).
[Registry] dds-build-biosphere-catalog
[Registry] dds-build-biosphere-catalog finished in 1.8 s (exit 0).
[Registry] dds-build-method-cfs-registry
[Registry] dds-build-method-cfs-registry finished in 16.8 s (exit 0).
[Registry] dds-build-ecoinvent-catalog
[Registry] dds-build-ecoinvent-catalog finished in 1.3 s (exit 0).
[Link] dds-link-all
[Link] dds-link-all finished in 85.5 s (exit 0).
[Link] 40,359 activities
[Link] 40,359 products
[Link] 4,221 biosphere flows
[Score] dds-backtest --solver scipy
[Score] dds-backtest --solver scipy finished in 52.8 s (exit 0).
[Score] backtest summary
[Score] backtest summary finished in 0.3 s (exit 0).
[Score] FAIL  climate change within 5% of ADEME for at least 99% of products
[Score] 2,163 of 2,450 climate scores are within 5% of ADEME (88.3%). The acceptance target is 99%.
[Export] dds-build-bw-package
[Export] dds-build-bw-package finished in 10.3 s (exit 0).
[Export] worktree bundle
[Export] worktree bundle finished in 9.8 s (exit 0).
[Export] environment bundle
[Export] environment bundle finished in 17.0 s (exit 0).
[Export] imports own code bundle
[Export] imports own code bundle finished in 29.9 s (exit 0).
[Export] umfpack bundle
[Export] umfpack bundle finished in 0.1 s (exit 0).
[Export] dds-build-skeleton
[Export] dds-build-skeleton finished in 2.2 s (exit 0).
[Export] check skeleton
[Export] check skeleton finished in 0.3 s (exit 0).
[Export] PASS  stripped package: nothing on the columns to refill, no copied ecoinvent block
[Export] PASS  stripped package: no correction value on the columns to refill
[Export] refill
[Export] refill finished in 4.3 s (exit 0).
[Export] compare refilled with original
[Export] compare refilled with original finished in 2.7 s (exit 0).
[Export] PASS  refilled package equals the original, entry for entry
[Export] bundle dashboard build
[Export] bundle dashboard build finished in 17.3 s (exit 0).
[Export] compare bundle scores with adapter scores
[Export] compare bundle scores with adapter scores finished in 0.3 s (exit 0).
[Export] PASS  bundle scores equal adapter scores within 1e-05
Import run: 6 stages completed, 1 acceptance checks failed.
Did it work
All 6 stages completed. The run recorded an unmet requirement.
What is blocking
  • Climate change within 5% of ADEME for at least 99% of products.
  • The full Brightway package was written locally. The stripped scoring package was refilled from the licensed snapshot and checked against the original.
What was in it
AGRIBALYSE 3.2 with ecoinvent 3.9.1 cut-off, scored against ADEME’s EF 3.1 reference results.

Compare results

67 lines, exactly as the run printed them, each with its time since the start. It ended with status 1. The replay shortens the waits and changes nothing else. SHA-256 of the lines: 0e4c73ef0bd5. The same record as a file: api/v1/last-run.json.

Download and reproduce the inventories

Download the foreground inventory and rebuild kit (ZIP) · Download the patched foreground exchanges (compressed CSV)

The kit contains the 17,966-process source export, the patched foreground and the expected food scores. Extract it and follow README.txt to reconnect your own ecoinvent 3.9.1 cut-off background. The second download contains the linked foreground exchanges after patching. Its rows identify the AGRIBALYSE process, the product or elementary-flow row and the signed matrix coefficient. The row identifiers match the locally rebuilt scoring package.

Download ADEME and patched results side by side (CSV). ADEME's values in it: source ADEME, AGRIBALYSE 3.2 food spreadsheet, last updated 21 August 2025, Licence Ouverte / Etalab Open Licence 2.0.

What you need

The source register identifies the public inputs. Case F7 traces the elementary flow list from a user’s question to the download command used to prepare the import.

WhatWhere it comes from
ADEME's export of AGRIBALYSE 3.2In the repository, without the ecoinvent datasets it carried: source/AGB32_ecoinvent_free.CSV.xz. Source: ADEME, AGRIBALYSE 3.2 SimaPro export of 8 November 2024, Licence Ouverte / Etalab Open Licence 2.0.
The list of elementary flowsdds-fetch-harmonised-flows downloads it once (Brightway Flows, under the ODbL).
ecoinvent 3.9.1Your own licence. The repository holds no ecoinvent data, and a guard refuses to commit any.
The EF 3.1 methodsRead by the import from their published sources.
The importThis repository: the code, the curated mappings and the tests.

Import and build it yourself

git clone https://github.com/sentier-dev/sentier-agribalyse.git
cd sentier-agribalyse
uv sync --extra test

Every command runs AGRIBALYSE 4.0 unless told otherwise: add --agribalyse-version 3.2 to each, or set DDS_AGRIBALYSE_VERSION=3.2 in .env. Then follow the steps below. AGRIBALYSE-3.2.md is the guide to this release, BOOTSTRAP.md covers the files that come from your ecoinvent licence, and the import reference has every command with its options.

The steps, from ADEME's export to a build

StageWhat happensWhat it needs
1. ADEME's exportThe shipped export is unpacked, compared with the checksum recorded beside it, and its processes are counted. The checksum and process count are checked against the manifest.Nothing but the repository
2. Licensed filesThe run reads the background and method snapshots prepared under the local licence, as BOOTSTRAP.md describes.An ecoinvent 3.9.1 licence
3. Registrydds-build-registry and the four builders after it put every mapping, flow list and factor table under source/ into one registry. Every later stage reads the registry.The files of stage 2
4. Linkdds-link-all reads ADEME's export, applies the curated mappings and resolves supplier and elementary-flow links. It writes the linked system and a report of the run.The registry
5. Scoredds-backtest scores every mapped product with the 19 headline EF 3.1 methods and compares each score with ADEME's reference value. dds-compare-cfs and dds-build-flow-decomp write the data of the dashboard, which shows each score beside ADEME's.The linked system
6. Exportdds-build-bw-package writes a local Brightway package. dds-build-skeleton strips the licensed columns from a separate scoring package. The run refills it and compares its matrices and scores with the original.The linked system

Keep what the build was made from beside it: the release, the hashes of the source files, the background version, the method source, the mappings and any parameter overrides. How builds are checked says what the checks on a build cover and what they do not.

See Mapping for the rules the import applies and Inventory quality for the evidence about the resulting inventory.

What stays on your machine

  • ADEME's full export, with the ecoinvent datasets it carries, and everything derived from the ecoinvent background: the snapshots, the factor tables keyed by ecoinvent flows, the scoring caches and the Brightway package.
  • Anything from a release that ADEME has not published.

The repository's .gitignore and its pre-commit guard keep these files out of a commit. Data and terms says which terms apply to what.

Apply a contribution

A contribution is applied in your own build, beside the unchanged one. Work in a separate checkout with its own source, cache, registry and output folders. Keep the background, the units, the allocation, the boundary, the geography and the method the same in both builds, unless the contribution is about one of them. Application and testing describes the comparison.