labfreed 1.0.0a4__tar.gz → 1.0.0a6__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.
Files changed (74) hide show
  1. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/PKG-INFO +1 -1
  2. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/__init__.py +1 -1
  3. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_cat/category_base.py +1 -1
  4. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_cat/predefined_categories.py +52 -4
  5. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  6. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/.github/workflows/pypi-publish.yml +0 -0
  7. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/.github/workflows/run-tests.yml +0 -0
  8. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/CHANGELOG.md +0 -0
  9. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/LICENSE +0 -0
  10. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/README.md +0 -0
  11. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/app_infrastructure.py +0 -0
  12. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/formatted_print.py +0 -0
  13. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/pac_info/html_renderer/external-link.svg +0 -0
  14. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/pac_info/html_renderer/macros.jinja.html +0 -0
  15. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/pac_info/html_renderer/pac-info-style.css +0 -0
  16. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/pac_info/html_renderer/pac_info.jinja.html +0 -0
  17. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/pac_info/html_renderer/pac_info_card.jinja.html +0 -0
  18. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_extended/app/pac_info/pac_info.py +0 -0
  19. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/labfreed_infrastructure.py +0 -0
  20. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/__init__.py +0 -0
  21. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/api_data_models/request.py +0 -0
  22. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/api_data_models/response.py +0 -0
  23. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/api_data_models/server_capabilities_response.py +0 -0
  24. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/client/__init__.py +0 -0
  25. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/client/attribute_cache.py +0 -0
  26. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/client/client.py +0 -0
  27. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/pythonic/attribute_server_factory.py +0 -0
  28. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/pythonic/excel_attribute_data_source.py +0 -0
  29. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/pythonic/py_attributes.py +0 -0
  30. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/pythonic/py_dict_data_source.py +0 -0
  31. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/server/__init__.py +0 -0
  32. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/server/attribute_data_sources.py +0 -0
  33. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/server/server.py +0 -0
  34. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/server/translation_data_sources.py +0 -0
  35. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_attributes/well_knonw_attribute_keys.py +0 -0
  36. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_cat/__init__.py +0 -0
  37. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_cat/pac_cat.py +0 -0
  38. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id/__init__.py +0 -0
  39. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id/extension.py +0 -0
  40. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id/id_segment.py +0 -0
  41. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id/pac_id.py +0 -0
  42. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id/url_parser.py +0 -0
  43. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id/url_serializer.py +0 -0
  44. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id_resolver/__init__.py +0 -0
  45. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id_resolver/cit_common.py +0 -0
  46. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id_resolver/cit_v1.py +0 -0
  47. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id_resolver/cit_v2.py +0 -0
  48. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id_resolver/resolver.py +0 -0
  49. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/pac_id_resolver/services.py +0 -0
  50. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/qr/__init__.py +0 -0
  51. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/qr/generate_qr.py +0 -0
  52. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/__init__.py +0 -0
  53. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/pythonic/__init__.py +0 -0
  54. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/pythonic/data_table.py +0 -0
  55. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/pythonic/pyTREX.py +0 -0
  56. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/pythonic/quantity.py +0 -0
  57. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/table_segment.py +0 -0
  58. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/trex.py +0 -0
  59. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/trex_base_models.py +0 -0
  60. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/trex/value_segments.py +0 -0
  61. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/utilities/base36.py +0 -0
  62. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/utilities/ensure_utc_time.py +0 -0
  63. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/utilities/translations.py +0 -0
  64. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_extensions/__init__.py +0 -0
  65. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_extensions/default_extension_interpreters.py +0 -0
  66. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_extensions/display_name_extension.py +0 -0
  67. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_extensions/trex_extension.py +0 -0
  68. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_keys/gs1/__init__.py +0 -0
  69. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
  70. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_keys/labfreed/well_known_keys.py +0 -0
  71. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
  72. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_keys/unece/__init__.py +0 -0
  73. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/labfreed/well_known_keys/unece/unece_units.py +0 -0
  74. {labfreed-1.0.0a4 → labfreed-1.0.0a6}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: labfreed
3
- Version: 1.0.0a4
3
+ Version: 1.0.0a6
4
4
  Summary: Python implementation of LabFREED building blocks
