labfreed 0.2.8a0__tar.gz → 0.2.9__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-0.2.8a0 → labfreed-0.2.9}/CHANGELOG.md +6 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/PKG-INFO +20 -9
- {labfreed-0.2.8a0 → labfreed-0.2.9}/README.md +18 -8
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/__init__.py +1 -1
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id/url_serializer.py +2 -1
- {labfreed-0.2.8a0 → labfreed-0.2.9}/pyproject.toml +2 -1
- {labfreed-0.2.8a0 → labfreed-0.2.9}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/.github/workflows/pypi-publish.yml +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/.github/workflows/run-tests.yml +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/LICENSE +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/labfreed_infrastructure.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_cat/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_cat/category_base.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_cat/pac_cat.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_cat/predefined_categories.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id/extension.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id/id_segment.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id/pac_id.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id/url_parser.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id_resolver/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id_resolver/cit_common.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id_resolver/cit_v1.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id_resolver/cit_v2.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id_resolver/resolver.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/pac_id_resolver/services.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/qr/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/qr/generate_qr.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/python_convenience/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/python_convenience/data_table.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/python_convenience/pyTREX.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/python_convenience/quantity.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/table_segment.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/trex.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/trex_base_models.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/trex/value_segments.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/utilities/base36.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_extensions/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_extensions/default_extension_interpreters.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_extensions/display_name_extension.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_extensions/trex_extension.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_keys/gs1/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_keys/gs1/gs1.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_keys/labfreed/well_known_keys.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_keys/unece/__init__.py +0 -0
- {labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_keys/unece/unece_units.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: labfreed
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
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
|
|
@@ -23,6 +23,7 @@ Requires-Dist: typer>=0.15.2
|
|
|
23
23
|
Requires-Dist: PyYAML>=6.0.2
|
|
24
24
|
Requires-Dist: jsonpath-ng>=1.7.0
|
|
25
25
|
Requires-Dist: requests>=2.32.3
|
|
26
|
+
Requires-Dist: requests_cache>=1.2.1
|
|
26
27
|
Requires-Dist: pytest>=8.3.5 ; extra == "dev"
|
|
27
28
|
Requires-Dist: pdoc>=15.0.1 ; extra == "dev"
|
|
28
29
|
Requires-Dist: flit>=3.12.0 ; extra == "dev"
|
|
@@ -105,7 +106,7 @@ pac.print_validation_messages()
|
|
|
105
106
|
>> Validation Results
|
|
106
107
|
>> ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
107
108
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
108
|
-
>> │ Characters '
|
|
109
|
+
>> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
109
110
|
>> │ │
|
|
110
111
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
111
112
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -115,7 +116,7 @@ pac.print_validation_messages()
|
|
|
115
116
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234 │
|
|
116
117
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
117
118
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
118
|
-
>> │ Characters '
|
|
119
|
+
>> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
119
120
|
>> │ │
|
|
120
121
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
121
122
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -248,7 +249,7 @@ trex.print_validation_messages()
|
|
|
248
249
|
>> Validation Results
|
|
249
250
|
>> ┌────────────────────────────────────────────────────────────┐
|
|
250
251
|
>> │ **ERROR** in TREX table column Date │
|
|
251
|
-
>> │ Column header key contains invalid characters: '
|
|
252
|
+
>> │ Column header key contains invalid characters: 'e','t','a' │
|
|
252
253
|
>> │ │
|
|
253
254
|
>> │ STOP$T.D:20240505T1306 │
|
|
254
255
|
>> │ +TEMP$KEL:10.15 │
|
|
@@ -256,9 +257,9 @@ trex.print_validation_messages()
|
|
|
256
257
|
>> │ +COMMENT$T.A:FOO │
|
|
257
258
|
>> │ +COMMENT2$T.T:12G3 │
|
|
258
259
|
>> │ +TABLE$$DURATION$HUR:D👉ate👈$T.D:OK$T.B:COMMENT$T.A:: │
|
|
259
|
-
>> │ 1:
|
|
260
|
-
>> │ 1.1:
|
|
261
|
-
>> │ 1.3:
|
|
260
|
+
>> │ 1:20250522T163256.043:T:FOO:: │
|
|
261
|
+
>> │ 1.1:20250522T163256.043:T:BAR:: │
|
|
262
|
+
>> │ 1.3:20250522T163256.043:F:BLUBB │
|
|
262
263
|
>> └────────────────────────────────────────────────────────────┘
|
|
263
264
|
```
|
|
264
265
|
#### Combine PAC-ID and TREX and serialize
|
|
@@ -270,12 +271,14 @@ pac_str = pac.to_url()
|
|
|
270
271
|
print(pac_str)
|
|
271
272
|
```
|
|
272
273
|
```text
|
|
273
|
-
>> 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:
|
|
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
|
|
274
275
|
```
|
|
275
276
|
## PAC-ID Resolver
|
|
276
277
|
|
|
277
278
|
```python
|
|
278
279
|
from labfreed import PAC_ID_Resolver, load_cit
|
|
280
|
+
import requests_cache
|
|
281
|
+
|
|
279
282
|
# Get a CIT
|
|
280
283
|
dir = os.path.join(os.getcwd(), 'examples')
|
|
281
284
|
p = os.path.join(dir, 'cit_mine.yaml')
|
|
@@ -294,8 +297,10 @@ cit2.origin = 'MY_COMPANY'
|
|
|
294
297
|
```python
|
|
295
298
|
# resolve a pac id
|
|
296
299
|
pac_str = 'HTTPS://PAC.METTORIUS.COM/-MS/X3511/CAS:7732-18-5'
|
|
297
|
-
service_groups = PAC_ID_Resolver(cits=[cit, cit2]).resolve(pac_str)
|
|
300
|
+
service_groups = PAC_ID_Resolver(cits=[cit, cit2]).resolve(pac_str, check_service_status=False)
|
|
301
|
+
cached_session = requests_cache.CachedSession(backend='memory', expire_after=60)
|
|
298
302
|
for sg in service_groups:
|
|
303
|
+
sg.update_states(cached_session)
|
|
299
304
|
sg.print()
|
|
300
305
|
|
|
301
306
|
```
|
|
@@ -327,6 +332,12 @@ for sg in service_groups:
|
|
|
327
332
|
|
|
328
333
|
<!-- BEGIN CHANGELOG -->
|
|
329
334
|
## Change Log
|
|
335
|
+
### v0.2.9
|
|
336
|
+
- bugfix in serialization of PAC-CAT with multiple categories
|
|
337
|
+
|
|
338
|
+
### v0.2.8
|
|
339
|
+
- option to pass cache to resolver for speedier check of service availability
|
|
340
|
+
|
|
330
341
|
### v0.2.7
|
|
331
342
|
- Improved README. No functional changes
|
|
332
343
|
|
|
@@ -70,7 +70,7 @@ pac.print_validation_messages()
|
|
|
70
70
|
>> Validation Results
|
|
71
71
|
>> ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
72
72
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
73
|
-
>> │ Characters '
|
|
73
|
+
>> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
74
74
|
>> │ │
|
|
75
75
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
76
76
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -80,7 +80,7 @@ pac.print_validation_messages()
|
|
|
80
80
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234 │
|
|
81
81
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
82
82
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
83
|
-
>> │ Characters '
|
|
83
|
+
>> │ Characters 'l','a','b' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
84
84
|
>> │ │
|
|
85
85
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
86
86
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -213,7 +213,7 @@ trex.print_validation_messages()
|
|
|
213
213
|
>> Validation Results
|
|
214
214
|
>> ┌────────────────────────────────────────────────────────────┐
|
|
215
215
|
>> │ **ERROR** in TREX table column Date │
|
|
216
|
-
>> │ Column header key contains invalid characters: '
|
|
216
|
+
>> │ Column header key contains invalid characters: 'e','t','a' │
|
|
217
217
|
>> │ │
|
|
218
218
|
>> │ STOP$T.D:20240505T1306 │
|
|
219
219
|
>> │ +TEMP$KEL:10.15 │
|
|
@@ -221,9 +221,9 @@ trex.print_validation_messages()
|
|
|
221
221
|
>> │ +COMMENT$T.A:FOO │
|
|
222
222
|
>> │ +COMMENT2$T.T:12G3 │
|
|
223
223
|
>> │ +TABLE$$DURATION$HUR:D👉ate👈$T.D:OK$T.B:COMMENT$T.A:: │
|
|
224
|
-
>> │ 1:
|
|
225
|
-
>> │ 1.1:
|
|
226
|
-
>> │ 1.3:
|
|
224
|
+
>> │ 1:20250522T163256.043:T:FOO:: │
|
|
225
|
+
>> │ 1.1:20250522T163256.043:T:BAR:: │
|
|
226
|
+
>> │ 1.3:20250522T163256.043:F:BLUBB │
|
|
227
227
|
>> └────────────────────────────────────────────────────────────┘
|
|
228
228
|
```
|
|
229
229
|
#### Combine PAC-ID and TREX and serialize
|
|
@@ -235,12 +235,14 @@ pac_str = pac.to_url()
|
|
|
235
235
|
print(pac_str)
|
|
236
236
|
```
|
|
237
237
|
```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:
|
|
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
|
|
239
239
|
```
|
|
240
240
|
## PAC-ID Resolver
|
|
241
241
|
|
|
242
242
|
```python
|
|
243
243
|
from labfreed import PAC_ID_Resolver, load_cit
|
|
244
|
+
import requests_cache
|
|
245
|
+
|
|
244
246
|
# Get a CIT
|
|
245
247
|
dir = os.path.join(os.getcwd(), 'examples')
|
|
246
248
|
p = os.path.join(dir, 'cit_mine.yaml')
|
|
@@ -259,8 +261,10 @@ cit2.origin = 'MY_COMPANY'
|
|
|
259
261
|
```python
|
|
260
262
|
# resolve a pac id
|
|
261
263
|
pac_str = 'HTTPS://PAC.METTORIUS.COM/-MS/X3511/CAS:7732-18-5'
|
|
262
|
-
service_groups = PAC_ID_Resolver(cits=[cit, cit2]).resolve(pac_str)
|
|
264
|
+
service_groups = PAC_ID_Resolver(cits=[cit, cit2]).resolve(pac_str, check_service_status=False)
|
|
265
|
+
cached_session = requests_cache.CachedSession(backend='memory', expire_after=60)
|
|
263
266
|
for sg in service_groups:
|
|
267
|
+
sg.update_states(cached_session)
|
|
264
268
|
sg.print()
|
|
265
269
|
|
|
266
270
|
```
|
|
@@ -292,6 +296,12 @@ for sg in service_groups:
|
|
|
292
296
|
|
|
293
297
|
<!-- BEGIN CHANGELOG -->
|
|
294
298
|
## Change Log
|
|
299
|
+
### v0.2.9
|
|
300
|
+
- bugfix in serialization of PAC-CAT with multiple categories
|
|
301
|
+
|
|
302
|
+
### v0.2.8
|
|
303
|
+
- option to pass cache to resolver for speedier check of service availability
|
|
304
|
+
|
|
295
305
|
### v0.2.7
|
|
296
306
|
- Improved README. No functional changes
|
|
297
307
|
|
|
@@ -37,8 +37,9 @@ class PACID_Serializer():
|
|
|
37
37
|
''' Serializes the PAC-ID'''
|
|
38
38
|
|
|
39
39
|
if isinstance(pac, PAC_CAT) and use_short_notation is not None:
|
|
40
|
+
segments = []
|
|
40
41
|
for c in pac.categories:
|
|
41
|
-
segments
|
|
42
|
+
segments.append(IDSegment(value=c.key))
|
|
42
43
|
if isinstance(c, PredefinedCategory):
|
|
43
44
|
segments += c._get_segments(use_short_notation=use_short_notation)
|
|
44
45
|
else:
|
|
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
|
{labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_extensions/default_extension_interpreters.py
RENAMED
|
File without changes
|
{labfreed-0.2.8a0 → labfreed-0.2.9}/labfreed/well_known_extensions/display_name_extension.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
|