pyarrow-assert 0.3.6__tar.gz → 0.3.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.
@@ -1,24 +1,21 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyarrow-assert
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: Dora Node for plotting text and bbox on image with OpenCV
5
5
  Home-page: https://github.com/dora-rs/dora.git
6
6
  License: MIT
7
7
  Author: Haixuan Xavier Tao
8
8
  Author-email: tao.xavier@outlook.com
9
+ Requires-Python: >=3.7,<4.0
9
10
  Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 2
11
- Classifier: Programming Language :: Python :: 2.7
12
11
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.4
14
- Classifier: Programming Language :: Python :: 3.5
15
- Classifier: Programming Language :: Python :: 3.6
16
12
  Classifier: Programming Language :: Python :: 3.7
17
13
  Classifier: Programming Language :: Python :: 3.8
18
14
  Classifier: Programming Language :: Python :: 3.9
19
15
  Classifier: Programming Language :: Python :: 3.10
20
16
  Classifier: Programming Language :: Python :: 3.11
21
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
22
19
  Requires-Dist: dora-rs (>=0.3.6,<0.4.0)
23
20
  Requires-Dist: numpy (<2.0.0)
24
21
  Requires-Dist: pyarrow (>=5.0.0)
@@ -2,7 +2,7 @@ import argparse
2
2
  import os
3
3
  import ast
4
4
 
5
-
5
+ import pyarrow as pa
6
6
  from dora import Node
7
7
 
8
8
  RUNNER_CI = True if os.getenv("CI") == "true" else False
@@ -36,12 +36,23 @@ def main():
36
36
  args.name
37
37
  ) # provide the name to connect to the dataflow if dynamic node
38
38
 
39
- assert_data = ast.literal_eval(data)
39
+ data = ast.literal_eval(data)
40
+
41
+ if isinstance(data, list):
42
+ data = pa.array(data) # initialize pyarrow array
43
+ elif isinstance(data, str):
44
+ data = pa.array([data])
45
+ elif isinstance(data, int):
46
+ data = pa.array([data])
47
+ elif isinstance(data, float):
48
+ data = pa.array([data])
49
+ else:
50
+ data = pa.array(data) # initialize pyarrow array
40
51
 
41
52
  for event in node:
42
53
  if event["type"] == "INPUT":
43
54
  value = event["value"]
44
- assert value == assert_data, f"Expected {assert_data}, got {value}"
55
+ assert value == data, f"Expected {data}, got {value}"
45
56
 
46
57
 
47
58
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyarrow-assert"
3
- version = "0.3.6"
3
+ version = "0.3.7"
4
4
  authors = [
5
5
  "Haixuan Xavier Tao <tao.xavier@outlook.com>",
6
6
  "Enzo Le Van <dev@enzo-le-van.fr>",
@@ -16,6 +16,7 @@ packages = [{ include = "pyarrow_assert" }]
16
16
  dora-rs = "^0.3.6"
17
17
  numpy = "< 2.0.0"
18
18
  pyarrow = ">= 5.0.0"
19
+ python = "^3.7"
19
20
 
20
21
  [tool.poetry.scripts]
21
22
  pyarrow-assert = "pyarrow_assert.main:main"
@@ -23,6 +24,3 @@ pyarrow-assert = "pyarrow_assert.main:main"
23
24
  [build-system]
24
25
  requires = ["poetry-core>=1.8.0"]
25
26
  build-backend = "poetry.core.masonry.api"
26
-
27
- [project]
28
- readme = "README.md"
File without changes