labfreed 0.2.5a22__tar.gz → 0.2.6__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.5a22 → labfreed-0.2.6}/LICENSE +21 -21
- {labfreed-0.2.5a22 → labfreed-0.2.6}/PKG-INFO +37 -21
- {labfreed-0.2.5a22 → labfreed-0.2.6}/README.md +344 -332
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/__init__.py +11 -11
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/labfreed_infrastructure.py +258 -256
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_cat/__init__.py +19 -19
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_cat/category_base.py +51 -51
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_cat/pac_cat.py +150 -150
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_cat/predefined_categories.py +200 -200
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id/__init__.py +19 -19
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id/extension.py +48 -48
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id/id_segment.py +89 -89
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id/pac_id.py +140 -140
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id/url_parser.py +155 -153
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id/url_serializer.py +84 -80
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id_resolver/__init__.py +2 -2
- labfreed-0.2.6/labfreed/pac_id_resolver/cit_common.py +82 -0
- labfreed-0.2.6/labfreed/pac_id_resolver/cit_v1.py +245 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id_resolver/cit_v2.py +313 -303
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id_resolver/resolver.py +97 -85
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/pac_id_resolver/services.py +79 -79
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/qr/__init__.py +1 -1
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/qr/generate_qr.py +422 -422
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/__init__.py +16 -16
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/python_convenience/__init__.py +3 -3
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/python_convenience/data_table.py +87 -87
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/python_convenience/pyTREX.py +248 -248
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/python_convenience/quantity.py +66 -66
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/table_segment.py +245 -245
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/trex.py +69 -69
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/trex_base_models.py +209 -209
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/trex/value_segments.py +99 -99
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/utilities/base36.py +82 -82
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_extensions/__init__.py +4 -4
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_extensions/default_extension_interpreters.py +6 -6
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_extensions/display_name_extension.py +40 -40
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_extensions/trex_extension.py +30 -30
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_keys/gs1/__init__.py +5 -5
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_keys/gs1/gs1.py +3 -3
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_keys/labfreed/well_known_keys.py +15 -15
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_keys/unece/__init__.py +3 -3
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_keys/unece/unece_units.py +67 -67
- {labfreed-0.2.5a22 → labfreed-0.2.6}/pyproject.toml +65 -59
- labfreed-0.2.5a22/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
- labfreed-0.2.5a22/.github/workflows/pypi-publish.yml +0 -78
- labfreed-0.2.5a22/.github/workflows/run-tests.yml +0 -25
- labfreed-0.2.5a22/CHANGELOG.md +0 -41
- labfreed-0.2.5a22/labfreed/pac_id_resolver/cit_v1.py +0 -149
- {labfreed-0.2.5a22 → labfreed-0.2.6}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6}/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.6
|
|
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
|
|
@@ -27,6 +27,10 @@ Requires-Dist: pytest>=8.3.5 ; extra == "dev"
|
|
|
27
27
|
Requires-Dist: pdoc>=15.0.1 ; extra == "dev"
|
|
28
28
|
Requires-Dist: flit>=3.12.0 ; extra == "dev"
|
|
29
29
|
Requires-Dist: ruff>=0.11.5 ; extra == "dev"
|
|
30
|
+
Project-URL: Documentation, https://github.com/retothuerer/LabFREED?tab=readme-ov-file#readme
|
|
31
|
+
Project-URL: Homepage, https://github.com/retothuerer/LabFREED
|
|
32
|
+
Project-URL: Source, https://github.com/retothuerer/LabFREED
|
|
33
|
+
Project-URL: Tracker, https://github.com/retothuerer/LabFREED/issues
|
|
30
34
|
Provides-Extra: dev
|
|
31
35
|
|
|
32
36
|
# LabFREED for Python
|
|
@@ -101,24 +105,24 @@ pac.print_validation_messages()
|
|
|
101
105
|
>> Validation Results
|
|
102
106
|
>> ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
103
107
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
104
|
-
>> │ Characters '
|
|
108
|
+
>> │ Characters 'l','b','a' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
105
109
|
>> │ │
|
|
106
|
-
>> │ HTTPS://PAC.METTORIUS.COM/-MD
|
|
110
|
+
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
107
111
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
108
112
|
>> │ **RECOMMENDATION** in id segment value @1234 │
|
|
109
113
|
>> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
110
114
|
>> │ │
|
|
111
|
-
>> │ HTTPS://PAC.METTORIUS.COM/-MD/
|
|
115
|
+
>> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234 │
|
|
112
116
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
113
117
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
114
|
-
>> │ Characters '
|
|
118
|
+
>> │ Characters 'l','b','a' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
115
119
|
>> │ │
|
|
116
|
-
>> │ HTTPS://PAC.METTORIUS.COM/-MD
|
|
120
|
+
>> │ HTTPS://PAC.METTORIUS.COM/-MD/👉bal👈500/@1234 │
|
|
117
121
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
118
122
|
>> │ **RECOMMENDATION** in id segment value @1234 │
|
|
119
123
|
>> │ Characters '@' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
120
124
|
>> │ │
|
|
121
|
-
>> │ HTTPS://PAC.METTORIUS.COM/-MD/
|
|
125
|
+
>> │ HTTPS://PAC.METTORIUS.COM/-MD/bal500/👉@👈1234 │
|
|
122
126
|
>> └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
123
127
|
```
|
|
124
128
|
### Save as QR Code
|
|
@@ -148,8 +152,8 @@ if isinstance(pac, PAC_CAT):
|
|
|
148
152
|
```
|
|
149
153
|
```text
|
|
150
154
|
>> Categories in
|
|
151
|
-
>> HTTPS://PAC.METTORIUS.COM/-
|
|
152
|
-
>>
|
|
155
|
+
>> HTTPS://PAC.METTORIUS.COM/-DR/XQ90
|
|
156
|
+
>> 8756/-MD/bal500/@1234
|
|
153
157
|
>> ┌────────────────────┬───────────┐
|
|
154
158
|
>> │ Main Category │ │
|
|
155
159
|
>> │ key () │ -DR │
|
|
@@ -244,7 +248,7 @@ trex.print_validation_messages()
|
|
|
244
248
|
>> Validation Results
|
|
245
249
|
>> ┌────────────────────────────────────────────────────────────┐
|
|
246
250
|
>> │ **ERROR** in TREX table column Date │
|
|
247
|
-
>> │ Column header key contains invalid characters: '
|
|
251
|
+
>> │ Column header key contains invalid characters: 't','a','e' │
|
|
248
252
|
>> │ │
|
|
249
253
|
>> │ STOP$T.D:20240505T1306 │
|
|
250
254
|
>> │ +TEMP$KEL:10.15 │
|
|
@@ -252,9 +256,9 @@ trex.print_validation_messages()
|
|
|
252
256
|
>> │ +COMMENT$T.A:FOO │
|
|
253
257
|
>> │ +COMMENT2$T.T:12G3 │
|
|
254
258
|
>> │ +TABLE$$DURATION$HUR:D👉ate👈$T.D:OK$T.B:COMMENT$T.A:: │
|
|
255
|
-
>> │ 1:
|
|
256
|
-
>> │ 1.1:
|
|
257
|
-
>> │ 1.3:
|
|
259
|
+
>> │ 1:20250509T101159.922:T:FOO:: │
|
|
260
|
+
>> │ 1.1:20250509T101159.922:T:BAR:: │
|
|
261
|
+
>> │ 1.3:20250509T101159.922:F:BLUBB │
|
|
258
262
|
>> └────────────────────────────────────────────────────────────┘
|
|
259
263
|
```
|
|
260
264
|
#### Combine PAC-ID and TREX and serialize
|
|
@@ -266,7 +270,7 @@ pac_str = pac.to_url()
|
|
|
266
270
|
print(pac_str)
|
|
267
271
|
```
|
|
268
272
|
```text
|
|
269
|
-
>> 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:
|
|
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:20250509T101159.922:T:FOO::1.1:20250509T101159.922:T:BAR::1.3:20250509T101159.922:F:BLUBB
|
|
270
274
|
```
|
|
271
275
|
## PAC-ID Resolver
|
|
272
276
|
|
|
@@ -292,7 +296,6 @@ cit2.origin = 'MY_COMPANY'
|
|
|
292
296
|
pac_str = 'HTTPS://PAC.METTORIUS.COM/-MS/X3511/CAS:7732-18-5'
|
|
293
297
|
service_groups = PAC_ID_Resolver(cits=[cit, cit2]).resolve(pac_str)
|
|
294
298
|
for sg in service_groups:
|
|
295
|
-
sg.update_states()
|
|
296
299
|
sg.print()
|
|
297
300
|
|
|
298
301
|
```
|
|
@@ -303,12 +306,12 @@ for sg in service_groups:
|
|
|
303
306
|
>> ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
|
|
304
307
|
>> │ CAS Search │ https://pubchem.ncbi.nlm.nih.gov/#query=7732-18-5 │ ACTIVE │
|
|
305
308
|
>> └──────────────┴───────────────────────────────────────────────────┴───────────┘
|
|
306
|
-
>>
|
|
307
|
-
>>
|
|
308
|
-
>> ┃ Service Name ┃ URL
|
|
309
|
-
>>
|
|
310
|
-
>> │ Chemical Management │ https://chem-manager.com/METTORIUS.COM/-MS/
|
|
311
|
-
>>
|
|
309
|
+
>> Services from origin 'MY_COMPANY
|
|
310
|
+
>> ┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
|
|
311
|
+
>> ┃ Service Name ┃ URL ┃ Reachable ┃
|
|
312
|
+
>> ┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
|
|
313
|
+
>> │ Chemical Management │ https://chem-manager.com/METTORIUS.COM/-MS/X3511/CAS:7732-18-5 │ INACTIVE │
|
|
314
|
+
>> └─────────────────────┴────────────────────────────────────────────────────────────────┴───────────┘
|
|
312
315
|
>> Services from origin 'METTORIUS.COM
|
|
313
316
|
>> ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
|
|
314
317
|
>> ┃ Service Name ┃ URL ┃ Reachable ┃
|
|
@@ -324,6 +327,19 @@ for sg in service_groups:
|
|
|
324
327
|
|
|
325
328
|
<!-- BEGIN CHANGELOG -->
|
|
326
329
|
## Change Log
|
|
330
|
+
### v0.2.6
|
|
331
|
+
- PAC_ID.to_url() preserves the identifier as is by default but allows to force short or long notation.
|
|
332
|
+
- PAC-ID Resolver does not try to resolve PAC-CAT with CIT v1.
|
|
333
|
+
|
|
334
|
+
### v0.2.5
|
|
335
|
+
- resolvers checks service states by default
|
|
336
|
+
- improvements and bugfixes in conversion from python types to TREX
|
|
337
|
+
- follow better naming conventions in CIT v1
|
|
338
|
+
|
|
339
|
+
### v0.2.4
|
|
340
|
+
- improvements in formatting of validation messages
|
|
341
|
+
- bugfix in DataTable
|
|
342
|
+
|
|
327
343
|
### v0.2.3
|
|
328
344
|
- improvements in formatting of validation messages
|
|
329
345
|
- bugfix in DisplayNameExtension
|