labfreed 0.2.10__tar.gz → 0.2.12__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.

Files changed (49) hide show
  1. {labfreed-0.2.10 → labfreed-0.2.12}/CHANGELOG.md +6 -0
  2. {labfreed-0.2.10 → labfreed-0.2.12}/PKG-INFO +39 -29
  3. {labfreed-0.2.10 → labfreed-0.2.12}/README.md +38 -28
  4. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/__init__.py +1 -1
  5. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_cat/pac_cat.py +7 -0
  6. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_keys/labfreed/well_known_keys.py +1 -0
  7. {labfreed-0.2.10 → labfreed-0.2.12}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  8. {labfreed-0.2.10 → labfreed-0.2.12}/.github/workflows/pypi-publish.yml +0 -0
  9. {labfreed-0.2.10 → labfreed-0.2.12}/.github/workflows/run-tests.yml +0 -0
  10. {labfreed-0.2.10 → labfreed-0.2.12}/LICENSE +0 -0
  11. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/labfreed_infrastructure.py +0 -0
  12. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_cat/__init__.py +0 -0
  13. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_cat/category_base.py +0 -0
  14. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_cat/predefined_categories.py +0 -0
  15. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id/__init__.py +0 -0
  16. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id/extension.py +0 -0
  17. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id/id_segment.py +0 -0
  18. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id/pac_id.py +0 -0
  19. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id/url_parser.py +0 -0
  20. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id/url_serializer.py +0 -0
  21. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id_resolver/__init__.py +0 -0
  22. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id_resolver/cit_common.py +0 -0
  23. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id_resolver/cit_v1.py +0 -0
  24. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id_resolver/cit_v2.py +0 -0
  25. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id_resolver/resolver.py +0 -0
  26. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/pac_id_resolver/services.py +0 -0
  27. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/qr/__init__.py +0 -0
  28. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/qr/generate_qr.py +0 -0
  29. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/__init__.py +0 -0
  30. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/python_convenience/__init__.py +0 -0
  31. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/python_convenience/data_table.py +0 -0
  32. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/python_convenience/pyTREX.py +0 -0
  33. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/python_convenience/quantity.py +0 -0
  34. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/table_segment.py +0 -0
  35. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/trex.py +0 -0
  36. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/trex_base_models.py +0 -0
  37. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/trex/value_segments.py +0 -0
  38. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/utilities/base36.py +0 -0
  39. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_extensions/__init__.py +0 -0
  40. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_extensions/default_extension_interpreters.py +0 -0
  41. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_extensions/display_name_extension.py +0 -0
  42. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_extensions/trex_extension.py +0 -0
  43. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_keys/gs1/__init__.py +0 -0
  44. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_keys/gs1/gs1.py +0 -0
  45. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
  46. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
  47. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_keys/unece/__init__.py +0 -0
  48. {labfreed-0.2.10 → labfreed-0.2.12}/labfreed/well_known_keys/unece/unece_units.py +0 -0
  49. {labfreed-0.2.10 → labfreed-0.2.12}/pyproject.toml +0 -0
@@ -1,4 +1,10 @@
1
1
  ## Change Log
2
+ ### v0.2.12
3
+ - bugfix:no warning message if PAC-CAT has same segment key in two segments
4
+
5
+ ### v0.2.11
6
+ - bugfix:added missing well known segment key '250'
7
+
2
8
  ### v0.2.10
3
9
  - bugfix:added missing well known segment key '20'
4
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: labfreed
3
- Version: 0.2.10
3
+ Version: 0.2.12
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
@@ -103,28 +103,32 @@ There is a nice function to highlight problems
103
103
  pac.print_validation_messages()
104
104
  ```
105
105
  ```text
