labfreed 0.2.5a22__tar.gz → 0.2.6a2__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.6a2}/CHANGELOG.md +1 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/PKG-INFO +21 -9
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/README.md +16 -8
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/__init__.py +1 -1
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/labfreed_infrastructure.py +3 -1
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id/url_parser.py +2 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id_resolver/cit_v1.py +5 -2
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id_resolver/resolver.py +19 -10
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/pyproject.toml +6 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/.github/workflows/pypi-publish.yml +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/.github/workflows/run-tests.yml +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/LICENSE +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_cat/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_cat/category_base.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_cat/pac_cat.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_cat/predefined_categories.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id/extension.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id/id_segment.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id/pac_id.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id/url_serializer.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id_resolver/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id_resolver/cit_v2.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/pac_id_resolver/services.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/qr/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/qr/generate_qr.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/python_convenience/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/python_convenience/data_table.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/python_convenience/pyTREX.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/python_convenience/quantity.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/table_segment.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/trex.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/trex_base_models.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/trex/value_segments.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/utilities/base36.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_extensions/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_extensions/default_extension_interpreters.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_extensions/display_name_extension.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_extensions/trex_extension.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_keys/gs1/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_keys/gs1/gs1.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_keys/labfreed/well_known_keys.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/labfreed/well_known_keys/unece/__init__.py +0 -0
- {labfreed-0.2.5a22 → labfreed-0.2.6a2}/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.6a2
|
|
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,7 +105,7 @@ pac.print_validation_messages()
|
|
|
101
105
|
>> Validation Results
|
|
102
106
|
>> ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
103
107
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
104
|
-
>> │ Characters '
|
|
108
|
+
>> │ Characters 'b','l','a' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
105
109
|
>> │ │
|
|
106
110
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/240:👉bal👈500/21:@1234 │
|
|
107
111
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -111,7 +115,7 @@ pac.print_validation_messages()
|
|
|
111
115
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/240:bal500/21:👉@👈1234 │
|
|
112
116
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
113
117
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
114
|
-
>> │ Characters '
|
|
118
|
+
>> │ Characters 'b','l','a' should not be used., Characters SHOULD be limited to upper case letters (A-Z), numbers (0-9), '-' and '+' │
|
|
115
119
|
>> │ │
|
|
116
120
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/240:👉bal👈500/21:@1234 │
|
|
117
121
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -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: 'e','a','t' │
|
|
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:20250430T100239.279:T:FOO:: │
|
|
260
|
+
>> │ 1.1:20250430T100239.280:T:BAR:: │
|
|
261
|
+
>> │ 1.3:20250430T100239.280: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:20250430T100239.279:T:FOO::1.1:20250430T100239.280:T:BAR::1.3:20250430T100239.280: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
|
```
|
|
@@ -324,6 +327,15 @@ for sg in service_groups:
|
|
|
324
327
|
|
|
325
328
|
<!-- BEGIN CHANGELOG -->
|
|
326
329
|
## Change Log
|
|
330
|
+
### v0.2.5
|
|
331
|
+
- resolvers checks service states by default
|
|
332
|
+
- improvements and bugfixes in conversion from python types to TREX
|
|
333
|
+
- follow better naming conventions in CIT v1
|
|
334
|
+
|
|
335
|
+
### v0.2.4
|
|
336
|
+
- improvements in formatting of validation messages
|
|
337
|
+
- bugfix in DataTable
|
|
338
|
+
|
|
327
339
|
### v0.2.3
|
|
328
340
|
- improvements in formatting of validation messages
|
|
329
341
|
- bugfix in DisplayNameExtension
|
|
@@ -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 'b','l','a' 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/240:👉bal👈500/21:@1234 │
|
|
76
76
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -80,7 +80,7 @@ pac.print_validation_messages()
|
|
|
80
80
|
>> │ HTTPS://PAC.METTORIUS.COM/-MD/240:bal500/21:👉@👈1234 │
|
|
81
81
|
>> ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
|
82
82
|
>> │ **RECOMMENDATION** in id segment value bal500 │
|
|
83
|
-
>> │ Characters '
|
|
83
|
+
>> │ Characters 'b','l','a' 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/240:👉bal👈500/21:@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','a','t' │
|
|
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:20250430T100239.279:T:FOO:: │
|
|
225
|
+
>> │ 1.1:20250430T100239.280:T:BAR:: │
|
|
226
|
+
>> │ 1.3:20250430T100239.280:F:BLUBB │
|
|
227
227
|
>> └────────────────────────────────────────────────────────────┘
|
|
228
228
|
```
|
|
229
229
|
#### Combine PAC-ID and TREX and serialize
|
|
@@ -235,7 +235,7 @@ 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:20250430T100239.279:T:FOO::1.1:20250430T100239.280:T:BAR::1.3:20250430T100239.280:F:BLUBB
|
|
239
239
|
```
|
|
240
240
|
## PAC-ID Resolver
|
|
241
241
|
|
|
@@ -261,7 +261,6 @@ cit2.origin = 'MY_COMPANY'
|
|
|
261
261
|
pac_str = 'HTTPS://PAC.METTORIUS.COM/-MS/X3511/CAS:7732-18-5'
|
|
262
262
|
service_groups = PAC_ID_Resolver(cits=[cit, cit2]).resolve(pac_str)
|
|
263
263
|
for sg in service_groups:
|
|
264
|
-
sg.update_states()
|
|
265
264
|
sg.print()
|
|
266
265
|
|
|
267
266
|
```
|
|
@@ -293,6 +292,15 @@ for sg in service_groups:
|
|
|
293
292
|
|
|
294
293
|
<!-- BEGIN CHANGELOG -->
|
|
295
294
|
## Change Log
|
|
295
|
+
### v0.2.5
|
|
296
|
+
- resolvers checks service states by default
|
|
297
|
+
- improvements and bugfixes in conversion from python types to TREX
|
|
298
|
+
- follow better naming conventions in CIT v1
|
|
299
|
+
|
|
300
|
+
### v0.2.4
|
|
301
|
+
- improvements in formatting of validation messages
|
|
302
|
+
- bugfix in DataTable
|
|
303
|
+
|
|
296
304
|
### v0.2.3
|
|
297
305
|
- improvements in formatting of validation messages
|
|
298
306
|
- bugfix in DisplayNameExtension
|
|
@@ -179,6 +179,7 @@ class LabFREED_BaseModel(PDOC_Workaround_Base):
|
|
|
179
179
|
|
|
180
180
|
logging.info(table)
|
|
181
181
|
print(table)
|
|
182
|
+
return table
|
|
182
183
|
|
|
183
184
|
|
|
184
185
|
def format_validation_messages(self, target='console') -> list[str]:
|
|
@@ -195,7 +196,7 @@ class LabFREED_BaseModel(PDOC_Workaround_Base):
|
|
|
195
196
|
if m.level == ValidationMsgLevel.ERROR:
|
|
196
197
|
color = 'red'
|
|
197
198
|
else:
|
|
198
|
-
color = '
|
|
199
|
+
color = 'orange'
|
|
199
200
|
|
|
200
201
|
match target:
|
|
201
202
|
case 'markdown':
|
|
@@ -217,6 +218,7 @@ class LabFREED_BaseModel(PDOC_Workaround_Base):
|
|
|
217
218
|
br = '<br>'
|
|
218
219
|
|
|
219
220
|
serialized = str(self)
|
|
221
|
+
serialized.replace('\n', br)
|
|
220
222
|
emphazised_highlight = self._emphasize_in(m, serialized, fmt=fmt)
|
|
221
223
|
emphazised_highlight = emphazised_highlight.replace('👈👉','') # removes two consecutive markers, to make it cleaner
|
|
222
224
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
import logging
|
|
3
4
|
import re
|
|
4
5
|
from types import MappingProxyType
|
|
5
6
|
|
|
@@ -73,6 +74,7 @@ class PAC_Parser():
|
|
|
73
74
|
pac_id.extensions = extensions
|
|
74
75
|
|
|
75
76
|
if not pac_id.is_valid and not suppress_validation_errors:
|
|
77
|
+
logging.error(pac_id.print_validation_messages())
|
|
76
78
|
raise LabFREED_ValidationError(validation_msgs = pac_id._get_nested_validation_messages())
|
|
77
79
|
|
|
78
80
|
return pac_id
|
|
@@ -48,6 +48,7 @@ class CIT_v1(LabFREED_BaseModel):
|
|
|
48
48
|
applicable_if = cols[3],
|
|
49
49
|
template_url = cols[4]
|
|
50
50
|
)
|
|
51
|
+
entries.append(entry)
|
|
51
52
|
except ValueError:
|
|
52
53
|
logging.error(f'invalid line {line}')
|
|
53
54
|
msg = ValidationMessage(
|
|
@@ -59,13 +60,15 @@ class CIT_v1(LabFREED_BaseModel):
|
|
|
59
60
|
)
|
|
60
61
|
errors.append(msg)
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
|
|
63
64
|
cit = CIT_v1(origin=origin, entries=entries)
|
|
64
65
|
cit._validation_messages.extend(errors)
|
|
65
66
|
cit._csv_original = csv
|
|
66
67
|
return cit
|
|
67
68
|
|
|
68
|
-
def evaluate_pac_id(self, pac):
|
|
69
|
+
def evaluate_pac_id(self, pac:PAC_ID):
|
|
70
|
+
if not type(pac) is PAC_ID:
|
|
71
|
+
raise ValueError(f'CIT v1 does only handle PAC-IDs. PAC-CAT it does not know what to do')
|
|
69
72
|
cit_evaluated = ServiceGroup(origin=self.origin)
|
|
70
73
|
for e in self.entries:
|
|
71
74
|
conditions = e.applicable_if.split(';')
|
|
@@ -19,18 +19,19 @@ __all__ = ["PAC_ID_Resolver"]
|
|
|
19
19
|
def load_cit(path):
|
|
20
20
|
with open(path, 'r') as f:
|
|
21
21
|
s = f.read()
|
|
22
|
-
return
|
|
22
|
+
return cit_from_str(s)
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
def
|
|
25
|
+
def cit_from_str(s:str, origin:str='') -> CIT_v1|CIT_v2:
|
|
26
26
|
try:
|
|
27
27
|
cit_yml= yaml.safe_load(s)
|
|
28
28
|
cit2 = CIT_v2.from_yaml(cit_yml)
|
|
29
|
+
cit_version = 'v2'
|
|
29
30
|
except Exception:
|
|
30
31
|
cit2 = None
|
|
31
|
-
|
|
32
32
|
try:
|
|
33
|
-
cit1 = CIT_v1.from_csv(s,
|
|
33
|
+
cit1 = CIT_v1.from_csv(s, origin)
|
|
34
|
+
cit_version = 'v1'
|
|
34
35
|
except Exception:
|
|
35
36
|
cit1 = None
|
|
36
37
|
|
|
@@ -50,7 +51,7 @@ def _get_issuer_cit(issuer:str):
|
|
|
50
51
|
except Exception:
|
|
51
52
|
logging.error(f"Could not get CIT form {issuer}")
|
|
52
53
|
cit_str = None
|
|
53
|
-
cit =
|
|
54
|
+
cit = cit_from_str(cit_str, origin=issuer)
|
|
54
55
|
return cit
|
|
55
56
|
|
|
56
57
|
|
|
@@ -63,15 +64,23 @@ class PAC_ID_Resolver():
|
|
|
63
64
|
self._cits = cits
|
|
64
65
|
|
|
65
66
|
|
|
66
|
-
def resolve(self,
|
|
67
|
+
def resolve(self, pac_url:PAC_ID|str, check_service_status=True) -> list[ServiceGroup]:
|
|
67
68
|
'''Resolve a PAC-ID'''
|
|
68
|
-
if isinstance(
|
|
69
|
-
pac_id = PAC_CAT.from_url(
|
|
69
|
+
if isinstance(pac_url, str):
|
|
70
|
+
pac_id = PAC_CAT.from_url(pac_url)
|
|
71
|
+
pac_id_catless = PAC_ID.from_url(pac_url, try_pac_cat=False)
|
|
70
72
|
|
|
73
|
+
cits = self._cits.copy()
|
|
71
74
|
if issuer_cit := _get_issuer_cit(pac_id.issuer):
|
|
72
|
-
|
|
75
|
+
cits.append(issuer_cit)
|
|
73
76
|
|
|
74
|
-
matches = [
|
|
77
|
+
matches = []
|
|
78
|
+
for cit in cits:
|
|
79
|
+
if isinstance(cit, CIT_v1):
|
|
80
|
+
# cit v1 has no concept of categories and implied keys. It would treat these segments as value segment
|
|
81
|
+
matches.append(cit.evaluate_pac_id(pac_id_catless))
|
|
82
|
+
else:
|
|
83
|
+
matches.append(cit.evaluate_pac_id(pac_id))
|
|
75
84
|
|
|
76
85
|
if check_service_status:
|
|
77
86
|
for m in matches:
|
|
@@ -39,6 +39,12 @@ dev = [
|
|
|
39
39
|
"ruff>=0.11.5"
|
|
40
40
|
]
|
|
41
41
|
|
|
42
|
+
[project.urls]
|
|
43
|
+
Homepage = "https://github.com/retothuerer/LabFREED"
|
|
44
|
+
Documentation = "https://github.com/retothuerer/LabFREED?tab=readme-ov-file#readme"
|
|
45
|
+
Source = "https://github.com/retothuerer/LabFREED"
|
|
46
|
+
Tracker = "https://github.com/retothuerer/LabFREED/issues"
|
|
47
|
+
|
|
42
48
|
[tool.flit.module]
|
|
43
49
|
name = "labfreed"
|
|
44
50
|
|
|
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.5a22 → labfreed-0.2.6a2}/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
|