openepd 4.10.0__py3-none-any.whl → 4.10.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
openepd/__version__.py CHANGED
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- VERSION = "4.10.0"
16
+ VERSION = "4.10.1"
@@ -57,7 +57,7 @@ class BaseDeclaration(RootDocument, abc.ABC):
57
57
  kg_per_declared_unit: Amount | None = pyd.Field(
58
58
  default=None,
59
59
  description="Mass of the product, in kilograms, per declared unit",
60
- example=Amount(qty=12.5, unit="kg"),
60
+ example=Amount(qty=12.5, unit="kg").to_serializable(exclude_unset=True),
61
61
  )
62
62
  compliance: list[Standard] = pyd.Field(
63
63
  description="Standard(s) to which this document is compliant.", default_factory=list
@@ -129,7 +129,8 @@ class AverageDatasetMixin(pyd.BaseModel, title="Average Dataset"):
129
129
  )
130
130
 
131
131
  geography: list[Geography] | None = pyd.Field(
132
- "Jurisdiction(s) in which the LCA result is applicable. An empty array, or absent properties, implies global applicability."
132
+ description="Jurisdiction(s) in which the LCA result is applicable. An empty array, or absent properties, "
133
+ "implies global applicability.",
133
134
  )
134
135
 
135
136
 
@@ -79,13 +79,7 @@ GenericEstimatePreview = GenericEstimatePreviewV0
79
79
 
80
80
 
81
81
  class GenericEstimateV0(GenericEstimatePreviewV0, WithLciaMixin, WithAltIdsMixin, title="Generic Estimate (Full)"):
82
- """
83
- Full Generic Estimate object.
84
-
85
- This is considered the most complete valid openEPD object for GenericEstimate. In addition to it, several related
86
- models are defined, either with fewer fields (to be used in APIs for list requests) or with more relaxed structure
87
- to support related entities matching.
88
- """
82
+ """Full Generic Estimate object."""
89
83
 
90
84
  _FORMAT_VERSION = OpenEpdVersions.Version0.as_str()
91
85
 