106
- >> Validation Results
107
- >> ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
108
- >> │ **RECOMMENDATION** in id segment value bal500
109
- >> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+'
110
- >> │
111
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234
112
- >> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
113
- >> │ **RECOMMENDATION** in id segment value @1234 │
114
- >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+'
115
- >> │
116
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234
117
- >> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
118
- >> │ **RECOMMENDATION** in id segment value bal500
119
- >> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
120
- >> │
121
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234
122
- >> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
123
- >> │ **RECOMMENDATION** in id segment value @1234
124
- >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+'
125
- >> │ │
126
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234
127
- >> └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
106
+ >> Validation Results
107
+ >> ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
108
+ >> │ **RECOMMENDATION** in id segment value bal500
109
+ >> │ Characters 'a','l','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers
110
+ >> │ (0-9), '-' and '+'
111
+ >> │
112
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
113
+ >> ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
114
+ >> │ **RECOMMENDATION** in id segment value @1234
115
+ >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-'
116
+ >> │ and '+'
117
+ >> │ │
118
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234
119
+ >> ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
120
+ >> │ **RECOMMENDATION** in id segment value bal500
121
+ >> │ Characters 'a','l','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers
122
+ >> │ (0-9), '-' and '+' │
123
+ >> │
124
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234
125
+ >> ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
126
+ >> │ **RECOMMENDATION** in id segment value @1234
127
+ >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' │
128
+ >> │ and '+' │
129
+ >> │ │
130
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234 │
131
+ >> └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
128
132
  ```
129
133
  ### Save as QR Code
130
134
 
@@ -249,7 +253,7 @@ trex.print_validation_messages()
249
253
  >> Validation Results
250
254
  >> ┌────────────────────────────────────────────────────────────┐
251
255
  >> │ **ERROR** in TREX table column Date │
252
- >> │ Column header key contains invalid characters: 'e','t','a' │
256
+ >> │ Column header key contains invalid characters: 'a','t','e' │
253
257
  >> │ │
254
258
  >> │ STOP$T.D:20240505T1306 │
255
259
  >> │ +TEMP$KEL:10.15 │
@@ -257,9 +261,9 @@ trex.print_validation_messages()
257
261
  >> │ +COMMENT$T.A:FOO │
258
262
  >> │ +COMMENT2$T.T:12G3 │
259
263
  >> │ +TABLE$$DURATION$HUR:D👉ate👈$T.D:OK$T.B:COMMENT$T.A:: │
260
- >> │ 1:20250522T163256.043:T:FOO:: │
261
- >> │ 1.1:20250522T163256.043:T:BAR:: │
262
- >> │ 1.3:20250522T163256.043:F:BLUBB │
264
+ >> │ 1:20250522T180101.575:T:FOO:: │
265
+ >> │ 1.1:20250522T180101.575:T:BAR:: │
266
+ >> │ 1.3:20250522T180101.575:F:BLUBB │
263
267
  >> └────────────────────────────────────────────────────────────┘
264
268
  ```
265
269
  #### Combine PAC-ID and TREX and serialize
@@ -271,7 +275,7 @@ pac_str = pac.to_url()
271
275
  print(pac_str)
272
276
  ```
273
277
  ```text
274
- >> HTTPS://PAC.METTORIUS.COM/21:1234*MYTREX$TREX/STOP$T.D:20240505T1306+TEMP$KEL:10.15+OK$T.B:F+COMMENT$T.A:FOO+COMMENT2$T.T:12G3+TABLE$$DURATION$HUR:Date$T.D:OK$T.B:COMMENT$T.A::1:20250522T163256.043:T:FOO::1.1:20250522T163256.043:T:BAR::1.3:20250522T163256.043:F:BLUBB
278
+ >> HTTPS://PAC.METTORIUS.COM/21:1234*MYTREX$TREX/STOP$T.D:20240505T1306+TEMP$KEL:10.15+OK$T.B:F+COMMENT$T.A:FOO+COMMENT2$T.T:12G3+TABLE$$DURATION$HUR:Date$T.D:OK$T.B:COMMENT$T.A::1:20250522T180101.575:T:FOO::1.1:20250522T180101.575:T:BAR::1.3:20250522T180101.575:F:BLUBB
275
279
  ```
276
280
  ## PAC-ID Resolver
277
281
 
@@ -332,9 +336,15 @@ for sg in service_groups:
332
336
 
333
337
  <!-- BEGIN CHANGELOG -->
334
338
  ## Change Log
339
+ ### v0.2.12
340
+ - bugfix:no warning message if PAC-CAT has same segment key in two segments
341
+
342
+ ### v0.2.11
343
+ - bugfix:added missing well known segment key '250'
344
+
335
345
  ### v0.2.10
336
346
  - bugfix:added missing well known segment key '20'
337
- -
347
+
338
348
  ### v0.2.9
339
349
  - bugfix in serialization of PAC-CAT with multiple categories
340
350
 
@@ -67,28 +67,32 @@ There is a nice function to highlight problems
67
67
  pac.print_validation_messages()
68
68
  ```
69
69
  ```text
70
- >> Validation Results
71
- >> ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
72
- >> │ **RECOMMENDATION** in id segment value bal500
73
- >> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+'
74
- >> │
75
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234
76
- >> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
77
- >> │ **RECOMMENDATION** in id segment value @1234 │
78
- >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+'
79
- >> │
80
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234
81
- >> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
82
- >> │ **RECOMMENDATION** in id segment value bal500
83
- >> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
84
- >> │
85
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234
86
- >> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
87
- >> │ **RECOMMENDATION** in id segment value @1234
88
- >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+'
89
- >> │ │
90
- >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234
91
- >> └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
70
+ >> Validation Results
71
+ >> ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
72
+ >> │ **RECOMMENDATION** in id segment value bal500
73
+ >> │ Characters 'a','l','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers
74
+ >> │ (0-9), '-' and '+'
75
+ >> │
76
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
77
+ >> ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
78
+ >> │ **RECOMMENDATION** in id segment value @1234
79
+ >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-'
80
+ >> │ and '+'
81
+ >> │ │
82
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234
83
+ >> ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
84
+ >> │ **RECOMMENDATION** in id segment value bal500
85
+ >> │ Characters 'a','l','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers
86
+ >> │ (0-9), '-' and '+' │
87
+ >> │
88
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234
89
+ >> ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
90
+ >> │ **RECOMMENDATION** in id segment value @1234
91
+ >> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' │
92
+ >> │ and '+' │
93
+ >> │ │
94
+ >> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234 │
95
+ >> └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
92
96
  ```
