openepd 7.7.0__tar.gz → 7.9.0__tar.gz
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-7.7.0 → openepd-7.9.0}/PKG-INFO +1 -1
- {openepd-7.7.0 → openepd-7.9.0}/pyproject.toml +5 -1
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/__version__.py +1 -1
- openepd-7.9.0/src/openepd/constants/scope_phases.py +168 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/common.py +9 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/declaration.py +3 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/lcia.py +1 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/org.py +30 -2
- openepd-7.9.0/src/openepd/utils/functional.py +36 -0
- openepd-7.9.0/src/openepd/utils/mapping/__init__.py +15 -0
- {openepd-7.7.0 → openepd-7.9.0}/LICENSE +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/README.md +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/average_dataset/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/average_dataset/generic_estimate_sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/average_dataset/industry_epd_sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/base_sync_client.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/category/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/category/dto.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/category/sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/common.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/dto/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/dto/base.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/dto/common.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/dto/meta.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/dto/mf.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/dto/params.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/epd/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/epd/dto.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/epd/sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/errors.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/org/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/org/sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/pcr/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/pcr/sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/plant/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/plant/sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/standard/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/standard/sync_api.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/sync_client.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/test/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/utils.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/bundle/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/bundle/base.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/bundle/model.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/bundle/reader.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/bundle/writer.py +0 -0
- {openepd-7.7.0/src/openepd/model → openepd-7.9.0/src/openepd/constants}/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/m49/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/m49/const.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/m49/utils.py +0 -0
- {openepd-7.7.0/src/openepd/model/specs/range/mixins → openepd-7.9.0/src/openepd/model}/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/base.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/category.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/epd.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/factory.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/generic_estimate.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/geography.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/industry_epd.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/pcr.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/README.md +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/asphalt.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/base.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/concrete.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/enums.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/accessories.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/aggregates.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/aluminium.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/asphalt.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/bulk_materials.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/cast_decks_and_underlayment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/cladding.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/cmu.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/concrete.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/conveying_equipment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/electrical.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/electrical_transmission_and_distribution_equipment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/electricity.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/exterior_improvements.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/finishes.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/fire_and_smoke_protection.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/furnishings.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/grouting.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/manufacturing_inputs.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/masonry.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/material_handling.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/mechanical.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/mechanical_insulation.py +0 -0
- {openepd-7.7.0/src/openepd/model/specs/singular → openepd-7.9.0/src/openepd/model/specs/range}/mixins/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/mixins/access_flooring_mixin.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/network_infrastructure.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/openings.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/other_electrical_equipment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/other_materials.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/plumbing.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/precast_concrete.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/sheathing.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/steel.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/thermal_moisture_protection.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/utility_piping.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/wood.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/wood_joists.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/accessories.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/aggregates.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/aluminium.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/asphalt.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/bulk_materials.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/cast_decks_and_underlayment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/cladding.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/cmu.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/common.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/concrete.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/conveying_equipment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/deprecated/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/deprecated/concrete.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/deprecated/steel.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/electrical.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/electrical_transmission_and_distribution_equipment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/electricity.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/exterior_improvements.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/finishes.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/fire_and_smoke_protection.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/furnishings.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/grouting.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/manufacturing_inputs.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/masonry.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/material_handling.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/mechanical.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/mechanical_insulation.py +0 -0
- {openepd-7.7.0/src/openepd/model/validation → openepd-7.9.0/src/openepd/model/specs/singular/mixins}/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/mixins/access_flooring_mixin.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/mixins/conduit_mixin.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/network_infrastructure.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/openings.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/other_electrical_equipment.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/other_materials.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/plumbing.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/precast_concrete.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/sheathing.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/steel.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/thermal_moisture_protection.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/utility_piping.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/wood.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/wood_joists.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/standard.py +0 -0
- {openepd-7.7.0/src/openepd/utils → openepd-7.9.0/src/openepd/model/validation}/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/validation/common.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/validation/enum.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/validation/numbers.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/validation/quantity.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/versioning.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/py.typed +0 -0
- {openepd-7.7.0/src/openepd/utils/mapping → openepd-7.9.0/src/openepd/utils}/__init__.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/utils/mapping/common.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/utils/mapping/geography.py +0 -0
- {openepd-7.7.0 → openepd-7.9.0}/src/openepd/utils/markdown.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "openepd"
|
3
|
-
version = "7.
|
3
|
+
version = "7.9.0"
|
4
4
|
license = "Apache-2.0"
|
5
5
|
description = "Python library to work with OpenEPD format"
|
6
6
|
authors = ["C-Change Labs <support@c-change-labs.com>"]
|
@@ -173,3 +173,7 @@ extend-ignore = [
|
|
173
173
|
"D212", # We want to require second line for multiline docstrings
|
174
174
|
]
|
175
175
|
extend-select = ["S", "E", "B", "A", "EM", "UP", "LOG", "G", "I", "D"]
|
176
|
+
|
177
|
+
[build-system]
|
178
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
179
|
+
build-backend = "poetry.core.masonry.api"
|
@@ -0,0 +1,168 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2025 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
|
+
__all__ = ["ScopePhases"]
|
17
|
+
|
18
|
+
|
19
|
+
from enum import StrEnum
|
20
|
+
|
21
|
+
from openepd.utils.functional import classproperty
|
22
|
+
|
23
|
+
|
24
|
+
# noinspection PyMethodParameters
|
25
|
+
class ScopePhases(StrEnum):
|
26
|
+
"""Container of common way to specify known scope phases under OpenEPD standard."""
|
27
|
+
|
28
|
+
A1 = "A1"
|
29
|
+
A2 = "A2"
|
30
|
+
A3 = "A3"
|
31
|
+
A1A2A3 = "A1A2A3"
|
32
|
+
A4 = "A4"
|
33
|
+
A5 = "A5"
|
34
|
+
|
35
|
+
B1 = "B1"
|
36
|
+
B2 = "B2"
|
37
|
+
B3 = "B3"
|
38
|
+
B4 = "B4"
|
39
|
+
B5 = "B5"
|
40
|
+
B6 = "B6"
|
41
|
+
B7 = "B7"
|
42
|
+
|
43
|
+
C1 = "C1"
|
44
|
+
C2 = "C2"
|
45
|
+
C3 = "C3"
|
46
|
+
C4 = "C4"
|
47
|
+
|
48
|
+
D = "D"
|
49
|
+
|
50
|
+
@classproperty
|
51
|
+
def a1a2a3(cls) -> str:
|
52
|
+
return cls.A1A2A3.lower()
|
53
|
+
|
54
|
+
@classproperty
|
55
|
+
def a1(cls) -> str:
|
56
|
+
return cls.A1.lower()
|
57
|
+
|
58
|
+
@classproperty
|
59
|
+
def a2(cls) -> str:
|
60
|
+
return cls.A2.lower()
|
61
|
+
|
62
|
+
@classproperty
|
63
|
+
def a3(cls) -> str:
|
64
|
+
return cls.A3.lower()
|
65
|
+
|
66
|
+
@classproperty
|
67
|
+
def a4(cls) -> str:
|
68
|
+
return cls.A4.lower()
|
69
|
+
|
70
|
+
@classproperty
|
71
|
+
def a5(cls) -> str:
|
72
|
+
return cls.A5.lower()
|
73
|
+
|
74
|
+
@classproperty
|
75
|
+
def b1(cls) -> str:
|
76
|
+
return cls.B1.lower()
|
77
|
+
|
78
|
+
@classproperty
|
79
|
+
def b2(cls) -> str:
|
80
|
+
return cls.B2.lower()
|
81
|
+
|
82
|
+
@classproperty
|
83
|
+
def b3(cls) -> str:
|
84
|
+
return cls.B3.lower()
|
85
|
+
|
86
|
+
@classproperty
|
87
|
+
def b4(cls) -> str:
|
88
|
+
return cls.B4.lower()
|
89
|
+
|
90
|
+
@classproperty
|
91
|
+
def b5(cls) -> str:
|
92
|
+
return cls.B5.lower()
|
93
|
+
|
94
|
+
@classproperty
|
95
|
+
def b6(cls) -> str:
|
96
|
+
return cls.B6.lower()
|
97
|
+
|
98
|
+
@classproperty
|
99
|
+
def b7(cls) -> str:
|
100
|
+
return cls.B7.lower()
|
101
|
+
|
102
|
+
@classproperty
|
103
|
+
def c1(cls) -> str:
|
104
|
+
return cls.C1.lower()
|
105
|
+
|
106
|
+
@classproperty
|
107
|
+
def c2(cls) -> str:
|
108
|
+
return cls.C2.lower()
|
109
|
+
|
110
|
+
@classproperty
|
111
|
+
def c3(cls) -> str:
|
112
|
+
return cls.C3.lower()
|
113
|
+
|
114
|
+
@classproperty
|
115
|
+
def c4(cls) -> str:
|
116
|
+
return cls.C4.lower()
|
117
|
+
|
118
|
+
@classproperty
|
119
|
+
def d(cls) -> str:
|
120
|
+
return cls.D.lower()
|
121
|
+
|
122
|
+
@classmethod
|
123
|
+
def a_scopes(cls, *, lowercase: bool = False) -> tuple[str, ...]:
|
124
|
+
result = (ScopePhases.A1A2A3, ScopePhases.A1, ScopePhases.A2, ScopePhases.A3, ScopePhases.A4, ScopePhases.A5)
|
125
|
+
if lowercase:
|
126
|
+
return cls._lowercase(result)
|
127
|
+
return result
|
128
|
+
|
129
|
+
@classmethod
|
130
|
+
def b_scopes(cls, *, lowercase: bool = False) -> tuple[str, ...]:
|
131
|
+
result = (
|
132
|
+
ScopePhases.B1,
|
133
|
+
ScopePhases.B2,
|
134
|
+
ScopePhases.B3,
|
135
|
+
ScopePhases.B4,
|
136
|
+
ScopePhases.B5,
|
137
|
+
ScopePhases.B6,
|
138
|
+
ScopePhases.B7,
|
139
|
+
)
|
140
|
+
if lowercase:
|
141
|
+
return cls._lowercase(result)
|
142
|
+
|
143
|
+
return result
|
144
|
+
|
145
|
+
@classmethod
|
146
|
+
def c_scopes(cls, *, lowercase: bool = False) -> tuple[str, ...]:
|
147
|
+
result = (ScopePhases.C1, ScopePhases.C2, ScopePhases.C3, ScopePhases.C4)
|
148
|
+
if lowercase:
|
149
|
+
return cls._lowercase(result)
|
150
|
+
return result
|
151
|
+
|
152
|
+
@classmethod
|
153
|
+
def d_scopes(cls, *, lowercase: bool = False) -> tuple[str, ...]:
|
154
|
+
result = (ScopePhases.D,)
|
155
|
+
if lowercase:
|
156
|
+
return cls._lowercase(result)
|
157
|
+
return result
|
158
|
+
|
159
|
+
@classmethod
|
160
|
+
def all_scopes(cls, *, lowercase: bool = False) -> tuple[str, ...]:
|
161
|
+
result = cls.a_scopes() + cls.b_scopes() + cls.c_scopes() + cls.d_scopes()
|
162
|
+
if lowercase:
|
163
|
+
return cls._lowercase(result)
|
164
|
+
return result
|
165
|
+
|
166
|
+
@classmethod
|
167
|
+
def _lowercase(cls, scopes: tuple[str, ...]) -> tuple[str, ...]:
|
168
|
+
return tuple(scope.lower() for scope in scopes)
|
@@ -21,6 +21,15 @@ import pydantic_core
|
|
21
21
|
|
22
22
|
from openepd.model.base import BaseOpenEpdSchema
|
23
23
|
|
24
|
+
DATA_URL_REGEX = r"^data:([-\w]+\/[-+\w.]+)?(;?\w+=[-\w]+)*(;base64)?,.*$"
|
25
|
+
"""
|
26
|
+
Regular expression pattern for matching Data URLs.
|
27
|
+
|
28
|
+
A Data URL is a URI scheme that allows you to embed small data items inline
|
29
|
+
in web pages as if they were external resources.
|
30
|
+
The pattern matches the following format: data:[<media-type>][;base64],<data>
|
31
|
+
"""
|
32
|
+
|
24
33
|
|
25
34
|
class Amount(BaseOpenEpdSchema):
|
26
35
|
"""A value-and-unit pairing for amounts that do not have an uncertainty."""
|
@@ -232,6 +232,9 @@ class WithVerifierMixin(pydantic.BaseModel):
|
|
232
232
|
examples=["john.doe@example.com"],
|
233
233
|
default=None,
|
234
234
|
)
|
235
|
+
third_party_verifier_name: str | None = pydantic.Field(
|
236
|
+
description="The publishable name of the third party verifier", examples=["John Doe"], default=None
|
237
|
+
)
|
235
238
|
|
236
239
|
|
237
240
|
class WithEpdDeveloperMixin(pydantic.BaseModel):
|
@@ -13,16 +13,26 @@
|
|
13
13
|
# See the License for the specific language governing permissions and
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
|
-
|
16
|
+
import math
|
17
|
+
import re
|
18
|
+
from typing import Any, Final, Optional
|
17
19
|
|
18
20
|
from openlocationcode import openlocationcode
|
19
21
|
import pydantic
|
20
22
|
from pydantic import ConfigDict
|
21
23
|
|
22
24
|
from openepd.model.base import BaseOpenEpdSchema
|
23
|
-
from openepd.model.common import Location, WithAltIdsMixin, WithAttachmentsMixin
|
25
|
+
from openepd.model.common import DATA_URL_REGEX, Location, WithAltIdsMixin, WithAttachmentsMixin
|
24
26
|
from openepd.model.validation.common import ReferenceStr
|
25
27
|
|
28
|
+
ORG_LOGO_MAX_LENGTH: Final[int] = math.ceil(32 * 1024 * 4 / 3)
|
29
|
+
"""
|
30
|
+
Maximum length of Org.logo field.
|
31
|
+
|
32
|
+
Logo file size must be less than 32KB. Base64 encoding overhead (approximately 33%) requires
|
33
|
+
limiting the encoded string length to 4/3 of the file size limit.
|
34
|
+
"""
|
35
|
+
|
26
36
|
|
27
37
|
class OrgRef(BaseOpenEpdSchema):
|
28
38
|
"""Represents Organisation with minimal data."""
|
@@ -121,6 +131,24 @@ class Org(WithAttachmentsMixin, WithAltIdsMixin, OrgRef):
|
|
121
131
|
default=None,
|
122
132
|
description="Location of a place of business, preferably the corporate headquarters.",
|
123
133
|
)
|
134
|
+
logo: pydantic.AnyUrl | None = pydantic.Field(
|
135
|
+
default=None,
|
136
|
+
description=(
|
137
|
+
"URL pointer to, or dataURL, for a square logo for the company, preferably 300x300 pixels."
|
138
|
+
"A logo of the type used on social media platforms such as LinkedIn is recommended."
|
139
|
+
),
|
140
|
+
examples=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA", "https://example.com/logo.png"],
|
141
|
+
)
|
142
|
+
|
143
|
+
@pydantic.field_validator("logo")
|
144
|
+
def _validate_logo(cls, v: pydantic.AnyUrl | None) -> pydantic.AnyUrl | None:
|
145
|
+
if v and len(v) > ORG_LOGO_MAX_LENGTH:
|
146
|
+
msg = f"Logo URL must not exceed {ORG_LOGO_MAX_LENGTH} characters"
|
147
|
+
raise ValueError(msg)
|
148
|
+
if v and v.scheme == "data" and not re.compile(DATA_URL_REGEX).match(str(v)):
|
149
|
+
msg = "Invalid data URL format"
|
150
|
+
raise ValueError(msg)
|
151
|
+
return v
|
124
152
|
|
125
153
|
|
126
154
|
class PlantRef(BaseOpenEpdSchema):
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2025 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
|
+
|
17
|
+
# Portions of this file are sourced from https://github.com/django/django/blob/main/django/utils/functional.py
|
18
|
+
# Copyright (c) Django Software Foundation and individual contributors.
|
19
|
+
# Licensed under the BSD 3-Clause License.
|
20
|
+
|
21
|
+
# noinspection PyPep8Naming
|
22
|
+
class classproperty:
|
23
|
+
"""
|
24
|
+
Decorator that converts a method with a single cls argument into a property
|
25
|
+
that can be accessed directly from the class.
|
26
|
+
""" # noqa: D205
|
27
|
+
|
28
|
+
def __init__(self, method=None):
|
29
|
+
self.fget = method
|
30
|
+
|
31
|
+
def __get__(self, instance, cls=None):
|
32
|
+
return self.fget(cls)
|
33
|
+
|
34
|
+
def getter(self, method):
|
35
|
+
self.fget = method
|
36
|
+
return self
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2025 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
|
+
#
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/api/average_dataset/generic_estimate_sync_api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0/src/openepd/model/specs/range/mixins → openepd-7.9.0/src/openepd/model}/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/cast_decks_and_underlayment.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/mixins/access_flooring_mixin.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/range/thermal_moisture_protection.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/cast_decks_and_underlayment.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/fire_and_smoke_protection.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/mixins/access_flooring_mixin.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/other_electrical_equipment.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openepd-7.7.0 → openepd-7.9.0}/src/openepd/model/specs/singular/thermal_moisture_protection.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|