Skip to content

Say what a score rests on beside its contributions and its sensitivity - #778

Merged
ccomb merged 3 commits into
mainfrom
basis-on-every-score
Oct 31, 2026
Merged

ccomb merged 3 commits into
mainfrom
basis-on-every-score

Conversation

@ccomb

@ccomb ccomb commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Since #774 a score says what it rests on. Its contributions did not, yet they are quoted alone as often: "transport, 0.74 kg CO2 eq of the score", read from get_contributing_activities without score_activity first.

Now basis comes with:

  • the contributing flows and activities of an impact category (REST and MCP);
  • the contributing flows and activities of a single score (REST and MCP);
  • the baseline of a sensitivity sweep: baseline.basis over REST, basis from compute_sensitivity.

What is left out, on purpose: aggregate and compare_activities give inventory amounts with no method, and the reduced model is a formula, not a figure.

  • One way to read it: solutionBasis reads the basis off a solved score, the databases its chain reached. The score routes and get_impacts now use it too, instead of each spelling it out.
  • The sensitivity tool scores the root's database alone (its own description says "root DB only"), so its basis names that database alone. The REST sweep goes through the dependencies, and its basis names them.

Wire revision 102. pyvolca decodes basis on ContributingFlows and ContributingActivities; SensitivityResult.baseline already did, being an LCIAResult.

Checks: cabal build all --ghc-options=-Werror, cabal test lca-tests, fourmolu, hlint (with the partials gate), and pytest on pyvolca.

ccomb added 2 commits October 30, 2026 22:40
The contributions of a score are quoted alone as often as the score:
"transport, 0.74 kg CO2 eq of it". The flows and the activities a score
breaks down into, by impact category or by single score, and the
baseline of a sensitivity sweep now carry the same basis as the score,
so such a figure keeps what says whether it can be set beside another.

One function reads the basis off a solved score, the databases its chain
reached; the score routes, the impacts tool and these all use it. The
sensitivity tool scores the root's database alone, so its basis names
that database alone. Wire revision 101.
The sensitivity tool now names its root-only solution once and reads both its cut-offs and its basis off it. The description of the sweep no longer says the basis names the root alone, since the REST route it also documents reads the dependencies. The score basis keeps its documentation, the new function now following it.
@ccomb ccomb added the agent-reviewed pr-cycle ran label Oct 30, 2026
@ccomb
ccomb merged commit e5ef96a into main Oct 31, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-reviewed pr-cycle ran

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant