telegenicam 1.0.2__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.
Files changed (52) hide show
  1. telegenicam-1.0.2/.github/workflows/check.yml +58 -0
  2. telegenicam-1.0.2/.github/workflows/format.yml +32 -0
  3. telegenicam-1.0.2/.github/workflows/publish.yml +155 -0
  4. telegenicam-1.0.2/.gitignore +7 -0
  5. telegenicam-1.0.2/Cargo.lock +663 -0
  6. telegenicam-1.0.2/Cargo.toml +43 -0
  7. telegenicam-1.0.2/LICENSE +201 -0
  8. telegenicam-1.0.2/PKG-INFO +123 -0
  9. telegenicam-1.0.2/README.md +111 -0
  10. telegenicam-1.0.2/examples/discover.rs +50 -0
  11. telegenicam-1.0.2/examples/force_ip.rs +32 -0
  12. telegenicam-1.0.2/examples/grab.py +64 -0
  13. telegenicam-1.0.2/examples/grab.rs +81 -0
  14. telegenicam-1.0.2/examples/info.rs +53 -0
  15. telegenicam-1.0.2/examples/snap.rs +46 -0
  16. telegenicam-1.0.2/py_src/telegenic/__init__.py +36 -0
  17. telegenicam-1.0.2/py_src/telegenic/__init__.pyi +453 -0
  18. telegenicam-1.0.2/py_src/telegenic/py.typed +0 -0
  19. telegenicam-1.0.2/pyproject.toml +22 -0
  20. telegenicam-1.0.2/scripts/fmt.sh +6 -0
  21. telegenicam-1.0.2/src/error.rs +81 -0
  22. telegenicam-1.0.2/src/genicam/acquisition.rs +146 -0
  23. telegenicam-1.0.2/src/genicam/evaluator.rs +579 -0
  24. telegenicam-1.0.2/src/genicam/mod.rs +368 -0
  25. telegenicam-1.0.2/src/genicam/node.rs +1170 -0
  26. telegenicam-1.0.2/src/genicam/port.rs +105 -0
  27. telegenicam-1.0.2/src/genicam/snapshot.rs +125 -0
  28. telegenicam-1.0.2/src/genicam/url.rs +104 -0
  29. telegenicam-1.0.2/src/genicam/xml.rs +464 -0
  30. telegenicam-1.0.2/src/genicam/zip.rs +167 -0
  31. telegenicam-1.0.2/src/gige/discovery.rs +321 -0
  32. telegenicam-1.0.2/src/gige/mod.rs +992 -0
  33. telegenicam-1.0.2/src/gige/proto/bootstrap.rs +187 -0
  34. telegenicam-1.0.2/src/gige/proto/gvcp.rs +482 -0
  35. telegenicam-1.0.2/src/gige/proto/gvsp.rs +320 -0
  36. telegenicam-1.0.2/src/gige/proto/mod.rs +5 -0
  37. telegenicam-1.0.2/src/gige/runner.rs +636 -0
  38. telegenicam-1.0.2/src/gige/stream/frame.rs +192 -0
  39. telegenicam-1.0.2/src/gige/stream/mod.rs +241 -0
  40. telegenicam-1.0.2/src/gige/stream/runner.rs +703 -0
  41. telegenicam-1.0.2/src/handle.rs +119 -0
  42. telegenicam-1.0.2/src/lib.rs +51 -0
  43. telegenicam-1.0.2/src/py.rs +1020 -0
  44. telegenicam-1.0.2/src/thread_util.rs +180 -0
  45. telegenicam-1.0.2/tests/control.rs +316 -0
  46. telegenicam-1.0.2/tests/data/Hikrobot.xml +55795 -0
  47. telegenicam-1.0.2/tests/data/Imperx.xml +12789 -0
  48. telegenicam-1.0.2/tests/discovery.rs +100 -0
  49. telegenicam-1.0.2/tests/end_to_end.rs +222 -0
  50. telegenicam-1.0.2/tests/fake_camera/mod.rs +713 -0
  51. telegenicam-1.0.2/tests/genicam.rs +327 -0
  52. telegenicam-1.0.2/tests/stream.rs +295 -0
