labfreed 0.0.5__tar.gz → 0.0.7__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.
- labfreed-0.0.7/PKG-INFO +7 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/TREXExtension/parse.py +12 -5
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/__init__.py +1 -1
- {labfreed-0.0.5 → labfreed-0.0.7}/pyproject.toml +3 -0
- labfreed-0.0.5/PKG-INFO +0 -34
- {labfreed-0.0.5 → labfreed-0.0.7}/.vscode/launch.json +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/.vscode/settings.json +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/LICENSE +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/README.md +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/DisplayNameExtension/DisplayNameExtension.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/DisplayNameExtension/base36.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/PAC_CAT/__init__.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/PAC_CAT/data_model.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/PAC_ID/__init__.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/PAC_ID/data_model.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/PAC_ID/parse.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/PAC_ID/serialize.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/PAC_ID/well_known_segment_keys.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/TREXExtension/data_model.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/TREXExtension/uncertainty.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/TREXExtension/unit_utilities.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/labfreed/validation.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/main.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/pytest.ini +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/tests/test_PAC_CAT/test_PAC_CAT.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/tests/test_PAC_ID/test_pac_id_parse.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/tests/test_PAC_ID/test_pac_id_serialization.py +0 -0
- {labfreed-0.0.5 → labfreed-0.0.7}/tests/test_TREXExtension/test_TREX.py +0 -0
labfreed-0.0.7/PKG-INFO
ADDED
|
@@ -4,7 +4,7 @@ import re
|
|
|
4
4
|
from .data_model import TREX, T_REX_Segment_ParseError, TREX_SimpleSegment, TREX_Table
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
def from_trex_string(trex_str, enforce_type=True) -> TREX:
|
|
7
|
+
def from_trex_string(trex_str, name=None, enforce_type=True) -> TREX:
|
|
8
8
|
if not trex_str:
|
|
9
9
|
raise ValueError(f'T-REX must be a string of non zero length')
|
|
10
10
|
|
|
@@ -17,10 +17,8 @@ def from_trex_string(trex_str, enforce_type=True) -> TREX:
|
|
|
17
17
|
d = re.match('((?P<name>.+)\$(?P<type>.+)/)?(?P<data>.+)', trex_str).groupdict()
|
|
18
18
|
if not d:
|
|
19
19
|
raise ValueError('TREX is invalid.')
|
|
20
|
-
type = d.get('type')
|
|
21
|
-
name = d.get('name')
|
|
22
|
-
data = d.get('data')
|
|
23
20
|
|
|
21
|
+
type = d.get('type')
|
|
24
22
|
if not type:
|
|
25
23
|
logging.warning('No type given. Assume its trex')
|
|
26
24
|
elif type != 'TREX' and enforce_type:
|
|
@@ -28,8 +26,17 @@ def from_trex_string(trex_str, enforce_type=True) -> TREX:
|
|
|
28
26
|
raise ValueError(f'Extension type {type} is not TREX.')
|
|
29
27
|
else:
|
|
30
28
|
logging.warning('Extension type {type} is not TREX. Try anyways')
|
|
29
|
+
|
|
30
|
+
s_name = d.get('name')
|
|
31
|
+
if name and s_name:
|
|
32
|
+
logging.warning(f'conflicting names given. The string contained {s_name}, method parameter was {name}. Method parameter wins.')
|
|
33
|
+
elif not name and not s_name:
|
|
34
|
+
raise ValueError('No extension name was given')
|
|
35
|
+
elif s_name:
|
|
36
|
+
name = s_name
|
|
37
|
+
|
|
38
|
+
data = d.get('data')
|
|
31
39
|
|
|
32
|
-
|
|
33
40
|
segment_strings = data.split('+')
|
|
34
41
|
out_segments = dict()
|
|
35
42
|
for s in segment_strings:
|
labfreed-0.0.5/PKG-INFO
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: labfreed
|
|
3
|
-
Version: 0.0.5
|
|
4
|
-
Summary: Python implementation of LabFREED building blocks
|
|
5
|
-
Author-email: Reto Thürer <thuerer.r@buchi.com>
|
|
6
|
-
Requires-Python: >=3.10
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
License-Expression: MIT
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
|
|
13
|
-
# LabFREED for Python
|
|
14
|
-
|
|
15
|
-
A python implementation of [LabFREED](www.labfreed.com).
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# Examples:
|
|
20
|
-
|
|
21
|
-
## Parse a PAC ID
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Parse a PAC-ID with extensions
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Create a PAC-ID
|
|
29
|
-
|
|
30
|
-
## Create a PAC-ID and T-REX for a titration curve
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|