-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds v0.1.1 of the spinnaker acquire driver to the drivers list used to build the Python package. It also adds some very basic Python tests to check that the devices are available. --------- Co-authored-by: Nathan Clack <[email protected]>
- Loading branch information
1 parent
cb2dd9b
commit 13c0dfb
Showing
7 changed files
with
137 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,55 @@ jobs: | |
run: | | ||
python -m pytest -k test_egrabber --color=yes --cov-report=xml --cov=acquire --maxfail=5 --log-cli-level=0 | ||
spinnaker: | ||
name: Python ${{ matrix.python }} (Spinnaker) | ||
runs-on: | ||
- self-hosted | ||
- spinnaker | ||
- BFLY-U3-23S6M-C | ||
- ORX-10GS-51S5M-C | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: [ "3.8", "3.9", "3.10" ] | ||
|
||
permissions: | ||
actions: write | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Get CMake 3.24 | ||
uses: lukka/get-cmake@latest | ||
with: | ||
cmakeVersion: 3.24.3 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install | ||
run: | | ||
pip install --upgrade pip | ||
pip install -e .[testing] | ||
- name: Test | ||
run: | | ||
python -m pytest -k test_spinnaker --color=yes --cov-report=xml --cov=acquire --maxfail=5 --log-cli-level=0 | ||
typing: | ||
name: mypy typing | ||
runs-on: windows-latest # FIXME (aliddell): stubtest claims to fail to find shared libs on Linux | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import acquire | ||
import pytest | ||
from acquire import DeviceKind | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def _runtime(): | ||
runtime = acquire.Runtime() | ||
yield runtime | ||
|
||
|
||
@pytest.fixture(scope="function") | ||
def runtime(_runtime: acquire.Runtime): | ||
yield _runtime | ||
_runtime.set_configuration(acquire.Properties()) | ||
|
||
|
||
def test_blackfly_camera_is_present(runtime: acquire.Runtime): | ||
dm = runtime.device_manager() | ||
assert dm.select(DeviceKind.Camera, ".*BFLY-U3-23S6M.*") | ||
|
||
|
||
def test_oryx_camera_is_present(runtime: acquire.Runtime): | ||
dm = runtime.device_manager() | ||
assert dm.select(DeviceKind.Camera, ".*ORX-10GS-51S5M.*") |