@@ -98,10 +92,6 @@ class GenericEstimateWithDepsV0(GenericEstimateV0, title="Generic Estimate (with
98
92
  Expanded version of the GenericEstimate.
99
93
 
100
94
  Contains related entities - orgs - with full fields, to support object matching in implementations.
101
-
102
- For now the implementation matches the above GenericEstimate entity, but they will diverge as normal GE would have
103
- some required fields in Org (like web_domain), and WithDeps would not.
104
-
105
95
  """
106
96
 
107
97
  publisher: Org | None = pyd.Field(description="Organization that published the LCA results.")
openepd/model/lcia.py CHANGED
@@ -322,6 +322,16 @@ class LCIAMethod(StrEnum):
322
322
  class Impacts(pyd.BaseModel):
323
323
  """List of environmental impacts, compiled per one of the standard Impact Assessment methods."""
324
324
 
325
+ class Config:
326
+ # pydantic schema generator gets lost in this structure, so we need to re-establish it manually for openapi
327
+ schema_extra = {
328
+ "properties": {
329
+ str(lm): {"description": str(lm), "allOf": [{"$ref": "#/components/schemas/ImpactSet"}]}
330
+ for lm in LCIAMethod
331
+ },
332
+ "additionalProperties": None,
333
+ }
334
+
325
335
  __root__: dict[LCIAMethod, ImpactSet]
326
336
 
327
337
  def set_unknown_lcia(self, impact_set: ImpactSet):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openepd
3
- Version: 4.10.0
3
+ Version: 4.10.1
4
4
  Summary: Python library to work with OpenEPD format
5
5
  Home-page: https://github.com/cchangelabs/openepd
6
6
  License: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  openepd/__init__.py,sha256=Shkfh0Kun0YRhmRDw7LkUj2eQL3X-HnP55u2THOEALw,794
2
- openepd/__version__.py,sha256=v1iT7lM1VsfdI_pF-s9H_ZXF4x586x50rlNgWCMNKuA,639
2
+ openepd/__version__.py,sha256=KzFp1gnpC3_rR0ckYMYd34Zk_3-GVjuHpo3hjsuUjP4,639
3
3
  openepd/api/__init__.py,sha256=UGmZGEyMnASrYwEBPHuXmVzHiuCUskUsJEPoHTIo-lg,620
4
4
  openepd/api/base_sync_client.py,sha256=jviqtQgsOVdRq5x7_Yh_Tg8zIdWtVTIUqNCgebf6YDg,20925
5
5
  openepd/api/category/__init__.py,sha256=UGmZGEyMnASrYwEBPHuXmVzHiuCUskUsJEPoHTIo-lg,620
@@ -33,13 +33,13 @@ openepd/model/__init__.py,sha256=UGmZGEyMnASrYwEBPHuXmVzHiuCUskUsJEPoHTIo-lg,620
33
33
  openepd/model/base.py,sha256=o6miTbb4d2BRQ6epN5Jn8mIMkAeoAucd_3op7aEMELc,9044
34
34
  openepd/model/category.py,sha256=IQXNGQFQmFZ_H9PRONloX_UOSf1sTMDq1rM1yz8JR0Y,1639
35
35
  openepd/model/common.py,sha256=aa_bfotPybPoYyzHtwj5E5X1T-fCEyznMfVUWvpUhiM,5460
36
- openepd/model/declaration.py,sha256=zV1Xpv3a5jsQ62oN4Kg3gXFqsDpGr-9CncVwHB3ZugA,8578
36
+ openepd/model/declaration.py,sha256=w-wC5G8QmO8JxnUyMKfrKARer3VIMbs_vQr3SP_BdCE,8638
37
37
  openepd/model/epd.py,sha256=RtUeDq1869JJe5fUu-aP31jl_HRAO21NXcLQvRYmQLs,9030
38
38
  openepd/model/factory.py,sha256=XP7eeQNW5tqwX_4hfuEb3lK6BFQDb4KB0fSN0r8-lCU,2656
39
- openepd/model/generic_estimate.py,sha256=xPZmzYzSrHLPSL_2evtAycQFOJAec_3fEPAKaxbppsM,4424
39
+ openepd/model/generic_estimate.py,sha256=0bS3IXJliheYLBhN6aeSpe-rkKYFCegvwUiBzElCLC0,3938
40
40
  openepd/model/geography.py,sha256=G3Oz3QBw5n-RiSCAv-vAGxrOZBhwIT5rASnPlo9dkcs,42095
41
41
  openepd/model/industry_epd.py,sha256=t6s9JrfHJVJo_egQt6RdyE9u3t8rZi32efM-MoaV8ag,3234
42
- openepd/model/lcia.py,sha256=sDZIxyggqHIISCUocgvIEgkmqPLGNSEA3-zUd7TEgsw,18430
42
+ openepd/model/lcia.py,sha256=bnDVsEo429Go_EneVOkXYIxDu2soxrgxyfzU4OhDR3Q,18827
43
43
  openepd/model/org.py,sha256=FHcYh2WOOQrCMyzm0Ow-iP79jMTBPcneidjH6NXIklA,3760
44
44
  openepd/model/pcr.py,sha256=SwqLWMj9k_jqIzxz5mh6ttqvtLCspKSpywF5YTBOMsA,5397
45
45
  openepd/model/specs/README.md,sha256=W5LSMpZuW5x36cKS4HRfeFsClsRf8J9yHMMICghdc0s,862
@@ -94,7 +94,7 @@ openepd/model/validation/quantity.py,sha256=kzug0MZ3Ao0zeVzN-aleyxUg5hA_7D5tNOOe
94
94
  openepd/model/versioning.py,sha256=R_zm6rCrgF3vlJQYbpyWhirdS_Oek16cv_mvZmpuE8I,4473
95
95
  openepd/patch_pydantic.py,sha256=xrkzblatmU9HBzukWkp1cPq9ZSuohoz1p0pQqVKSlKs,4122
96
96
  openepd/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
97
- openepd-4.10.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
98
- openepd-4.10.0.dist-info/METADATA,sha256=JFHSPXma_sUGfRJJjmbq_UJF6Cn_G8D-AmaSRErL3N4,8535
99
- openepd-4.10.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
100
- openepd-4.10.0.dist-info/RECORD,,
97
+ openepd-4.10.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
98
+ openepd-4.10.1.dist-info/METADATA,sha256=VGCrT0N2HBiCDYtXUnqW1BFWZ_KycJKBuhlz4f8QzX8,8535
99
+ openepd-4.10.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
100
+ openepd-4.10.1.dist-info/RECORD,,