labfreed 1.0.0a4__py3-none-any.whl → 1.0.0a5__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.
labfreed/__init__.py CHANGED
@@ -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.0a5"
6
6
 
7
7
  from labfreed.pac_id import * # noqa: F403
8
8
  from labfreed.pac_cat import * # noqa: F403
@@ -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,64 @@ 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
+
206
+ additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
207
+ ''' Category segments, which are not defined in the specification'''
208
+
209
+ @model_validator(mode='after')
210
+ def _validate_mandatory_fields(self):
211
+ if not self.id:
212
+ self._add_validation_message(
213
+ source=f"Category {self.key}",
214
+ level = ValidationMsgLevel.ERROR,
215
+ msg=f"Category key {self.key} is missing mandatory field 'processor instance'",
216
+ highlight_pattern = f"{self.key}"
217
+ )
218
+ return self
219
+
220
+ class Processor_Software(Processor_Abstract):
221
+ '''Represents the -PS category'''
222
+ key: str = Field(default='-PS', frozen=True)
223
+ processor_instance:str|None = Field( alias='21')
224
+ processor_code:str|None = Field( alias='240')
225
+ additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
226
+ ''' Category segments, which are not defined in the specification'''
227
+
228
+ class Processor_Misc(Processor_Abstract):
229
+ '''Represents the -PX category'''
230
+ key: str = Field(default='-PX', frozen=True)
231
+ processor_instance:str|None = Field( alias='21')
232
+ processor_code:str|None = Field( alias='240')
233
+ additional_segments: list[IDSegment] = Field(default_factory=list, exclude=True)
234
+ ''' Category segments, which are not defined in the specification'''
235
+
190
236
 
191
237
  category_key_to_class_map = {
192
238
  '-MD': Material_Device,
193
239
  '-MS': Material_Substance,
194
240
  '-MC': Material_Consumable,
195
- '-MM': Material_Misc,
241
+ '-MX': Material_Misc,
196
242
  '-DM': Data_Method,
197
243
  '-DR': Data_Result,
198
244
  '-DC': Data_Calibration,
199
245
  '-DP': Data_Progress,
200
- '-DS': Data_Static
246
+ '-DS': Data_Static,
247
+ '-DX': Data_Misc,
248
+ '-PS': Processor_Software,
249
+ '-PX': Processor_Misc
201
250
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: labfreed
3
- Version: 1.0.0a4
3
+ Version: 1.0.0a5
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
@@ -1,4 +1,4 @@
1
- labfreed/__init__.py,sha256=KvTe62tzFkrePSSCB795dWb5vRFo6eLISovRwLNjT50,338
1
+ labfreed/__init__.py,sha256=7ep4pSxnKSCTXNnCY9m1eisddENI9mgk6BJzi6K6W_c,338
2
2
  labfreed/labfreed_infrastructure.py,sha256=YZmU-kgopyB1tvpTR_k_uIt1Q2ezexMrWvu-HaP65IE,10104
3
3
  labfreed/labfreed_extended/app/app_infrastructure.py,sha256=qn6KesHiOrhTPgXwMZNqFArKlWluxFbk5bgp5u8KDb8,3990
4
4
  labfreed/labfreed_extended/app/formatted_print.py,sha256=DcwWP0ix1e_wYNIdceIp6cETkJdG2DqpU8Gs3aZAL40,1930
@@ -27,7 +27,7 @@ labfreed/pac_attributes/server/translation_data_sources.py,sha256=axALOqfP840sOS
27
27
  labfreed/pac_cat/__init__.py,sha256=KNPtQzBD1XVohvG_ucOs7RJj-oi6biUTGB1k-T2o6pk,568
28
28
  labfreed/pac_cat/category_base.py,sha256=wVejYgDnUIUQ71q05ctophtZY2w9fD-PZ0xk3wUAEkQ,2522
29
29
  labfreed/pac_cat/pac_cat.py,sha256=wcb_fhvgjS2xmqTsxS8_Oibvr1nsQt5zr8aUajLfK1E,5578
30
- labfreed/pac_cat/predefined_categories.py,sha256=5wnMCj-CrACV2W4lH13w7qynWIwi506G3uLNcxuJQGg,8832
30
+ labfreed/pac_cat/predefined_categories.py,sha256=lbQD8W3ncKLVnyWc2UToelgFRJ4Frok5BbkCOd2JgwM,11107
31
31
  labfreed/pac_id/__init__.py,sha256=NGMbzkwQ4txKeT5pxdIZordwHO8J3_q84jzPanjKoHg,675
32
32
  labfreed/pac_id/extension.py,sha256=NgLexs1LbRMMm4ETrn5m4EY2iWoMDgOTb0UV556jatQ,2227
33
33
  labfreed/pac_id/id_segment.py,sha256=r5JU1SJuRXhZJJxy5T3xjrb598wIDTLpivSJhIUAzjQ,4526
@@ -64,7 +64,7 @@ labfreed/well_known_keys/labfreed/well_known_keys.py,sha256=p-hXwEEIs7p2SKn9DQeL
64
64
  labfreed/well_known_keys/unece/UneceUnits.json,sha256=kwfQSp_nTuWbADfBBgqTWrvPl6XtM5SedEVLbMJrM7M,898953
65
65
  labfreed/well_known_keys/unece/__init__.py,sha256=MSP9lmjg9_D9iqG9Yq2_ajYfQSNS9wIT7FXA1c--59M,122
66
66
  labfreed/well_known_keys/unece/unece_units.py,sha256=J20d64H69qKDE3XlGdJoXIIh0G-d0jKoiIDsg9an5pk,1655
67
- labfreed-1.0.0a4.dist-info/licenses/LICENSE,sha256=gHFOv9FRKHxO8cInP3YXyPoJnuNeqrvcHjaE_wPSsQ8,1100
68
- labfreed-1.0.0a4.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
69
- labfreed-1.0.0a4.dist-info/METADATA,sha256=Qn-9eoDdKw6CvJjtaMHWsfShqNI1iqYQkA65GM8A1UA,19740
70
- labfreed-1.0.0a4.dist-info/RECORD,,
67
+ labfreed-1.0.0a5.dist-info/licenses/LICENSE,sha256=gHFOv9FRKHxO8cInP3YXyPoJnuNeqrvcHjaE_wPSsQ8,1100
68
+ labfreed-1.0.0a5.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
69
+ labfreed-1.0.0a5.dist-info/METADATA,sha256=vPurZ390HjmeLxAGeMMlK8rZ6f7klEuArURm2eDqmXI,19740
70
+ labfreed-1.0.0a5.dist-info/RECORD,,