openepd 3.5.0__py3-none-any.whl → 4.0.0__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 = "3.5.0"
16
+ VERSION = "4.0.0"
@@ -14,8 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  from openepd.api.base_sync_client import BaseApiMethodGroup
17
- from openepd.api.pcr.dto import PcrRef
18
- from openepd.model.pcr import Pcr
17
+ from openepd.model.pcr import Pcr, PcrRef
19
18
 
20
19
 
21
20
  class PcrApi(BaseApiMethodGroup):
openepd/model/org.py CHANGED
@@ -35,7 +35,7 @@ class OrgRef(BaseOpenEpdSchema):
35
35
  )
36
36
  ref: ReferenceStr | None = pyd.Field(
37
37
  default=None,
38
- example="https://buildingtransparency.org/ec3/epds/1u7zsed8",
38
+ example="https://openepd.buildingtransparency.org/api/orgs/c-change-labs.com",
39
39
  description="Reference to this Org's JSON object",
40
40
  )
41
41
 
@@ -50,15 +50,14 @@ class Org(WithAttachmentsMixin, WithAltIdsMixin, OrgRef):
50
50
  )
51
51
  # TODO: NEW field, not in the spec
52
52
 
53
- owner: Optional["Org"] = pyd.Field(description="Organization that controls this organization", default=None)
54
- subsidiaries: Annotated[list[str], pyd.conlist(pyd.constr(max_length=200), max_items=255)] | None = pyd.Field(
53
+ owner: Optional["OrgRef"] = pyd.Field(description="Organization that controls this organization", default=None)
54
+ subsidiaries: Annotated[list["OrgRef"], pyd.conlist(pyd.constr(max_length=200), max_items=255)] | None = pyd.Field(
55
55
  description="Organizations controlled by this organization",
56
- example=["cqd.io", "supplychaincarbonpricing.org"],
57
56
  default=None,
58
57
  )
59
58
  hq_location: Location | None = pyd.Field(
60
59
  default=None,
61
- description="Location of a place of business, prefereably the corporate headquarters.",
60
+ description="Location of a place of business, preferably the corporate headquarters.",
62
61
  )
63
62
 
64
63
 
openepd/model/pcr.py CHANGED
@@ -19,7 +19,7 @@ from typing import Annotated, Optional
19
19
 
20
20
  from openepd.compat.pydantic import pyd
21
21
  from openepd.model.base import BaseOpenEpdSchema
22
- from openepd.model.common import WithAltIdsMixin, WithAttachmentsMixin
22
+ from openepd.model.common import Amount, WithAltIdsMixin, WithAttachmentsMixin
23
23
  from openepd.model.org import Org
24
24
 
25
25
 
@@ -33,6 +33,26 @@ class PcrStatus(StrEnum):
33
33
  Sunset = "Sunset"
34
34
 
35
35
 
36
+ class PcrRef(BaseOpenEpdSchema):
37
+ """Reference to a PCR."""
38
+
39
+ id: str | None = pyd.Field(
40
+ description="The unique ID for this PCR. To ensure global uniqueness, should be registered "
41
+ "at open-xpd-uuid.cqd.io/register or a coordinating registry.",
42
+ example="ec3xpgq2",
43
+ default=None,
44
+ )
45
+ name: str | None = pyd.Field(
46
+ max_length=200,
47
+ description="Full document name as listed in source document",
48
+ example="c-PCR-003 Concrete and concrete elements (EN 16757)",
49
+ )
50
+ ref: pyd.AnyUrl | None = pyd.Field(
51
+ description="Reference to this PCR's JSON object",
52
+ example="https://openepd.buildingtransparency.org/api/pcrs/1u7zsed8",
53
+ )
54
+
55
+
36
56
  class Pcr(WithAttachmentsMixin, WithAltIdsMixin, BaseOpenEpdSchema):
37
57
  """Represent a PCR (Product Category Rules)."""
38
58
 
@@ -60,6 +80,11 @@ class Pcr(WithAttachmentsMixin, WithAltIdsMixin, BaseOpenEpdSchema):
60
80
  description="A shortened name without boilerplate text.",
61
81
  example="Concrete and Concrete Elements",
62
82
  )
