Skip to content

Add new create methods for metrics and EPDs - #396

Merged
IsakNaslundBh merged 11 commits into
developfrom
LifeCycleAssessment_Toolkit-#394-AddNewCreateMethodsForMetrics
Oct 23, 2026
Merged

IsakNaslundBh merged 11 commits into
developfrom
LifeCycleAssessment_Toolkit-#394-AddNewCreateMethodsForMetrics

Conversation

@IsakNaslundBh

@IsakNaslundBh IsakNaslundBh commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Issues addressed by this PR

Closes #394

Adds two new Create methods

  • New method for creating IEnvironmentalMetric based on a provided MetricType. Three overloads, one for just creating it, one for creating it with factors provided as a dictionary, and one for creating it with two lists with ocrresponding modules and indicators
  • One for creating a EPD with climatechange metrics set.

First one could ideally help simplify work done in things like adapters and similar, and help with more dynamic creation of metrics when for example a string or similar is known and can be turned into a MetricType enum

Second method is to help when generating EPDs more "By hand" for a list of written out values in for example excel or similar.

Also corrected a foldername that was incorrectly named (named after an old name ofr a interface).

Test files

Tests in unit-test project

Changelog

Additional comments

Adds a method that allow creation a metric based on a type and a provided dictionary of the factors.

Usefull for adapters and similar to more easily generate the correct metric on the fly, without the need to hard-code for each type.
…uc and biogenic metrics and set of modules

Usefull for manual creation of EPDs based on table
Removing the need to create a dictionary first, as well as allowing to create an empty one if downstream processes wants to handle the indicator assignments somewhere else.

Also adding a 2-list input that allows for providing a list of modules as well as a list of factors
Folder was referencing an old interface name. Folder name should match the base interface for the types returned.

This has no impact on the code as the namespace stays as it was
@IsakNaslundBh IsakNaslundBh self-assigned this Oct 15, 2026
@IsakNaslundBh IsakNaslundBh added the type:feature New capability or enhancement label Oct 15, 2026
@IsakNaslundBh IsakNaslundBh changed the title Life cycle assessment toolkit #394 add new create methods for metrics Add new create methods for metrics and EPDs Oct 15, 2026
@IsakNaslundBh

Copy link
Copy Markdown
Contributor Author

@BHoMBot check core

@bhombot-ci

bhombot-ci Bot commented Oct 15, 2026

Copy link
Copy Markdown

@IsakNaslundBh to confirm, the following actions are now queued:

  • check core

@bhombot-ci

bhombot-ci Bot commented Oct 16, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 116784670876 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 640 additional annotations waiting, made up of 0 errors and 640 warnings.

@Tom-Kingstone Tom-Kingstone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and tests pass

@Tom-Kingstone

Copy link
Copy Markdown
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci

bhombot-ci Bot commented Oct 23, 2026

Copy link
Copy Markdown

@Tom-Kingstone to confirm, the following actions are now queued:

  • check ready-to-merge

There are 26 requests in the queue ahead of you.

@IsakNaslundBh
IsakNaslundBh merged commit fced474 into develop Oct 23, 2026
41 of 47 checks passed
@IsakNaslundBh
IsakNaslundBh deleted the LifeCycleAssessment_Toolkit-#394-AddNewCreateMethodsForMetrics branch October 23, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New capability or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New create methods for metrics

2 participants