@@ -0,0 +1,58 @@
1
+ name: Check
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ check:
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ platform:
14
+ - { os: macos-latest, target: aarch64-apple-darwin }
15
+ - { os: windows-latest, target: x86_64-pc-windows-msvc }
16
+ - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
17
+ - { os: ubuntu-latest, target: x86_64-unknown-linux-musl }
18
+
19
+ runs-on: ${{ matrix.platform.os }}
20
+ name: ${{ matrix.platform.target }}
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: dtolnay/rust-toolchain@stable
26
+ with:
27
+ targets: ${{ matrix.platform.target }}
28
+ components: clippy
29
+
30
+ - name: Install musl tools
31
+ if: endsWith(matrix.platform.target, 'musl')
32
+ run: sudo apt-get update && sudo apt-get install -y musl-tools
33
+
34
+ - uses: actions/setup-python@v5
35
+ if: matrix.platform.target == 'x86_64-unknown-linux-gnu'
36
+ with:
37
+ python-version: "3.10"
38
+
39
+ - uses: Swatinem/rust-cache@v2
40
+ with:
41
+ key: ${{ matrix.platform.target }}
42
+
43
+ - name: Cargo check
44
+ run: cargo check --target ${{ matrix.platform.target }}
45
+
46
+ - name: Clippy
47
+ run: cargo clippy --target ${{ matrix.platform.target }} -- -D warnings
48
+
49
+ - name: Cargo check (-F py)
50
+ if: matrix.platform.target == 'x86_64-unknown-linux-gnu'
51
+ run: cargo check --target ${{ matrix.platform.target }} -F py
52
+
53
+ - name: Clippy (-F py)
54
+ if: matrix.platform.target == 'x86_64-unknown-linux-gnu'
55
+ run: cargo clippy --target ${{ matrix.platform.target }} -F py -- -D warnings
56
+
57
+ - name: Tests
58
+ run: cargo test --target ${{ matrix.platform.target }}
@@ -0,0 +1,32 @@
1
+ name: Format
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ rust:
10
+ runs-on: ubuntu-latest
11
+ name: cargo fmt
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: dtolnay/rust-toolchain@stable
17
+ with:
18
+ components: rustfmt
19
+
20
+ - run: cargo fmt --check
21
+
22
+ python:
23
+ runs-on: ubuntu-latest
24
+ name: ruff
25
+
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+
29
+ - uses: astral-sh/setup-uv@v5
30
+
31
+ - run: uv tool run ruff check --ignore F403,F405 .
32
+ - run: uv tool run ruff format --check
@@ -0,0 +1,155 @@
1
+ name: Publish
2
+
3
+ # Public repo: publishes to PyPI + crates.io.
4
+ #
5
+ # Build jobs run on every PR and push to main as a dry run of the real release
6
+ # pipeline — same targets, same ABIs — so a publish-time breakage (unsupported
7
+ # interpreter, packaging error, bad metadata) surfaces in CI before a tag is
8
+ # cut. Only the upload jobs are gated on v* tags.
9
+ #
10
+ # Every target builds on a runner of its own architecture — aarch64 Linux on
11
+ # `ubuntu-24.04-arm` and aarch64 Windows on `windows-11-arm` — so nothing is
12
+ # cross-compiled. Each platform is built three ways from one source: an `abi3`
13
+ # wheel pinned to the minimum supported Python (cp310-abi3, the abi3 cargo
14
+ # feature), a version-specific free-threaded `cp314t` wheel (3.14t predates the
15
+ # stable free-threaded ABI), and an `abi3t` wheel (the abi3t cargo feature, PEP
16
+ # 803) that covers free-threaded and GIL builds of Python 3.15 and newer. abi3
17
+ # is selected by the cargo feature alone and needs no interpreter; abi3t needs
18
+ # one present, so it is built with `-i python3.15t` (3.15 is in beta — the
19
+ # non-Linux runners install it via setup-python with allow-prereleases, and the
20
+ # manylinux containers ship it under /opt/python). The cargo feature controls
21
+ # the wheel tag, so this stays an abi3t wheel.
22
+ on:
23
+ push:
24
+ branches: [main]
25
+ tags:
26
+ - "v*"
27
+ pull_request:
28
+
29
+ permissions:
30
+ contents: read
31
+
32
+ jobs:
33
+ build-wheels:
34
+ strategy:
35
+ fail-fast: false
36
+ matrix:
37
+ platform:
38
+ - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
39
+ - { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-gnu }
40
+ - { os: macos-latest, target: aarch64-apple-darwin }
41
+ - { os: windows-latest, target: x86_64-pc-windows-msvc }
42
+ - { os: windows-11-arm, target: aarch64-pc-windows-msvc }
43
+ wheel:
44
+ - { name: abi3, args: "-F abi3", python: "" }
45
+ - { name: abi3t, args: "-F abi3t -i python3.15t", python: "3.15t" }
46
+ - { name: cp314t, args: "-i python3.14t", python: "3.14t" }
47
+
48
+ runs-on: ${{ matrix.platform.os }}
49
+ name: ${{ matrix.wheel.name }} wheel (${{ matrix.platform.target }})
50
+
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+
54
+ - uses: actions/setup-python@v5
55
+ if: matrix.wheel.python != '' && !contains(matrix.platform.target, 'linux')
56
+ with:
57
+ python-version: ${{ matrix.wheel.python }}
58
+ allow-prereleases: true
59
+
60
+ - uses: PyO3/maturin-action@v1
61
+ with:
62
+ target: ${{ matrix.platform.target }}
63
+ args: --release --out dist ${{ matrix.wheel.args }}
64
+ manylinux: auto
65
+ docker-options: -e CARGO_NET_RETRY -e CARGO_HTTP_MULTIPLEXING
66
+ env:
67
+ CARGO_NET_RETRY: "10"
68
+ CARGO_HTTP_MULTIPLEXING: "false"
69
+
70
+ - uses: actions/upload-artifact@v4
71
+ with:
72
+ name: wheel-${{ matrix.wheel.name }}-${{ matrix.platform.target }}
73
+ path: dist/*.whl
74
+
75
+ sdist:
76
+ runs-on: ubuntu-latest
77
+ name: Build sdist
78
+
79
+ steps:
80
+ - uses: actions/checkout@v4
81
+
82
+ - uses: PyO3/maturin-action@v1
83
+ with:
84
+ command: sdist
85
+ args: --out dist
86
+
87
+ - uses: actions/upload-artifact@v4
88
+ with:
89
+ name: sdist
90
+ path: dist/*.tar.gz
91
+
92
+ check-dist:
93
+ runs-on: ubuntu-latest
94
+ name: twine check
95
+ needs: [build-wheels, sdist]
96
+
97
+ steps:
98
+ - uses: actions/download-artifact@v4
99
+ with:
100
+ path: dist
101
+ merge-multiple: true
102
+
103
+ - uses: astral-sh/setup-uv@v5
104
+
105
+ - run: uv tool run twine check --strict dist/*
106
+
107
+ crates-dry-run:
108
+ runs-on: ubuntu-latest
109
+ name: cargo publish --dry-run
110
+ if: ${{ !startsWith(github.ref, 'refs/tags/') }}
111
+
112
+ steps:
113
+ - uses: actions/checkout@v4
114
+
115
+ - uses: dtolnay/rust-toolchain@stable
116
+
117
+ - uses: Swatinem/rust-cache@v2
118
+ with:
119
+ key: publish-dry-run
120
+
121
+ - run: cargo publish --dry-run
122
+
123
+ publish-pypi:
124
+ runs-on: ubuntu-latest
125
+ name: Publish to PyPI
126
+ if: startsWith(github.ref, 'refs/tags/v')
127
+ needs: [check-dist]
128
+
129
+ steps:
130
+ - uses: actions/download-artifact@v4
131
+ with:
132
+ path: dist
133
+ merge-multiple: true
134
+
135
+ - uses: astral-sh/setup-uv@v5
136
+
137
+ - name: Publish to PyPI
138
+ run: uv publish dist/*
139
+ env:
140
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
141
+
142
+ publish-crates:
143
+ runs-on: ubuntu-latest
144
+ name: Publish to crates.io
145
+ if: startsWith(github.ref, 'refs/tags/v')
146
+
147
+ steps:
148
+ - uses: actions/checkout@v4
149
+
150
+ - uses: dtolnay/rust-toolchain@stable
151
+
152
+ - name: Publish to crates.io
153
+ run: cargo publish
154
+ env:
155
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
@@ -0,0 +1,7 @@
1
+ /target
2
+ Cargo.lock
3
+ __pycache__/
4
+ *.so
5
+ *.whl
6
+ .venv
7
+ .ruff_cache