labfreed 0.2.5a3__py3-none-any.whl → 0.2.5a4__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 CHANGED
@@ -2,7 +2,7 @@
2
2
  Python implementation of LabFREED building blocks
3
3
  '''
4
4
 
5
- __version__ = "0.2.5a3"
5
+ __version__ = "0.2.5a4"
6
6
 
7
7
  from labfreed.pac_id import * # noqa: F403
8
8
  from labfreed.pac_cat import * # noqa: F403
@@ -2,7 +2,7 @@
2
2
 
3
3
  from datetime import date, datetime, time
4
4
  from typing import Union
5
- from pydantic import BaseModel, Field, PrivateAttr
5
+ from pydantic import BaseModel, Field, PrivateAttr, model_validator
6
6
 
7
7
  from labfreed.utilities.base36 import base36
8
8
  from labfreed.trex.python_convenience.quantity import Quantity
@@ -16,6 +16,17 @@ class DataTable(BaseModel):
16
16
  @property
17
17
  def row_template(self):
18
18
  return self._row_template
19
+
20
+ @model_validator(mode='after')
21
+ def get_row_template(self):
22
+ for r in self.data:
23
+ if all(r):
24
+ self._row_template = r.copy()
25
+ break
26
+ if not self._row_template:
27
+ raise ValueError('All columns contained at least one None. This is invalid')
28
+ return self
29
+
19
30
 
20
31
  def append(self, row:list):
21
32
  if not isinstance(row, list):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: labfreed
3
- Version: 0.2.5a3
3
+ Version: 0.2.5a4
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
@@ -1,4 +1,4 @@
1
- labfreed/__init__.py,sha256=Buw-woPEkZDc6A5exI5yCfc1viYotHGkIPJJ0ikJeLs,338
1
+ labfreed/__init__.py,sha256=n9fsbpbDwlKvty_kYBLFTKsYakyrZ7x92iA6eQ8x8y8,338
2
2
  labfreed/labfreed_infrastructure.py,sha256=yxZkI0mPrHyeZGWKtgFIV9R54edSUcww-w1ExHt8F-o,9990
3
3
  labfreed/pac_cat/__init__.py,sha256=S4T-QgzcEDjup44WvHCY3_K30B6_e8ducR--DxBb_DM,554
4
4
  labfreed/pac_cat/category_base.py,sha256=lFQNiTUukyhWdaSCAI7CZxLtj6kNtnBCE4UsePwsGqE,1801
@@ -23,7 +23,7 @@ labfreed/trex/trex.py,sha256=WDoPvuhiilLtRSIkntCmDGkFBnD6oRZg0E6hhoV-I2g,2400
23
23
  labfreed/trex/trex_base_models.py,sha256=3twGEZLYEznUyJ_ctcTcPYsy1qOciMRqLcslE9dxEqw,7567
24
24
  labfreed/trex/value_segments.py,sha256=mmjyEKWLlDIoiFlk2wKELOfWn2_0xwreNEBTs8RgjOY,3774
25
25
  labfreed/trex/python_convenience/__init__.py,sha256=dyAQG7t-uYN6VfGXbWIq2bHxGcGI63l7FS2-VPYs2RQ,137
26
- labfreed/trex/python_convenience/data_table.py,sha256=PRV9mTvH3KgbiernbvqWNaCYLOqhpPX6fnazw4sndOM,1764
26
+ labfreed/trex/python_convenience/data_table.py,sha256=ixa51OvJYfGY3oWv-eRSKaPEDdtQ5sdxnm-U3DKYrkQ,2132
27
27
  labfreed/trex/python_convenience/pyTREX.py,sha256=7L1K1sLajl8yE-i1NIjVGnxx1SZJDNDM4pvK9fXK4iQ,10147
28
28
  labfreed/trex/python_convenience/quantity.py,sha256=d3w-ThY4Cp7n3fde8pct-X5kHc7vbVe1xsJQKROnLks,1470
29
29
  labfreed/utilities/base36.py,sha256=_yX8aQ1OwrK5tnJU1NUEzQSFGr9xAVnNvPObpNzCPYs,2895
@@ -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.5a3.dist-info/licenses/LICENSE,sha256=gHFOv9FRKHxO8cInP3YXyPoJnuNeqrvcHjaE_wPSsQ8,1100
42
- labfreed-0.2.5a3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
43
- labfreed-0.2.5a3.dist-info/METADATA,sha256=jdBi_vxk8M2kLxgPYD6yQr2Sx5m4Peo1zfZp-67O48s,18092
44
- labfreed-0.2.5a3.dist-info/RECORD,,
41
+ labfreed-0.2.5a4.dist-info/licenses/LICENSE,sha256=gHFOv9FRKHxO8cInP3YXyPoJnuNeqrvcHjaE_wPSsQ8,1100
42
+ labfreed-0.2.5a4.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
43
+ labfreed-0.2.5a4.dist-info/METADATA,sha256=kimNXeRBNPIgaa0h93xXUllwkDG67KC4EPmbrfka0Uc,18092
44
+ labfreed-0.2.5a4.dist-info/RECORD,,