93
97
  ### Save as QR Code
94
98
 
@@ -213,7 +217,7 @@ trex.print_validation_messages()
213
217
  >> Validation Results
214
218
  >> ┌────────────────────────────────────────────────────────────┐
215
219
  >> │ **ERROR** in TREX table column Date │
216
- >> │ Column header key contains invalid characters: 'e','t','a' │
220
+ >> │ Column header key contains invalid characters: 'a','t','e' │
217
221
  >> │ │
218
222
  >> │ STOP$T.D:20240505T1306 │
219
223
  >> │ +TEMP$KEL:10.15 │
@@ -221,9 +225,9 @@ trex.print_validation_messages()
221
225
  >> │ +COMMENT$T.A:FOO │
222
226
  >> │ +COMMENT2$T.T:12G3 │
223
227
  >> │ +TABLE$$DURATION$HUR:D👉ate👈$T.D:OK$T.B:COMMENT$T.A:: │
224
- >> │ 1:20250522T163256.043:T:FOO:: │
225
- >> │ 1.1:20250522T163256.043:T:BAR:: │
226
- >> │ 1.3:20250522T163256.043:F:BLUBB │
228
+ >> │ 1:20250522T180101.575:T:FOO:: │
229
+ >> │ 1.1:20250522T180101.575:T:BAR:: │
230
+ >> │ 1.3:20250522T180101.575:F:BLUBB │
227
231
  >> └────────────────────────────────────────────────────────────┘
228
232
  ```
229
233
  #### Combine PAC-ID and TREX and serialize
@@ -235,7 +239,7 @@ pac_str = pac.to_url()
235
239
  print(pac_str)
236
240
  ```
237
241
  ```text
238
- >> HTTPS://PAC.METTORIUS.COM/21:1234*MYTREX$TREX/STOP$T.D:20240505T1306+TEMP$KEL:10.15+OK$T.B:F+COMMENT$T.A:FOO+COMMENT2$T.T:12G3+TABLE$$DURATION$HUR:Date$T.D:OK$T.B:COMMENT$T.A::1:20250522T163256.043:T:FOO::1.1:20250522T163256.043:T:BAR::1.3:20250522T163256.043:F:BLUBB
242
+ >> HTTPS://PAC.METTORIUS.COM/21:1234*MYTREX$TREX/STOP$T.D:20240505T1306+TEMP$KEL:10.15+OK$T.B:F+COMMENT$T.A:FOO+COMMENT2$T.T:12G3+TABLE$$DURATION$HUR:Date$T.D:OK$T.B:COMMENT$T.A::1:20250522T180101.575:T:FOO::1.1:20250522T180101.575:T:BAR::1.3:20250522T180101.575:F:BLUBB
239
243
  ```
240
244
  ## PAC-ID Resolver
241
245
 
@@ -296,9 +300,15 @@ for sg in service_groups:
296
300
 
297
301
  <!-- BEGIN CHANGELOG -->
298
302
  ## Change Log
303
+ ### v0.2.12
304
+ - bugfix:no warning message if PAC-CAT has same segment key in two segments
305
+
306
+ ### v0.2.11
307
+ - bugfix:added missing well known segment key '250'
308
+
299
309
  ### v0.2.10
300
310
  - bugfix:added missing well known segment key '20'
301
- -
311
+
302
312
  ### v0.2.9
303
313
  - bugfix in serialization of PAC-CAT with multiple categories
304
314
 
@@ -2,7 +2,7 @@
2
2
  Python implementation of LabFREED building blocks
3
3
  '''
4
4
 
5
- __version__ = "0.2.10"
5
+ __version__ = "0.2.12"
6
6
 
7
7
  from labfreed.pac_id import * # noqa: F403
8
8
  from labfreed.pac_cat import * # noqa: F403
@@ -125,6 +125,13 @@ class PAC_CAT(PAC_ID):
125
125
  )
126
126
  return self
127
127
 
128
+
129
+ @model_validator(mode='after')
130
+ def _check_identifier_segment_keys_are_unique(self) -> Self:
131
+ ''' override the validator of PAC-ID: in PAC-CAT segments can replicate in different categories'''
132
+ return self
133
+
134
+
128
135
  def print_categories(self):
129
136
  table = Table(title=f'Categories in {str(self)}', show_header=False)
130
137
  table.add_column('0')
@@ -7,6 +7,7 @@ class WellKnownKeys(Enum):
7
7
  CONTAINER_CODE = '20'
8
8
  SERIAL = '21'
9
9
  ADDITIONAL_IDENTIFIER = '240'
10
+ SECONDARY_SERIAL = '250'
10
11
  RUN_ID_ABSOLUTE = 'RNR'
11
12
  SAMPLE_ID = 'SMP'
12
13
  EXPERIMENT_ID = 'EXP'
File without changes
File without changes