Skip to content

Commit b1637f7

Browse files
alexlibCopilot
andauthored
moving to YAML parameters (#92)
* added splitter in parameters, image_split and test of strange list access * plugins now has to have 'default' if plugin text files exist and splitter almost works * much more reasonable plugins.json treatment * move plugins into test_cavity where it should appear in the working folder * first part cal_splitter works * working version with the calibration and splitter * removed debuging plot, changed highpass behaivor for calibration * Select Split TWICE: in main gui and in calibration gui, added test_splitter folder * also detect and show trajectories work * slight update of user_manual, it's not what's needed really * fixed tests, added test of plugins * bumped version to 0.3.8, ready for pull request * default low pass filter size is 25 - to remove uneven illumination * moved to tests/ * proper error * ruff * Fix: Update parameter handling to match optv API changes * work in progress * copy test cavity should not be tracked * work in progress * working on tests * we do not need small yaml files * experiment.py * higphass works and masking doesn't fail * we do not need yaml except for parameters.yaml * before change in parameters_manager * fixed volume params * parameters are managed by manager, which is under Experiment * from directories to yaml files * n_cams top level * updated n_cams to top level * man_ori inside * more yaml stuff * why do we have another folder /parameters in pyptv? * removed /parameters * testing parameters - translation to Cython is not good * parameters tests pass * fixed parameters. tests pass. * pyptv_gui also works. need to test more stuff, including splitter * moved docs to docs tests to tests * more tests, parameters and gui * tests the closer version * tests pass * obsolete * experiment is clean python, no traits * hastraits needed for gui * fixed gui bugs * parameters * there should be no n_img in the yaml file * docs * cleaning up the docs * working on detection gui * detection_gui almost there * a bit messy option to change the range sliders * added paramter_gui work to pyptv_gui * fixed bug in the first processing * print is now in the local message window - don't need to look it up * fixed test detection * fixed bug as we should call detect_plate and not targ_rec. * solved detection in calibration * fixed manual orientation * DetectionGUI expects Path to the working folder. glass is 1.46, water is 1.33 to 1.41 * plugins * fixed detect_plate bug. todo: check splitter and calibration, bump version * splitter * tests updated with batch plugins and splitter * some tests that play with the tracking parameters. we need a ground truth test * more tests of ptv.py * tests partially fixed * previous tests with plugins * plugins.json are obsolete * test_cavity with larger tracking distances * batch parallel test * tracker * bumped version for future tag, rmeove message window which didn't help much * fixed calibration_gui bug * fixed calibration of test-splitter * updated tests * Update python-package.yml * fixed one test * one test as pytest * one more pytest * File->Open works * added subprocess * Squashed commit of the following: commit d784b6f Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 23:24:37 2025 +0300 updated pyptv_batch and plugins, some tests. commit 218161b Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 16:26:38 2025 +0300 removed debug prints commit 3bfb8e9 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 15:45:10 2025 +0300 fixed cython parameter loading commit 1408b8b Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 15:32:03 2025 +0300 no parameter loading in ptv.py commit 76093c7 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 15:30:15 2025 +0300 removed obsolete parameter reading commit 1a3bfdb Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 14:46:55 2025 +0300 Experment(pm = pm) initializes expeirment with the existing parameter_manager commit 0b3ac7e Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 13:15:40 2025 +0300 pyptv.pm -> pyptv.parameter_manager commit b729866 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 13:14:22 2025 +0300 parameter_manager -> pm for brevity commit 8a52f87 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 01:07:10 2025 +0300 trying to simplify parameters and fix the bug when switching active paramset commit 1f6bba9 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 26 00:12:52 2025 +0300 trying to find the bug in tests/track commit 87c9548 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 23:49:32 2025 +0300 fix commit 48837af Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 23:32:22 2025 +0300 fixed bugs with main parameters and with parameter_manager on splitter commit 9c2eeeb Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 23:05:27 2025 +0300 added splitter and cal_splitter manually after populating expeirments commit 2c0e186 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 22:55:52 2025 +0300 updated parameters directories for add_new_particle commit b893f6e Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 21:31:33 2025 +0300 fixed the case of 0 targets in track/Run3 commit 765c001 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 20:24:11 2025 +0300 remove trackeback commit 9c9e060 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 19:11:41 2025 +0300 added legacy_parameters_to_yaml to scrpit and created 3 yaml files for track tests commit 7cd78a9 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 18:26:07 2025 +0300 almost all tests pass. only additional particle still fails, probably parameters commit 70f6432 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 01:13:04 2025 +0300 need to test it more commit d67c3fc Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 25 00:43:01 2025 +0300 the gui seems to work commit f2576cd Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Thu Jul 24 00:34:35 2025 +0300 the gui destroys parameters and tracking is not saving parameters. think, don't shoot commit 6a57936 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Wed Jul 23 22:11:58 2025 +0300 better than before some bugs were removed commit 0aff702 Author: alexlib <alex.liberzon@gmail.com> Date: Wed Jul 23 18:03:48 2025 +0300 some new functions in renaming, copying deleting paramsets commit 4675b9a Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Wed Jul 23 10:12:18 2025 +0300 simplify to find bugs commit 152ae48 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Wed Jul 23 01:30:44 2025 +0300 working on filling all the parameters commit 499f46c Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Wed Jul 23 00:29:33 2025 +0300 added plugins. test plugins commit f59f9ec Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Tue Jul 22 23:55:55 2025 +0300 found bugs due to missing plugins parameters commit 6603d3e Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Tue Jul 22 21:35:37 2025 +0300 fixing small things commit af5d015 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Tue Jul 22 01:15:17 2025 +0300 trying to simplify naming short_base commit 556dfcd Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Tue Jul 22 00:14:49 2025 +0300 updated tests, tracking still fails commit ef5833c Author: alexlib <alex.liberzon@gmail.com> Date: Mon Jul 21 16:48:09 2025 +0300 Create test_parameter_manager_prints.py commit cfe33a4 Author: alexlib <alex.liberzon@gmail.com> Date: Mon Jul 21 16:46:52 2025 +0300 updated manager not to print all kind of attributes commit 973ca81 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Mon Jul 21 00:29:02 2025 +0300 parameters are corrupted again commit 16c612c Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sun Jul 20 23:52:44 2025 +0300 updated legacy commit 361727e Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sun Jul 20 23:22:52 2025 +0300 obsolete commit 893ae6b Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sun Jul 20 23:09:41 2025 +0300 fixed EOF error commit b3a657c Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sun Jul 20 23:03:49 2025 +0300 simple reading in ptv.par commit 41b88df Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sun Jul 20 23:03:46 2025 +0300 simpler reading in ptv.par commit 9dbe355 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sun Jul 20 22:51:36 2025 +0300 simplified legacy and parameters_manager commit 3424286 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sun Jul 20 00:34:39 2025 +0300 trying to add File -> Open commit fdd9f0d Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 19 23:25:15 2025 +0300 added File -> Open commit 8143911 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 19 23:03:12 2025 +0300 fixed some ugly bugs commit ebf51d9 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 19 21:34:35 2025 +0300 preparing track additional tests, on the way changed half of the code :) commit 7700ed1 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 19 00:31:57 2025 +0300 almost all tests pass commit 146a074 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Sat Jul 19 00:29:32 2025 +0300 updated a bit work with gui - yaml is default now commit d29692f Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 18 20:48:42 2025 +0300 created new test with track/ two types with and without new particle not yet finished. added pyptv_batch only tracking or only sequence mode commit e357dd3 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 18 18:13:55 2025 +0300 working on parameters. splitter makes life difficutl with default strings instead of image names commit 99f02b2 Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 18 13:44:29 2025 +0300 tests pass, but not additional ones yet commit a07929e Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 18 01:08:34 2025 +0300 when you want better code you pay for it commit 79ef3bb Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Fri Jul 18 00:52:46 2025 +0300 tried to fix default parameters in GUI, then changed all to num_cams and then it collapsed commit a536d0b Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Thu Jul 17 00:33:14 2025 +0300 trach commit 176308f Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Thu Jul 17 00:33:06 2025 +0300 need to test track * updated one more test * target_filenames created once under mainGui and kept through. also update plugins * added the new target_filenames * tests pass but obviously one of the last tests of tests/track prints wrong results. * Create check.yml * added test code editor for coverage * marked two qt tests * some tests are difficult due to the change in pyptv_gui use of target_filenames * dockerfile qt in __init__ * Squashed commit of the following: commit 060285e Author: Alex Liberzon <alexlib@users.noreply.github.com> Date: Mon Jul 28 21:11:42 2025 +0300 fixed some tests. moved target_filenames to the parameters * copied from pbi dumbbell calibration module * removed py_rclick_delete obsolete * cleaning up * copied some version from pbi - but maybe it's wiser just to use pbi separately. * moved all to Python * fixed the dumbbell * separated gui tests, added batch to run, new github actions, and updated coverage summary. """ * Update check.yml * removed old github workflows * remove check.yml * should possibly pass * Update requirements-dev.txt * try better * all gui in a separate folder * also this one * added img_orig * fixed the tests * we do not use uv right now, so we can remove it from the requirements-dev.txt file. * Update tests/test_parameter_manager_prints.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/test_parameter_manager.py I'm not sure the output is the same. the parameter files are written as single lines Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * updated some markdown documents * organized readme --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9117426 commit b1637f7

