mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-05 03:44:13 +02:00
8ff128b062
* introduced new type Hz, typetraits, String conversions, command generation (not yet generated) * incorrect unit typo * cmd generation and compiles * default to MHz, removed space between units for consistency with timers, min and max checks for clks * in python, but need to change the default to Hz again for clean code and intuition * allow ints, doubles, implicit conversions * dont allow raw ints, doubles and implicit conversions * fixed tests * added operators for Hz in python * fix test for min clk for xilinx ctb * fix test * fix python tests * fixed xilinx period and default clks * test fix * removed the 3 clock cycle check for ctb and implemented properly the max adc clk frq for altera ctb * removing 3 clock cycle code from xilinx as well * formatting * loadpattern before 3 clk cycles code * actualtime and measurement time to be implemented in 100ns already in fw * fix tests * pyzmq dependency forthe tests * fixed pyctbgui for freq
New Chip Test Board Gui using Python
Prototype for a new python based GUI for the Chip Test Board
Getting started
To install all dependencies build the package with python package build. This requires that you have build installed.
We recommend using a virtual conda environment.
git clone https://github.com/slsdetectorgroup/pyctbgui.git
cd pyctbgui
python -m build
pip install dist/pyctbgui-0.0.0-cp313-cp313-linux_x86_64.whl
./CtbGui
Note that the above package installs slsdet and aare. If you want to work on your local branch add the locally build python modules first to your PYTHONPATH.
Format Code
To check python code is formatted correctly according to style guides in pyproject.toml run (requires yapf to be installed.):
yapf --style pyproject.toml -r -d tests pyctbgui *.py
To format inplace using style in pyproject.toml run:
yapf --style pyproject.toml -m -r -i tests pyctbgui *.py
Run Tests:
The following command runs the unit tests (Requires pytestto be installed):
python -m pytest -v tests/unit
The following command runs end to end tests:
python -m pytest -v tests/gui
setup pre-commit hooks
pre-commit install