labfreed 0.2.5a10__py3-none-any.whl → 0.2.5a12__py3-none-any.whl
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/__init__.py +1 -1
- labfreed/pac_cat/__init__.py +1 -1
- labfreed/trex/python_convenience/pyTREX.py +3 -2
- labfreed/trex/trex_base_models.py +1 -2
- labfreed/trex/value_segments.py +0 -2
- {labfreed-0.2.5a10.dist-info → labfreed-0.2.5a12.dist-info}/METADATA +1 -1
- {labfreed-0.2.5a10.dist-info → labfreed-0.2.5a12.dist-info}/RECORD +9 -9
- {labfreed-0.2.5a10.dist-info → labfreed-0.2.5a12.dist-info}/WHEEL +0 -0
- {labfreed-0.2.5a10.dist-info → labfreed-0.2.5a12.dist-info}/licenses/LICENSE +0 -0
labfreed/__init__.py
CHANGED
labfreed/pac_cat/__init__.py
CHANGED
|
@@ -2,7 +2,7 @@ from .pac_cat import PAC_CAT
|
|
|
2
2
|
from .category_base import Category
|
|
3
3
|
from .predefined_categories import (
|
|
4
4
|
Material_Device, Material_Substance, Material_Consumable, Material_Misc, Data_Method, Data_Result, Data_Progress,
|
|
5
|
-
Data_Calibration, Data_Abstract, category_key_to_class_map
|
|
5
|
+
Data_Calibration, Data_Abstract, category_key_to_class_map # noqa: F401
|
|
6
6
|
)
|
|
7
7
|
|
|
8
8
|
__all__ = [
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
from datetime import date, datetime, time
|
|
3
3
|
import logging
|
|
4
4
|
import re
|
|
5
|
+
from typing import Self
|
|
5
6
|
|
|
6
7
|
from pydantic import RootModel
|
|
7
8
|
from labfreed.well_known_keys.unece.unece_units import unece_unit
|
|
@@ -24,7 +25,7 @@ class pyTREX(RootModel[dict[str, Quantity | datetime | time | date | bool | str
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
@classmethod
|
|
27
|
-
def from_trex(cls, trex:TREX) ->
|
|
28
|
+
def from_trex(cls, trex:TREX) -> Self:
|
|
28
29
|
'''Creates a pyTREX from a TREX'''
|
|
29
30
|
return {seg.key: _trex_segment_to_python_type(seg) for seg in trex.segments}
|
|
30
31
|
|
|
@@ -208,7 +209,7 @@ def _trex_value_to_python_type(v):
|
|
|
208
209
|
'''Converts a TREX value to the corresponding python type'''
|
|
209
210
|
if isinstance(v, NumericValue):
|
|
210
211
|
if '.' not in v.value and 'E' not in v.value:
|
|
211
|
-
return int(v)
|
|
212
|
+
return int(v.value)
|
|
212
213
|
else:
|
|
213
214
|
return float(v.value)
|
|
214
215
|
|
labfreed/trex/value_segments.py
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
from abc import ABC
|
|
2
|
-
import logging
|
|
3
2
|
import re
|
|
4
3
|
from typing import Literal
|
|
5
4
|
from pydantic import Field, model_validator
|
|
6
|
-
from labfreed.utilities.base36 import base36
|
|
7
5
|
from labfreed.well_known_keys.unece.unece_units import unece_unit_codes
|
|
8
6
|
from labfreed.labfreed_infrastructure import ValidationMsgLevel
|
|
9
7
|
from labfreed.trex.trex_base_models import AlphanumericValue, BinaryValue, BoolValue, DateValue, ErrorValue, NumericValue, TREX_Segment, TextValue, Value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
labfreed/__init__.py,sha256=
|
|
1
|
+
labfreed/__init__.py,sha256=CyWg7r3iov_xVpMfaPsrTOI85vAFsQc7i2vHVchuK0I,339
|
|
2
2
|
labfreed/labfreed_infrastructure.py,sha256=yxZkI0mPrHyeZGWKtgFIV9R54edSUcww-w1ExHt8F-o,9990
|
|
3
|
-
labfreed/pac_cat/__init__.py,sha256=
|
|
3
|
+
labfreed/pac_cat/__init__.py,sha256=KNPtQzBD1XVohvG_ucOs7RJj-oi6biUTGB1k-T2o6pk,568
|
|
4
4
|
labfreed/pac_cat/category_base.py,sha256=lFQNiTUukyhWdaSCAI7CZxLtj6kNtnBCE4UsePwsGqE,1801
|
|
5
5
|
labfreed/pac_cat/pac_cat.py,sha256=AJUYDsyGOHy-sRRpXpY0awtbf3HCvn3RhMax6ofvYRA,5318
|
|
6
6
|
labfreed/pac_cat/predefined_categories.py,sha256=5wnMCj-CrACV2W4lH13w7qynWIwi506G3uLNcxuJQGg,8832
|
|
@@ -20,11 +20,11 @@ labfreed/qr/generate_qr.py,sha256=mSt-U872O3ReHB_UdS-MzYu0wRgdlKcAOEfTxg5CLRk,16
|
|
|
20
20
|
labfreed/trex/__init__.py,sha256=r0MYrGk_XxsqSKo9c2i9jRXApTDeTZD8QRXcRpkOVXY,428
|
|
21
21
|
labfreed/trex/table_segment.py,sha256=qlItBK1x3Qr7KUSM_L6dcmv3Y2fNhiqTaiXbXm5BKs0,9154
|
|
22
22
|
labfreed/trex/trex.py,sha256=WDoPvuhiilLtRSIkntCmDGkFBnD6oRZg0E6hhoV-I2g,2400
|
|
23
|
-
labfreed/trex/trex_base_models.py,sha256=
|
|
24
|
-
labfreed/trex/value_segments.py,sha256=
|
|
23
|
+
labfreed/trex/trex_base_models.py,sha256=591559BISc82fyIoEP_dq_GHDbPCVzApx7FM3TRQPlY,7545
|
|
24
|
+
labfreed/trex/value_segments.py,sha256=qizDsinE-ddta8jzkJbGT3OUjHpYhI2GwxjZ6InzLDs,3712
|
|
25
25
|
labfreed/trex/python_convenience/__init__.py,sha256=dyAQG7t-uYN6VfGXbWIq2bHxGcGI63l7FS2-VPYs2RQ,137
|
|
26
26
|
labfreed/trex/python_convenience/data_table.py,sha256=7iO5ZmIGGAKHR4pkShEG0tH1lj95-D52GhW2bQ1fXx4,2920
|
|
27
|
-
labfreed/trex/python_convenience/pyTREX.py,sha256=
|
|
27
|
+
labfreed/trex/python_convenience/pyTREX.py,sha256=U026jtsESo1h2H_EQi11A9AksafjRXgRsbWOwmI9z0E,10147
|
|
28
28
|
labfreed/trex/python_convenience/quantity.py,sha256=NlbKsXmr-nvN42gLw1gGn7GVRTdaIuYZky7SLekdhI8,1729
|
|
29
29
|
labfreed/utilities/base36.py,sha256=_yX8aQ1OwrK5tnJU1NUEzQSFGr9xAVnNvPObpNzCPYs,2895
|
|
30
30
|
labfreed/well_known_extensions/__init__.py,sha256=CjZTjx8Cn8763Hhnv_--Wj1LcFpFs2cyQwWrrzOS4xM,246
|
|
@@ -38,7 +38,7 @@ labfreed/well_known_keys/labfreed/well_known_keys.py,sha256=nqk66kHdSwJTJfMKlP-x
|
|
|
38
38
|
labfreed/well_known_keys/unece/UneceUnits.json,sha256=kwfQSp_nTuWbADfBBgqTWrvPl6XtM5SedEVLbMJrM7M,898953
|
|
39
39
|
labfreed/well_known_keys/unece/__init__.py,sha256=MSP9lmjg9_D9iqG9Yq2_ajYfQSNS9wIT7FXA1c--59M,122
|
|
40
40
|
labfreed/well_known_keys/unece/unece_units.py,sha256=gNDQk6KGl-nGMf9Ycq_fQ8P2xxKITgLkcQWPd4H49gI,1630
|
|
41
|
-
labfreed-0.2.
|
|
42
|
-
labfreed-0.2.
|
|
43
|
-
labfreed-0.2.
|
|
44
|
-
labfreed-0.2.
|
|
41
|
+
labfreed-0.2.5a12.dist-info/licenses/LICENSE,sha256=gHFOv9FRKHxO8cInP3YXyPoJnuNeqrvcHjaE_wPSsQ8,1100
|
|
42
|
+
labfreed-0.2.5a12.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
43
|
+
labfreed-0.2.5a12.dist-info/METADATA,sha256=8mhbHmfXPtskSfFoTKIkJegf-S8wwtIQkrolNEgeEv0,18093
|
|
44
|
+
labfreed-0.2.5a12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|