labfreed 0.2.5a11__tar.gz → 0.2.5a13__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.5a11 → labfreed-0.2.5a13}/PKG-INFO +1 -1
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/__init__.py +1 -1
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/python_convenience/data_table.py +8 -2
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/python_convenience/pyTREX.py +1 -1
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/.github/workflows/pypi-publish.yml +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/.github/workflows/run-tests.yml +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/CHANGELOG.md +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/LICENSE +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/README.md +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/labfreed_infrastructure.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_cat/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_cat/category_base.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_cat/pac_cat.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_cat/predefined_categories.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id/extension.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id/id_segment.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id/pac_id.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id/url_parser.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id/url_serializer.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id_resolver/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id_resolver/cit_v1.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id_resolver/cit_v2.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id_resolver/resolver.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/pac_id_resolver/services.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/qr/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/qr/generate_qr.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/python_convenience/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/python_convenience/quantity.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/table_segment.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/trex.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/trex_base_models.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/trex/value_segments.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/utilities/base36.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_extensions/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_extensions/default_extension_interpreters.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_extensions/display_name_extension.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_extensions/trex_extension.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/gs1/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/gs1/gs1.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/gs1/gs1_ai_enum_sorted.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/labfreed/well_known_keys.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/unece/UneceUnits.json +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/unece/__init__.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/unece/unece_units.py +0 -0
- {labfreed-0.2.5a11 → labfreed-0.2.5a13}/pyproject.toml +0 -0
|
@@ -19,6 +19,9 @@ class DataTable(BaseModel):
|
|
|
19
19
|
|
|
20
20
|
@model_validator(mode='after')
|
|
21
21
|
def get_row_template(self):
|
|
22
|
+
if not self.data: # data not initialized during construction. This is valid
|
|
23
|
+
return self
|
|
24
|
+
|
|
22
25
|
for r in self.data:
|
|
23
26
|
if all([e is not None for e in r]):
|
|
24
27
|
self._row_template = r.copy()
|
|
@@ -28,7 +31,7 @@ class DataTable(BaseModel):
|
|
|
28
31
|
return self
|
|
29
32
|
|
|
30
33
|
|
|
31
|
-
def append(self, row:list):
|
|
34
|
+
def append(self, row:list, validate=True):
|
|
32
35
|
if not isinstance(row, list):
|
|
33
36
|
raise ValueError('row must be a list of values')
|
|
34
37
|
if not self._row_template:
|
|
@@ -44,13 +47,16 @@ class DataTable(BaseModel):
|
|
|
44
47
|
unit = self._row_template[i].unit
|
|
45
48
|
row[i] = Quantity(value=e, unit=unit)
|
|
46
49
|
self.data.append(row)
|
|
50
|
+
if validate:
|
|
51
|
+
self.model_rebuild()
|
|
47
52
|
|
|
48
53
|
|
|
49
54
|
def extend(self, iterable):
|
|
50
55
|
for item in iterable:
|
|
51
56
|
if not len(item) == len(self._row_template):
|
|
52
57
|
raise ValueError('row is not of same length as the row template.')
|
|
53
|
-
self.
|
|
58
|
+
self.append(item, validate=False)
|
|
59
|
+
self.model_rebuild()
|
|
54
60
|
|
|
55
61
|
|
|
56
62
|
def get_column(self, col:str|int) -> list:
|
|
@@ -209,7 +209,7 @@ def _trex_value_to_python_type(v):
|
|
|
209
209
|
'''Converts a TREX value to the corresponding python type'''
|
|
210
210
|
if isinstance(v, NumericValue):
|
|
211
211
|
if '.' not in v.value and 'E' not in v.value:
|
|
212
|
-
return int(v)
|
|
212
|
+
return int(v.value)
|
|
213
213
|
else:
|
|
214
214
|
return float(v.value)
|
|
215
215
|
|
|
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.5a11 → labfreed-0.2.5a13}/labfreed/well_known_extensions/display_name_extension.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{labfreed-0.2.5a11 → labfreed-0.2.5a13}/labfreed/well_known_keys/labfreed/well_known_keys.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|