83
+ declared_units: list[Amount] | None = pyd.Field(
84
+ description="SI declared units for this PCR. If a functional unit is "
85
+ "utilized, the declared unit shall refer to the amount of "
86
+ "product associated with the A1-A3 life cycle stage."
87
+ )
63
88
  version: str | None = pyd.Field(
64
89
  description="Document version, as expressed in document.",
65
90
  example="1.0.2",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openepd
3
- Version: 3.5.0
3
+ Version: 4.0.0
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=UGmZGEyMnASrYwEBPHuXmVzHiuCUskUsJEPoHTIo-lg,620
2
- openepd/__version__.py,sha256=S-UVY3pxTAdvnVu4GmvsqiCW4DMirgcRUYEGiITe44A,638
2
+ openepd/__version__.py,sha256=9t1ToCvhFbSr7mGIm2JugiAa52g5zZ6EQH3fsTUcmiI,638
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
@@ -17,8 +17,7 @@ openepd/api/epd/dto.py,sha256=NZ76vfUkCEkwDibQd2QCEQP5DZms_NFc9tjoP-mcw3o,4874
17
17
  openepd/api/epd/sync_api.py,sha256=5wuPiM_zVciVtTvsGaaRdf7T6q2CUp7QMZCW0DAjQng,7072
18
18
  openepd/api/errors.py,sha256=Pcg2JqjLoUXUFJTVdIFbd8rgjGoAT5HpnivTpFRACVU,2159
19
19
  openepd/api/pcr/__init__.py,sha256=UGmZGEyMnASrYwEBPHuXmVzHiuCUskUsJEPoHTIo-lg,620
20
- openepd/api/pcr/dto.py,sha256=QhRAgJG22JmlELAY6ogWpatLfEEmp49F2q4uz-3ZuVE,1432
21
- openepd/api/pcr/sync_api.py,sha256=LdJki4t_pEXPJuSnzh8LhN0kZibA8mYEgwf_3hpu0YE,1588
20
+ openepd/api/pcr/sync_api.py,sha256=Riu77h8uLJngKpITOiXYmO7mzjAHpYskUJ6ynyfNG78,1557
22
21
  openepd/api/sync_client.py,sha256=kVirNhExF92vr2VXnzxNFVUJwnbgC_VR8vzV47twQKQ,2287
23
22
  openepd/api/test/__init__.py,sha256=UGmZGEyMnASrYwEBPHuXmVzHiuCUskUsJEPoHTIo-lg,620
24
23
  openepd/api/utils.py,sha256=FSY2W8zTXGTvJAJACMi4nibpo-9m1HXkTCH8kdAYlzQ,875
@@ -37,8 +36,8 @@ openepd/model/common.py,sha256=aa_bfotPybPoYyzHtwj5E5X1T-fCEyznMfVUWvpUhiM,5460
37
36
  openepd/model/epd.py,sha256=_PyVM3cKrOBS2vgLLPBZzKkNfiBEtp2rECP0imp49bc,14082
38
37
  openepd/model/factory.py,sha256=i45ZXG5RIMKrXvVH1li0ZlUwcBpSl5gEctcLc1MBM7M,1701
39
38
  openepd/model/lcia.py,sha256=x3NI71UB8t07LTmnf-HL9Q2nSXqN96I9zORzDvof86M,16948
40
- openepd/model/org.py,sha256=Y7gSyB0nUY2mG4Q8sHtd9yJfPUFQop_yuCh-73zArDE,3796
41
- openepd/model/pcr.py,sha256=wlsTVXtzlFZzBPgrm9gfn22aIzzTzBgiq7uum4byjSw,4403
39
+ openepd/model/org.py,sha256=FHcYh2WOOQrCMyzm0Ow-iP79jMTBPcneidjH6NXIklA,3760
40
+ openepd/model/pcr.py,sha256=SwqLWMj9k_jqIzxz5mh6ttqvtLCspKSpywF5YTBOMsA,5397
42
41
  openepd/model/specs/README.md,sha256=W5LSMpZuW5x36cKS4HRfeFsClsRf8J9yHMMICghdc0s,862
43
42
  openepd/model/specs/__init__.py,sha256=CfuCZKFE6xysags8XY9VlW-o_zHEyCu9fGekoj-RJOg,4959
44
43
  openepd/model/specs/asphalt.py,sha256=kyv-WvqujYD5xqi-lS2nSculXLQAuuBbJU_YRCb-5ug,3332
@@ -88,7 +87,7 @@ openepd/model/validation/numbers.py,sha256=tgirqrDGgrSo6APGlW1ozNuVV8mJz_4HCAXS2
88
87
  openepd/model/validation/quantity.py,sha256=j1s2G0vVePveeCzHOqz2W0CicPfZgWzFdg4ZFC5OmGA,7306
89
88
  openepd/model/versioning.py,sha256=R_zm6rCrgF3vlJQYbpyWhirdS_Oek16cv_mvZmpuE8I,4473
90
89
  openepd/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
91
- openepd-3.5.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
92
- openepd-3.5.0.dist-info/METADATA,sha256=gBFcXyDcFEWPR3zAdEPLxb6AjmELuXQpT-tmMz48Ekw,7790
93
- openepd-3.5.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
94
- openepd-3.5.0.dist-info/RECORD,,
90
+ openepd-4.0.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
91
+ openepd-4.0.0.dist-info/METADATA,sha256=UA4MKE056z9tXOIVSuemeI-6qd11JCLvYjSnWbiP3LA,7790
92
+ openepd-4.0.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
93
+ openepd-4.0.0.dist-info/RECORD,,
openepd/api/pcr/dto.py DELETED
@@ -1,37 +0,0 @@
1
- #
2
- # Copyright 2024 by C Change Labs Inc. www.c-change-labs.com
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
16
- from openepd.api.dto.base import BaseOpenEpdApiModel
17
- from openepd.compat.pydantic import pyd
18
-
19
-
20
- class PcrRef(BaseOpenEpdApiModel):
21
- """Reference to a PCR."""
22
-
23
- id: str | None = pyd.Field(
24
- description="The unique ID for this PCR. To ensure global uniqueness, should be registered "
25
- "at open-xpd-uuid.cqd.io/register or a coordinating registry.",
26
- example="ec3xpgq2",
27
- default=None,
28
- )
29
- name: str | None = pyd.Field(
30
- max_length=200,
31
- description="Full document name as listed in source document",
32
- example="c-PCR-003 Concrete and concrete elements (EN 16757)",
33
- )
34
- ref: pyd.AnyUrl | None = pyd.Field(
35
- description="Reference to this PCR's JSON object",
36
- example="https://openepd.buildingtransparency.org/api/pcrs/1u7zsed8",
37
- )