labfreed 0.2.5a1__tar.gz → 0.2.5a3__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.5a1 → labfreed-0.2.5a3}/PKG-INFO +1 -1
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/__init__.py +1 -1
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/python_convenience/pyTREX.py +8 -3
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/table_segment.py +1 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/.github/workflows/pypi-publish.yml +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/.github/workflows/run-tests.yml +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/CHANGELOG.md +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/LICENSE +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/README.md +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/labfreed_infrastructure.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_cat/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_cat/category_base.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_cat/pac_cat.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_cat/predefined_categories.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id/extension.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id/id_segment.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id/pac_id.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id/url_parser.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id/url_serializer.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id_resolver/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id_resolver/cit_v1.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id_resolver/cit_v2.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id_resolver/resolver.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/pac_id_resolver/services.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/qr/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/qr/generate_qr.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/python_convenience/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/python_convenience/data_table.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/python_convenience/quantity.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/trex.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/trex_base_models.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/trex/value_segments.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/utilities/base36.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_extensions/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_extensions/default_extension_interpreters.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_extensions/display_name_extension.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_extensions/trex_extension.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_keys/gs1/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_keys/gs1/gs1.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_keys/labfreed/well_known_keys.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_keys/unece/__init__.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/labfreed/well_known_keys/unece/unece_units.py +0 -0
- {labfreed-0.2.5a1 → labfreed-0.2.5a3}/pyproject.toml +0 -0
|
@@ -12,7 +12,7 @@ from labfreed.trex.python_convenience.quantity import Quantity, unece_unit_code_
|
|
|
12
12
|
from labfreed.trex.table_segment import ColumnHeader, TableSegment
|
|
13
13
|
from labfreed.trex.trex import TREX
|
|
14
14
|
from labfreed.trex.trex_base_models import AlphanumericValue, BinaryValue, BoolValue, DateValue, ErrorValue, NumericValue, TextValue
|
|
15
|
-
from labfreed.trex.value_segments import BoolSegment, TextSegment, NumericSegment, AlphanumericSegment, DateSegment, ValueSegment
|
|
15
|
+
from labfreed.trex.value_segments import BoolSegment, ErrorSegment, TextSegment, NumericSegment, AlphanumericSegment, DateSegment, ValueSegment
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class pyTREX(RootModel[dict[str, Quantity | datetime | time | date | bool | str | base36 | DataTable]]):
|
|
@@ -33,7 +33,10 @@ class pyTREX(RootModel[dict[str, Quantity | datetime | time | date | bool | str
|
|
|
33
33
|
'''Creates a TREX'''
|
|
34
34
|
segments = list()
|
|
35
35
|
for k, v in self.root.items():
|
|
36
|
-
if
|
|
36
|
+
if v is None:
|
|
37
|
+
value = _error_value_from_python_type(v)
|
|
38
|
+
segments.append(ErrorSegment(key=k, value=value.value))
|
|
39
|
+
elif isinstance(v, bool):
|
|
37
40
|
value = _bool_value_from_python_type(v)
|
|
38
41
|
segments.append(BoolSegment(key=k, value=value.value))
|
|
39
42
|
elif isinstance(v, Quantity):
|
|
@@ -84,7 +87,7 @@ class pyTREX(RootModel[dict[str, Quantity | datetime | time | date | bool | str
|
|
|
84
87
|
r = []
|
|
85
88
|
for e in row:
|
|
86
89
|
if e is None:
|
|
87
|
-
r.append(_error_value_from_python_type)
|
|
90
|
+
r.append(_error_value_from_python_type(e))
|
|
88
91
|
elif isinstance(e, bool): # must come first otherwise int matches the bool
|
|
89
92
|
r.append(_bool_value_from_python_type(e))
|
|
90
93
|
elif isinstance(e, Quantity):
|
|
@@ -167,6 +170,8 @@ def _binary_value_from_python_type(v:base36|str):
|
|
|
167
170
|
|
|
168
171
|
|
|
169
172
|
def _error_value_from_python_type(v:str):
|
|
173
|
+
if v is None:
|
|
174
|
+
v = '-'
|
|
170
175
|
return ErrorValue(value = v)
|
|
171
176
|
|
|
172
177
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labfreed-0.2.5a1 → labfreed-0.2.5a3}/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
|
|
File without changes
|