pyarrow-assert 0.3.6__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.
@@ -0,0 +1,33 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyarrow-assert
3
+ Version: 0.3.6
4
+ Summary: Dora Node for plotting text and bbox on image with OpenCV
5
+ Home-page: https://github.com/dora-rs/dora.git
6
+ License: MIT
7
+ Author: Haixuan Xavier Tao
8
+ Author-email: tao.xavier@outlook.com
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 2
11
+ Classifier: Programming Language :: Python :: 2.7
12
+ 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
+ Classifier: Programming Language :: Python :: 3.7
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Requires-Dist: dora-rs (>=0.3.6,<0.4.0)
23
+ Requires-Dist: numpy (<2.0.0)
24
+ Requires-Dist: pyarrow (>=5.0.0)
25
+ Project-URL: Documentation, https://github.com/dora-rs/dora/blob/main/node-hub/pyarrow-assert/README.md
26
+ Description-Content-Type: text/markdown
27
+
28
+ # Dora Node for asserting arrow data.
29
+
30
+ This node assert that the DATA that is specified within the environment variable or from `--data` argument is the same as the data received.
31
+
32
+ Check example at [examples/pyarrow-test](examples/pyarrow-test)
33
+
@@ -0,0 +1,5 @@
1
+ # Dora Node for asserting arrow data.
2
+
3
+ This node assert that the DATA that is specified within the environment variable or from `--data` argument is the same as the data received.
4
+
5
+ Check example at [examples/pyarrow-test](examples/pyarrow-test)
@@ -0,0 +1,11 @@
1
+ import os
2
+
3
+ # Define the path to the README file relative to the package directory
4
+ readme_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "README.md")
5
+
6
+ # Read the content of the README file
7
+ try:
8
+ with open(readme_path, "r", encoding="utf-8") as f:
9
+ __doc__ = f.read()
10
+ except FileNotFoundError:
11
+ __doc__ = "README file not found."
@@ -0,0 +1,48 @@
1
+ import argparse
2
+ import os
3
+ import ast
4
+
5
+
6
+ from dora import Node
7
+
8
+ RUNNER_CI = True if os.getenv("CI") == "true" else False
9
+
10
+
11
+ def main():
12
+
13
+ # Handle dynamic nodes, ask for the name of the node in the dataflow, and the same values as the ENV variables.
14
+ parser = argparse.ArgumentParser(description="Simple arrow sender")
15
+
16
+ parser.add_argument(
17
+ "--name",
18
+ type=str,
19
+ required=False,
20
+ help="The name of the node in the dataflow.",
21
+ default="arrow-assert",
22
+ )
23
+ parser.add_argument(
24
+ "--data",
25
+ type=str,
26
+ required=False,
27
+ help="Arrow Data as string.",
28
+ default="",
29
+ )
30
+
31
+ args = parser.parse_args()
32
+
33
+ data = os.getenv("DATA", args.data)
34
+
35
+ node = Node(
36
+ args.name
37
+ ) # provide the name to connect to the dataflow if dynamic node
38
+
39
+ assert_data = ast.literal_eval(data)
40
+
41
+ for event in node:
42
+ if event["type"] == "INPUT":
43
+ value = event["value"]
44
+ assert value == assert_data, f"Expected {assert_data}, got {value}"
45
+
46
+
47
+ if __name__ == "__main__":
48
+ main()
@@ -0,0 +1,28 @@
1
+ [tool.poetry]
2
+ name = "pyarrow-assert"
3
+ version = "0.3.6"
4
+ authors = [
5
+ "Haixuan Xavier Tao <tao.xavier@outlook.com>",
6
+ "Enzo Le Van <dev@enzo-le-van.fr>",
7
+ ]
8
+ description = "Dora Node for plotting text and bbox on image with OpenCV"
9
+ license = "MIT License"
10
+ homepage = "https://github.com/dora-rs/dora.git"
11
+ documentation = "https://github.com/dora-rs/dora/blob/main/node-hub/pyarrow-assert/README.md"
12
+ readme = "README.md"
13
+ packages = [{ include = "pyarrow_assert" }]
14
+
15
+ [tool.poetry.dependencies]
16
+ dora-rs = "^0.3.6"
17
+ numpy = "< 2.0.0"
18
+ pyarrow = ">= 5.0.0"
19
+
20
+ [tool.poetry.scripts]
21
+ pyarrow-assert = "pyarrow_assert.main:main"
22
+
23
+ [build-system]
24
+ requires = ["poetry-core>=1.8.0"]
25
+ build-backend = "poetry.core.masonry.api"
26
+
27
+ [project]
28
+ readme = "README.md"