From 302e862ed06095b7ff8f40af187cdcfadfc40276 Mon Sep 17 00:00:00 2001 From: spagadar Date: Thu, 11 Jul 2024 12:39:37 -0500 Subject: [PATCH] Added line to run Python examples through github workflows Signed-off-by: spagadar --- .github/workflows/test.yml | 1 + bindings/python/genalyzer/simplified.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a05699e..94b6835 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -160,3 +160,4 @@ jobs: cd bindings/python pip install ".[tools]" python -m pytest -vs tests + for f in examples/*.py; do python "$f"; done diff --git a/bindings/python/genalyzer/simplified.py b/bindings/python/genalyzer/simplified.py index 68b9420..451e8c9 100644 --- a/bindings/python/genalyzer/simplified.py +++ b/bindings/python/genalyzer/simplified.py @@ -284,8 +284,8 @@ def __init__(self): _gn_config_gen_ramp.restype = c_int _gn_config_gen_ramp.argtypes = [ c_ulong, - c_ulong, - c_ulong, + c_double, + c_double, POINTER(_GNConfigPtr), ] @@ -475,8 +475,8 @@ def config_gen_ramp(npts: int, ramp_start: int, ramp_stop: int, c: GNConfig = No c = GNConfig() npts = c_ulong(npts) - ramp_start = c_ulong(ramp_start) - ramp_stop = c_ulong(ramp_stop) + ramp_start = c_double(ramp_start) + ramp_stop = c_double(ramp_stop) ret = _gn_config_gen_ramp(npts, ramp_start, ramp_stop, byref(c._struct)) if ret != 0: