Skip to content

Commit f8c7b15

Browse files
committed
small tests and requirements fix
1 parent c7af950 commit f8c7b15

File tree

2 files changed

+85
-34
lines changed

2 files changed

+85
-34
lines changed

requirements-dev.txt

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,102 @@
11
annotated-types==0.7.0
2-
asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1733250440834/work
2+
asttokens==0.28.0
33
attrs==25.3.0
44
blosc2==2.7.1
55
certifi==2025.1.31
66
chaco==6.0.0
77
charset-normalizer==3.4.1
88
coloredlogs==15.0.1
9-
comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1733502965406/work
10-
conda-pack @ file:///croot/conda-pack_1710258022278/work
9+
comm==0.2.1
10+
conda-pack==0.9.0
1111
contourpy==1.3.1
1212
cycler==0.12.1
1313
Cython==3.0.12
14-
debugpy @ file:///home/conda/feedstock_root/build_artifacts/debugpy_1741148395697/work
15-
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1740384970518/work
14+
debugpy==1.8.1
15+
decorator==5.1.1
1616
enable==6.0.0
17-
exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1733208806608/work
18-
executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1733569351617/work
17+
exceptiongroup==1.2.0
18+
executing==2.0.1
1919
flatbuffers==25.2.10
2020
flowtracks==1.0
2121
fonttools==4.56.0
2222
humanfriendly==10.0
2323
idna==3.10
2424
imagecodecs==2024.12.30
2525
imageio==2.37.0
26-
importlib_metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1737420181517/work
26+
importlib_metadata==7.0.1
2727
iniconfig==2.1.0
28-
ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1719845459717/work
29-
ipython @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_ipython_1741457802/work
30-
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1733300866624/work
28+
ipykernel==6.29.3
29+
ipython==8.22.2
30+
jedi==0.19.1
3131
jsonschema==4.23.0
3232
jsonschema-specifications==2024.10.1
33-
jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1733440914442/work
34-
jupyter_core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1727163409502/work
33+
jupyter_client==8.6.0
34+
jupyter_core==5.7.1
3535
kiwisolver==1.4.8
3636
lazy_loader==0.4
3737
llvmlite==0.44.0
3838
matplotlib==3.10.1
39-
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1733416936468/work
39+
matplotlib-inline==0.1.6
4040
mpmath==1.3.0
4141
msgpack==1.1.0
4242
ndindex==1.9.2
43-
nest_asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1733325553580/work
43+
nest_asyncio==1.6.0
4444
networkx==3.4.2
4545
numba==0.61.0
4646
numexpr==2.10.2
4747
numpy==1.26.4
4848
optv==0.3.0
4949
opencv-python-headless==4.11.0.86
50-
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1733203243479/work
50+
packaging==23.2
5151
pandas==2.2.3
52-
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1733271261340/work
53-
pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1733301927746/work
54-
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1733327343728/work
52+
parso==0.8.3
53+
pexpect==4.9.0
54+
pickleshare==0.7.5
5555
pillow==11.1.0
56-
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_platformdirs_1742485085/work
56+
platformdirs==4.2.0
5757
pluggy==1.5.0
5858
pooch==1.8.2
59-
prompt_toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1737453357274/work
59+
prompt_toolkit==3.0.43
6060
protobuf==6.30.1
61-
psutil @ file:///home/conda/feedstock_root/build_artifacts/psutil_1740663128538/work
62-
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1733302279685/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl#sha256=92c32ff62b5fd8cf325bec5ab90d7be3d2a8ca8c8a3813ff487a8d2002630d1f
63-
pure_eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1733569405015/work
61+
psutil==5.9.8
62+
ptyprocess==0.7.0
63+
pure_eval==0.2.2
6464
py-cpuinfo==9.0.0
6565
pydantic==2.5.3
6666
pydantic_core==2.14.6
6767
pyempaq==0.6.0
6868
pyface==8.0.0
69-
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1736243443484/work
69+
Pygments==2.17.2
7070
PyMatting==1.1.13
7171
pyparsing==3.2.1
72-
-e git+https://github.com/alexlib/pyptv.git@467f5dba049f5f427d6a1212f0146305073e5425#egg=pyptv
7372
PySide6==6.8.2.1
7473
PySide6_Addons==6.8.2.1
7574
PySide6_Essentials==6.8.2.1
7675
pytest==8.3.5
77-
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1733215673016/work
76+
python-dateutil==2.8.2
7877
pytz==2025.1
7978
PyYAML==6.0.1
80-
pyzmq @ file:///home/conda/feedstock_root/build_artifacts/pyzmq_1741805149626/work
79+
pyzmq==25.1.2
8180
referencing==0.36.2
8281
rembg==2.0.65
8382
requests==2.32.3
8483
rpds-py==0.23.1
8584
scikit-image==0.25.2
8685
scipy==1.15.2
8786
shiboken6==6.8.2.1
88-
six @ file:///home/conda/feedstock_root/build_artifacts/six_1733380938961/work
89-
stack_data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1733569443808/work
87+
six==1.16.0
88+
stack_data==0.6.3
9089
sympy==1.13.3
9190
tables==3.10.1
9291
tifffile==2025.3.13
9392
tomli==2.2.1
94-
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1732615898999/work
93+
tornado==6.4
9594
tqdm==4.67.1
96-
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1733367359838/work
95+
traitlets==5.14.1
9796
traits==7.0.2
9897
traitsui==8.0.0
9998
typing_extensions==4.12.2
10099
tzdata==2025.1
101100
urllib3==2.3.0
102-
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1733231326287/work
103-
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1732827521216/work
101+
wcwidth==0.2.13
102+
zipp==3.17.0