5
5
  Author-email: Reto Thürer <thuerer.r@buchi.com>
6
6
  Requires-Python: >=3.11
@@ -2,7 +2,7 @@
2
2
  Python implementation of LabFREED building blocks
3
3
  '''
4
4
 
5
- __version__ = "1.0.0a4"
5
+ __version__ = "1.0.0a6"
6
6
 
7
7
  from labfreed.pac_id import * # noqa: F403
8
8
  from labfreed.pac_cat import * # noqa: F403
@@ -57,7 +57,7 @@ class Category(LabFREED_BaseModel):
57
57
  k = f"{field_name}"
58
58
  out.update({k : v } )
59
59
 
60
- for s in getattr(self, 'additional_segments'):
60
+ for s in getattr(self, 'additional_segments', []):
61
61
  out.update( {s.key or '' : s.value })
62
62
  return out
63
63
 
@@ -116,9 +116,9 @@ class Material_Consumable(PredefinedCategory):
116
116
  return self
117
117
 
118
118
  class Material_Misc(Material_Consumable):
119
- '''Represents the -MC category'''
119
+ '''Represents the -MX category'''
120
120
  # same fields as Consumable
121
- key: str = Field(default='-MM', frozen=True)
121
+ key: str = Field(default='-MX', frozen=True)
122
122
  product_number:str|None = Field( alias='240')
123
123
  batch_number:str|None = Field(default=None, alias='10')
124
124
  packaging_size:str|None = Field(default=None, alias='20')
@@ -187,15 +187,63 @@ class Data_Static(Data_Abstract):
187
187
  additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
188
188
  ''' Category segments, which are not defined in the specification'''
189
189
 
190
+ class Data_Misc(Data_Abstract):
191
+ '''Represents the -DX category'''
192
+ key: str = Field(default='-DX', frozen=True)
193
+ id:str|None = Field( alias='21')
194
+ additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
195
+ ''' Category segments, which are not defined in the specification'''
196
+
197
+
198
+
199
+
200
+ class Processor_Abstract(PredefinedCategory, ABC):
201
+ '''@private'''
202
+ key: str
203
+ processor_instance:str|None = Field( alias='21')
204
+ processor_code:str|None = Field( alias='240')
205
+ additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
206
+ ''' Category segments, which are not defined in the specification'''
207
+
208
+ @model_validator(mode='after')
209
+ def _validate_mandatory_fields(self):
210
+ if not self.id:
211
+ self._add_validation_message(
212
+ source=f"Category {self.key}",
213
+ level = ValidationMsgLevel.ERROR,
214
+ msg=f"Category key {self.key} is missing mandatory field 'processor instance'",
215
+ highlight_pattern = f"{self.key}"
216
+ )
217
+ return self
218
+
219
+ class Processor_Software(Processor_Abstract):
220
+ '''Represents the -PS category'''
221
+ key: str = Field(default='-PS', frozen=True)
222
+ processor_instance:str|None = Field( alias='21')
223
+ processor_code:str|None = Field( alias='240')
224
+ additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
225
+ ''' Category segments, which are not defined in the specification'''
226
+
227
+ class Processor_Misc(Processor_Abstract):
228
+ '''Represents the -PX category'''
229
+ key: str = Field(default='-PX', frozen=True)
230
+ processor_instance:str|None = Field( alias='21')
231
+ processor_code:str|None = Field( alias='240')
232
+ additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
233
+ ''' Category segments, which are not defined in the specification'''
234
+
190
235
 
191
236
  category_key_to_class_map = {
192
237
  '-MD': Material_Device,
193
238
  '-MS': Material_Substance,
194
239
  '-MC': Material_Consumable,
195
- '-MM': Material_Misc,
240
+ '-MX': Material_Misc,
196
241
  '-DM': Data_Method,
197
242
  '-DR': Data_Result,
198
243
  '-DC': Data_Calibration,
199
244
  '-DP': Data_Progress,
200
- '-DS': Data_Static
245
+ '-DS': Data_Static,
246
+ '-DX': Data_Misc,
247
+ '-PS': Processor_Software,
248
+ '-PX': Processor_Misc
201
249
  }
File without changes
File without changes
File without changes
File without changes