labfreed 0.2.7__tar.gz → 0.2.8__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.7 → labfreed-0.2.8}/LICENSE +21 -21
- {labfreed-0.2.7 → labfreed-0.2.8}/PKG-INFO +17 -9
- {labfreed-0.2.7 → labfreed-0.2.8}/README.md +354 -347
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/__init__.py +11 -11
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/labfreed_infrastructure.py +258 -258
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_cat/__init__.py +19 -19
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_cat/category_base.py +51 -51
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_cat/pac_cat.py +150 -150
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_cat/predefined_categories.py +200 -200
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id/__init__.py +19 -19
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id/extension.py +48 -48
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id/id_segment.py +89 -89
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id/pac_id.py +140 -140
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id/url_parser.py +155 -155
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id/url_serializer.py +84 -84
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id_resolver/__init__.py +2 -2
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id_resolver/cit_common.py +81 -81
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id_resolver/cit_v1.py +244 -244
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id_resolver/cit_v2.py +313 -313
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id_resolver/resolver.py +97 -97
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/pac_id_resolver/services.py +82 -79
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/qr/__init__.py +1 -1
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/qr/generate_qr.py +422 -422
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/__init__.py +16 -16
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/python_convenience/__init__.py +3 -3
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/python_convenience/data_table.py +87 -87
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/python_convenience/pyTREX.py +248 -248
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/python_convenience/quantity.py +66 -66
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/table_segment.py +245 -245
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/trex.py +69 -69
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/trex_base_models.py +209 -209
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/trex/value_segments.py +99 -99
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/utilities/base36.py +82 -82
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_extensions/__init__.py +4 -4
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_extensions/default_extension_interpreters.py +6 -6
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_extensions/display_name_extension.py +40 -40
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_extensions/trex_extension.py +30 -30
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_keys/gs1/__init__.py +5 -5
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_keys/gs1/gs1.py +3 -3
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_keys/labfreed/well_known_keys.py +15 -15
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_keys/unece/__init__.py +3 -3
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_keys/unece/unece_units.py +67 -67
- {labfreed-0.2.7 → labfreed-0.2.8}/pyproject.toml +66 -65
- labfreed-0.2.7/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
- labfreed-0.2.7/.github/workflows/pypi-publish.yml +0 -78
- labfreed-0.2.7/.github/workflows/run-tests.yml +0 -25
- labfreed-0.2.7/CHANGELOG.md +0 -49
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-0.2.7 → labfreed-0.2.8}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Reto Thürer
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Reto Thürer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: labfreed
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
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 'b','l','a' 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 'b','l','a' 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: 't','e','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:20250514T102232.171:T:FOO:: │
|
|
261
|
+
>> │ 1.1:20250514T102232.171:T:BAR:: │
|
|
262
|
+
>> │ 1.3:20250514T102232.171: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:20250514T102232.171:T:FOO::1.1:20250514T102232.171:T:BAR::1.3:20250514T102232.171: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,9 @@ for sg in service_groups:
|
|
|
327
332
|
|
|
328
333
|
<!-- BEGIN CHANGELOG -->
|
|
329
334
|
## Change Log
|
|
335
|
+
### v0.2.8
|
|
336
|
+
- option to pass cache to resolver for speedier check of service availability
|
|
337
|
+
|
|
330
338
|
### v0.2.7
|
|
331
339
|
- Improved README. No functional changes
|
|
332
340
|
|