labfreed 1.0.0a11__tar.gz → 1.0.0a13__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.
Potentially problematic release.
This version of labfreed might be problematic. Click here for more details.
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/PKG-INFO +1 -1
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/__init__.py +1 -1
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/app_infrastructure.py +1 -1
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_cat/predefined_categories.py +23 -2
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id_resolver/cit_v1.py +10 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id_resolver/cit_v2.py +11 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id_resolver/resolver.py +2 -2
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/.github/workflows/pypi-publish.yml +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/.github/workflows/run-tests.yml +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/CHANGELOG.md +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/LICENSE +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/README.md +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/formatted_print.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/pac_info/html_renderer/external-link.svg +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/pac_info/html_renderer/macros.jinja.html +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/pac_info/html_renderer/pac-info-style.css +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/pac_info/html_renderer/pac_info.jinja.html +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/pac_info/html_renderer/pac_info_card.jinja.html +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/pac_info/pac_info.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_infrastructure.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/api_data_models/request.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/api_data_models/response.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/api_data_models/server_capabilities_response.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/client/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/client/attribute_cache.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/client/client.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/pythonic/attribute_server_factory.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/pythonic/excel_attribute_data_source.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/pythonic/py_attributes.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/pythonic/py_dict_data_source.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/server/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/server/attribute_data_sources.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/server/server.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/server/translation_data_sources.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/well_knonw_attribute_keys.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_cat/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_cat/category_base.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_cat/pac_cat.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id/extension.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id/id_segment.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id/pac_id.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id/url_parser.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id/url_serializer.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id_resolver/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id_resolver/cit_common.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_id_resolver/services.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/qr/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/qr/generate_qr.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/pythonic/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/pythonic/data_table.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/pythonic/pyTREX.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/pythonic/quantity.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/table_segment.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/trex.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/trex_base_models.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/trex/value_segments.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/utilities/base36.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/utilities/ensure_utc_time.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/utilities/translations.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_extensions/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_extensions/default_extension_interpreters.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_extensions/display_name_extension.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_extensions/trex_extension.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_keys/gs1/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_keys/labfreed/well_known_keys.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_keys/unece/__init__.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_keys/unece/unece_units.py +0 -0
- {labfreed-1.0.0a11 → labfreed-1.0.0a13}/pyproject.toml +0 -0
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/labfreed_extended/app/app_infrastructure.py
RENAMED
|
@@ -39,7 +39,7 @@ class Labfreed_App_Infrastructure():
|
|
|
39
39
|
cit = cit_from_str(cit)
|
|
40
40
|
if not cit:
|
|
41
41
|
raise ValueError('the cit could not be parsed. Neither as v1 or v2')
|
|
42
|
-
self._resolver._cits.
|
|
42
|
+
self._resolver._cits.add(cit)
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
def process_pac(self, pac_url, markup=None):
|
|
@@ -207,7 +207,7 @@ class Processor_Abstract(PredefinedCategory, ABC):
|
|
|
207
207
|
|
|
208
208
|
@model_validator(mode='after')
|
|
209
209
|
def _validate_mandatory_fields(self):
|
|
210
|
-
if not self.
|
|
210
|
+
if not self.processor_instance:
|
|
211
211
|
self._add_validation_message(
|
|
212
212
|
source=f"Category {self.key}",
|
|
213
213
|
level = ValidationMsgLevel.ERROR,
|
|
@@ -233,6 +233,26 @@ class Processor_Misc(Processor_Abstract):
|
|
|
233
233
|
''' Category segments, which are not defined in the specification'''
|
|
234
234
|
|
|
235
235
|
|
|
236
|
+
|
|
237
|
+
class Misc(Category, ABC):
|
|
238
|
+
'''@private'''
|
|
239
|
+
key: str = Field(default='-X', frozen=True)
|
|
240
|
+
id:str|None = Field( alias='21')
|
|
241
|
+
additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
|
|
242
|
+
''' Category segments, which are not defined in the specification'''
|
|
243
|
+
|
|
244
|
+
@model_validator(mode='after')
|
|
245
|
+
def _validate_mandatory_fields(self):
|
|
246
|
+
if not self.id:
|
|
247
|
+
self._add_validation_message(
|
|
248
|
+
source=f"Category {self.key}",
|
|
249
|
+
level = ValidationMsgLevel.ERROR,
|
|
250
|
+
msg=f"Category key {self.key} is missing mandatory field 'ID'",
|
|
251
|
+
highlight_pattern = f"{self.key}"
|
|
252
|
+
)
|
|
253
|
+
return self
|
|
254
|
+
|
|
255
|
+
|
|
236
256
|
category_key_to_class_map = {
|
|
237
257
|
'-MD': Material_Device,
|
|
238
258
|
'-MS': Material_Substance,
|
|
@@ -245,5 +265,6 @@ category_key_to_class_map = {
|
|
|
245
265
|
'-DS': Data_Static,
|
|
246
266
|
'-DX': Data_Misc,
|
|
247
267
|
'-PS': Processor_Software,
|
|
248
|
-
'-PX': Processor_Misc
|
|
268
|
+
'-PX': Processor_Misc,
|
|
269
|
+
'-X':Misc
|
|
249
270
|
}
|
|
@@ -187,6 +187,16 @@ class CIT_v1(LabFREED_BaseModel):
|
|
|
187
187
|
for e in self.entries:
|
|
188
188
|
s += '\t'.join([e.service_name, e.application_intent, e.service_type.value, e.applicable_if, e.template_url]) + '\n'
|
|
189
189
|
return s
|
|
190
|
+
|
|
191
|
+
# hash and equal are only used to avoid adding the same cit multiple times.
|
|
192
|
+
# we can live with some instances, where it does not work
|
|
193
|
+
def __hash__(self):
|
|
194
|
+
return self.model_dump_json().__hash__()
|
|
195
|
+
|
|
196
|
+
def __eq__(self, other):
|
|
197
|
+
if not isinstance(other, CIT_v1):
|
|
198
|
+
return False
|
|
199
|
+
return self.model_dump() == other.model_dump()
|
|
190
200
|
|
|
191
201
|
|
|
192
202
|
|
|
@@ -136,6 +136,17 @@ class CIT_v2(LabFREED_BaseModel):
|
|
|
136
136
|
def __str__(self):
|
|
137
137
|
yml = yaml.dump(self.model_dump() )
|
|
138
138
|
return yml
|
|
139
|
+
|
|
140
|
+
# hash and equal are only used to avoid adding the same cit multiple times.
|
|
141
|
+
# we can live with some instances, where it does not work
|
|
142
|
+
def __hash__(self):
|
|
143
|
+
return self.model_dump_json().__hash__()
|
|
144
|
+
|
|
145
|
+
def __eq__(self, other):
|
|
146
|
+
if not isinstance(other, CIT_v2):
|
|
147
|
+
return False
|
|
148
|
+
return self.model_dump() == other.model_dump()
|
|
149
|
+
|
|
139
150
|
|
|
140
151
|
def evaluate_pac_id(self, pac):
|
|
141
152
|
pac_id_json = pac.to_dict()
|
|
@@ -61,7 +61,7 @@ class PAC_ID_Resolver():
|
|
|
61
61
|
'''Initialize the resolver with coupling information tables'''
|
|
62
62
|
if not cits:
|
|
63
63
|
cits = []
|
|
64
|
-
self._cits = cits
|
|
64
|
+
self._cits = set(cits)
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
def resolve(self, pac_id:PAC_ID|str, check_service_status=True, use_issuer_cit=True) -> list[ServiceGroup]:
|
|
@@ -80,7 +80,7 @@ class PAC_ID_Resolver():
|
|
|
80
80
|
cits = self._cits.copy()
|
|
81
81
|
if use_issuer_cit:
|
|
82
82
|
if issuer_cit := _get_issuer_cit(pac_id.issuer):
|
|
83
|
-
cits.
|
|
83
|
+
cits.add(issuer_cit)
|
|
84
84
|
|
|
85
85
|
matches = []
|
|
86
86
|
for cit in cits:
|
|
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
|
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/pythonic/attribute_server_factory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/pythonic/py_dict_data_source.py
RENAMED
|
File without changes
|
|
File without changes
|
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/server/attribute_data_sources.py
RENAMED
|
File without changes
|
|
File without changes
|
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/server/translation_data_sources.py
RENAMED
|
File without changes
|
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/pac_attributes/well_knonw_attribute_keys.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
|
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_extensions/display_name_extension.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labfreed-1.0.0a11 → labfreed-1.0.0a13}/labfreed/well_known_keys/labfreed/well_known_keys.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|