feat(model): add harmonization extension models and validation (v6) - #305
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new openepd.model.ext.harmonization extension package that models “harmonization factors” (coproducts, EAC, MBVFA, offsets, plus custom factors), enabling typed parsing/serialization via Epd.ext["harmonization"].
Changes:
- Introduces harmonization factor model types and enums, all sharing a common base structure for impacts/resource uses/output flows.
- Adds
HarmonizationEpdExtensionwith support for a bounded number of custom (extra) harmonization factor objects. - Adds unittest coverage for parsing, enum validation, schema constraints, and custom-factor behavior.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/openepd/model/ext/init.py | Declares the openepd.model.ext package. |
| src/openepd/model/ext/harmonization/init.py | Public exports for the harmonization extension package. |
| src/openepd/model/ext/harmonization/base.py | Shared base models for harmonization factors and lifecycle-module amounts. |
| src/openepd/model/ext/harmonization/coproducts.py | Coproduct allocation basis enum and factor model. |
| src/openepd/model/ext/harmonization/custom.py | Custom harmonization factor model (extra fields allowed). |
| src/openepd/model/ext/harmonization/eac.py | EAC standard/coverage enums and factor model (with aliased fields). |
| src/openepd/model/ext/harmonization/ext.py | Top-level HarmonizationEpdExtension model + custom-factor parsing/validation. |
| src/openepd/model/ext/harmonization/mbvfa.py | MBVFA tracking approach/attribute enums and factor model. |
| src/openepd/model/ext/harmonization/offsets.py | Offset coverage/standard enums and factor model. |
| src/openepd/model/ext/harmonization/tests/init.py | Declares the harmonization tests package. |
| src/openepd/model/ext/harmonization/tests/test_harmonization_ext.py | Unittests validating parse/serialize and validation constraints. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
alexlitvinenko
force-pushed
the
feat/harmonization-ext-v6
branch
from
August 13, 2026 12:08
c7a5b3c to
b83d676
Compare
corvis
approved these changes
Aug 13, 2026
Introduce a harmonization extension package with factor modules for coproducts, custom, EAC, MBVFA, and offsets. Add extension wiring and tests for harmonization behavior. asana: [[BE] Support harmonization EPD extension](https://app.asana.com/1/654700433662128/project/666075018299960/task/1217139741601651?focus=true)
alexlitvinenko
force-pushed
the
feat/harmonization-ext-v6
branch
from
August 13, 2026 14:23
b83d676 to
aa6e2da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a harmonization extension package with factor modules for coproducts, custom, EAC, MBVFA, and offsets.
Add extension wiring and tests for harmonization behavior.
asana: [BE] Support harmonization EPD extension