test_optv.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env python
2+
import os
3+
import sys
4+
import numpy as np
5+
import optv
6+
from optv.calibration import Calibration
7+
from optv.parameters import ControlParams, VolumeParams, TrackingParams, SequenceParams
8+
from optv.tracking_framebuf import read_targets
9+
10+
def test_optv_functionality():
11+
"""Test basic OpenPTV functionality"""
12+
print("Testing OpenPTV functionality...")
13+
print(f"OpenPTV version: {optv.__version__}")
14+
15+
# Test path to test_cavity
16+
test_cavity_path = os.path.join(os.getcwd(), "test_cavity")
17+
print(f"Test cavity path: {test_cavity_path}")
18+
19+
# Test if we can read parameters
20+
try:
21+
control_params_file = os.path.join(test_cavity_path, "parameters", "ptv.par")
22+
print(f"Control parameters file: {control_params_file}")
23+
if os.path.exists(control_params_file):
24+
control_params = ControlParams(control_params_file)
25+
print(f"Successfully loaded control parameters")
26+
print(f"Number of cameras: {control_params.get_num_cams()}")
27+
else:
28+
print(f"Control parameters file not found")
29+
except Exception as e:
30+
print(f"Error loading control parameters: {str(e)}")
31+
32+
# Test if we can read calibration
33+
try:
34+
cal = Calibration()
35+
cal_file = os.path.join(test_cavity_path, "cal", "cam1.tif.ori")
36+
addpar_file = os.path.join(test_cavity_path, "cal", "cam1.tif.addpar")
37+
print(f"Calibration file: {cal_file}")
38+
print(f"Addpar file: {addpar_file}")
39+
40+
if os.path.exists(cal_file) and os.path.exists(addpar_file):
41+
cal.from_file(cal_file.encode(), addpar_file.encode())
42+
print("Successfully loaded calibration")
43+
print(f"Calibration parameters: {cal.get_pos()}")
44+
else:
45+
print(f"Calibration files not found")
46+
except Exception as e:
47+
print(f"Error loading calibration: {str(e)}")
48+
49+
print("OpenPTV functionality test completed")
50+
51+
if __name__ == "__main__":
52+
test_optv_functionality()

0 commit comments

Comments
 (0)