File tree

874 files changed

+24611
-11204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

874 files changed

+24611
-11204
lines changed

.github/workflows/python-app.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Python application
2+
3+
on:
4+
push:
5+
branches: [ main, simple_yaml_with_tests ]
6+
pull_request:
7+
branches: [ main, simple_yaml_with_tests ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.11'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
python -m pip install -r requirements-dev.txt
22+
python -m pip install -e .
23+
- name: Run headless tests only
24+
run: bash run_headless_tests.sh

.github/workflows/python-package.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,9 @@ pyptv/.vscode/launch.json
7474
# Wheels
7575
**/wheels/
7676
.vscode/*.json
77+
tests/test_splitter/parametersRun1/*
78+
tests/test_splitter/res/*
79+
test_output/*
80+
tests/test_cavity/parameters__test_new.yaml
81+
pyptv_session_log_*.txt
82+
tests/track/res/*

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Slim Dockerfile for local testing of pyptv (mimics GitHub Actions)
2+
FROM python:3.11-slim
3+
4+
# Install system dependencies for Qt, traitsui, and scientific stack
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
libgl1-mesa-glx \
8+
libglib2.0-0 \
9+
libxkbcommon-x11-0 \
10+
libxcb-xinerama0 \
11+
git \
12+
xvfb \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
# Set workdir
16+
WORKDIR /workspace
17+
18+
# Copy repo
19+
COPY . /workspace
20+
21+
# Install pip, wheel, and setuptools
22+
RUN pip install --upgrade pip wheel setuptools
23+
24+
# Install pyptv and dependencies
25+
RUN pip install .
26+
RUN pip install -r requirements-dev.txt || true
27+
28+
# Optionally install test dependencies for Qt
29+
RUN pip install PySide6 traits traitsui pytest
30+
31+
# Run all tests
32+
CMD ["xvfb-run", "pytest", "-v", "-x", "--tb=short"]

0 commit comments

Comments
 (0)