Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter logging to influxdb #311

Merged
merged 280 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
280 commits
Select commit Hold shift + click to select a range
5b52295
fix parameter restoration
bleykauf May 24, 2023
3997984
refactor value getter and setter for RemoteParameter
bleykauf May 24, 2023
d61a388
simplify RemoteParameters initialization
bleykauf May 24, 2023
a985b6e
shorten docstring
bleykauf May 24, 2023
8410c99
mimic restorable attribute in RemoteParameters
bleykauf May 24, 2023
3ce5482
add missing changes to last commit
bleykauf May 24, 2023
8fc7cf3
simplify getting all parameters by using __iter__
bleykauf May 24, 2023
4f1717f
fix iterator
bleykauf May 24, 2023
2585027
Revert "fix iterator"
bleykauf May 24, 2023
808d6f3
Revert "simplify getting all parameters by using __iter__"
bleykauf May 24, 2023
4711859
use RemoteParameter instead of calling remote directly
bleykauf May 24, 2023
00f224d
use restorable attribute for saving parameters on server
bleykauf May 24, 2023
27f5225
remove methods for getting all restorable parameters
bleykauf May 24, 2023
fb68fde
Revert "remove methods for getting all restorable parameters"
bleykauf May 24, 2023
84f4b06
Revert "use restorable attribute for saving parameters on server"
bleykauf May 24, 2023
535475e
make plot_color_4 not restorable
bleykauf May 24, 2023
f631c37
remove non-existing attribute
bleykauf May 24, 2023
9a2a8ae
Revert "Revert "use restorable attribute for saving parameters on ser…
bleykauf May 24, 2023
85419b8
fix indentation error
bleykauf May 31, 2023
08f328c
introduce gui settings
bleykauf May 31, 2023
ffb6004
fix value setter of Setting
bleykauf May 31, 2023
a1cae10
save settings to disk
bleykauf May 31, 2023
7d699b6
fix dependency package name
bleykauf May 31, 2023
95ad0a7
use user_data_dir for parameter storage on server
bleykauf Jun 1, 2023
750ba3f
Merge branch 'develop' into feature/influxdb
bleykauf Jun 2, 2023
2edaad3
introduce Device dataclass
bleykauf Jun 2, 2023
dffade7
Revert "introduce Device dataclass"
bleykauf Jun 2, 2023
daa179b
fix mypy errors
bleykauf Jun 2, 2023
c3937b1
run mypy as part of CI
bleykauf Jun 2, 2023
0cde963
rename workflow file
bleykauf Jun 2, 2023
4619cf9
add mypy workflow
bleykauf Jun 2, 2023
7b1cecf
only mypy linien-common
bleykauf Jun 4, 2023
6f2ab65
install in editable mode
bleykauf Jun 4, 2023
e041510
fix deprication warning
bleykauf Jun 4, 2023
6f71437
perform mypy test on all packages
bleykauf Jun 4, 2023
c1cd87b
ignore app_paths for mypy
bleykauf Jun 4, 2023
ba11559
ignore one type error
bleykauf Jun 4, 2023
ba94ddd
revert ignore of type error and add pyqt5-stubs to workflow
bleykauf Jun 4, 2023
77316bc
use composite action
bleykauf Jun 4, 2023
f1e6187
fix action directory
bleykauf Jun 4, 2023
cda5559
add branch to custom action
bleykauf Jun 4, 2023
0e8296e
remove branch specifier
bleykauf Jun 4, 2023
47439a0
try full path to local action
bleykauf Jun 4, 2023
a769410
do not use full path
bleykauf Jun 4, 2023
5a3a354
define path in workflow
bleykauf Jun 4, 2023
d207eee
remove setup of python in action for testing
bleykauf Jun 4, 2023
179d347
Revert "remove setup of python in action for testing"
bleykauf Jun 4, 2023
ee73e26
Revert "define path in workflow"
bleykauf Jun 4, 2023
4f7238c
change checkout options
bleykauf Jun 4, 2023
ec2348c
use composite action for pytest workflow
bleykauf Jun 4, 2023
74cb2bf
try different checkout version
bleykauf Jun 4, 2023
5e471cb
try different checkout version (v2)
bleykauf Jun 4, 2023
c9d2c6c
move action.yml to correct folder
bleykauf Jun 4, 2023
1b55605
use composite actions for other workflows
bleykauf Jun 4, 2023
89c799d
install pyinstaller in workflow
bleykauf Jun 4, 2023
6db0a26
make sure that USER_DATA_PATH exists
bleykauf Jun 5, 2023
39639de
move mkdir command to correct function
bleykauf Jun 5, 2023
bdf448e
add stop events to threads
bleykauf Jun 5, 2023
feada23
Revert "add stop events to threads"
bleykauf Jun 5, 2023
f1584b6
replace some flags with threading.Event
bleykauf Jun 5, 2023
3db790a
Revert "replace some flags with threading.Event"
bleykauf Jun 5, 2023
9a6ec74
integrate run method into __init__
bleykauf Jun 5, 2023
fc6f6c8
turn acquisition_paused into Event
bleykauf Jun 5, 2023
242508d
fix arguments of acquisition_loop
bleykauf Jun 5, 2023
f7c933a
turn skip_next_data into an Event
bleykauf Jun 5, 2023
522092a
add event for stopping acquisition thread
bleykauf Jun 5, 2023
0f3d92c
add missing argument
bleykauf Jun 5, 2023
13be310
convert file path to string for open
bleykauf Jun 5, 2023
b09dea0
remove unused functions
bleykauf Jun 5, 2023
c39371c
simplify shutdown procedure of server
bleykauf Jun 5, 2023
e44ff3a
fix function call
bleykauf Jun 5, 2023
c04fc82
define shutdown procedure for threads
bleykauf Jun 5, 2023
d3674c4
add some print calls for debugging
bleykauf Jun 5, 2023
68c0221
explicitly call for shutdown of acquisition on exit
bleykauf Jun 5, 2023
34f61bb
simplify server methods
bleykauf Jun 5, 2023
b8d309d
make ping thread stoppable
bleykauf Jun 5, 2023
6db32b9
fix args for ping thread
bleykauf Jun 5, 2023
5b62738
add hacky way to trigger atexit handlers
bleykauf Jun 5, 2023
70612a7
improve printing statements
bleykauf Jun 5, 2023
be71bac
add more typehints and simplify acquisition
bleykauf Jun 6, 2023
e1a35e6
move switch for raw acquisition one level up
bleykauf Jun 6, 2023
fee5b80
remove type annotation incompatible witih python 3.5
bleykauf Jun 6, 2023
b906a70
add type annotations to registers.py
bleykauf Jun 6, 2023
e59dd14
add type annotation to iir_cache
bleykauf Jun 6, 2023
9c6bdfc
Revert "add type annotation to iir_cache"
bleykauf Jun 6, 2023
52fe7ca
ignore mypy error
bleykauf Jun 6, 2023
a5739ec
remove unused checks
bleykauf Jun 6, 2023
cb2f2a6
use absolute imports
bleykauf Jun 6, 2023
06fb4bf
remove circular import
bleykauf Jun 6, 2023
8cd0a5a
fix missing import
bleykauf Jun 6, 2023
fff714b
simplify callbacks
bleykauf Jun 6, 2023
342c1a1
fix typo
bleykauf Jun 6, 2023
c262563
remove most methods of AcquisitionController
bleykauf Jun 6, 2023
709bf41
add expose_ to method calls
bleykauf Jun 6, 2023
cd6091a
fix right panel
bleykauf Jun 6, 2023
be649a0
fix tests
bleykauf Jun 6, 2023
5d2ad17
fix more tests
bleykauf Jun 6, 2023
c06d1b2
remove AcquisitionController completely
bleykauf Jun 6, 2023
f553865
flatten package structure
bleykauf Jun 6, 2023
dde83ec
move pusher thread to server
bleykauf Jun 6, 2023
6281999
remove print statement
bleykauf Jun 6, 2023
c7c8dc5
fix filepath
bleykauf Jun 6, 2023
8fb1dd9
actually fix filepath
bleykauf Jun 6, 2023
5e5f927
add print statement for debugging
bleykauf Jun 6, 2023
55da993
add more print statements for debugging
bleykauf Jun 6, 2023
d5ddffb
replace return with continue
bleykauf Jun 6, 2023
3e52065
remove debugging print statements
bleykauf Jun 6, 2023
4a10e8f
simplify loggable parameters
bleykauf Jun 7, 2023
e293aa4
fix overloading variable
bleykauf Jun 7, 2023
f10afc6
fix overloading variable, another try
bleykauf Jun 7, 2023
6aae494
ignore call-overload
bleykauf Jun 7, 2023
317a251
use functions for parameter saving and restoring
bleykauf Jun 8, 2023
868c020
debugging
bleykauf Jun 8, 2023
8982602
change return type of restore_parameters
bleykauf Jun 8, 2023
c46eec6
Revert "change return type of restore_parameters"
bleykauf Jun 8, 2023
84494af
Revert "debugging"
bleykauf Jun 8, 2023
692714b
Revert "use functions for parameter saving and restoring"
bleykauf Jun 8, 2023
16b55be
use self.parameters directly instead of dict
bleykauf Jun 8, 2023
7b42ae8
fix typo
bleykauf Jun 8, 2023
a86b194
Revert "Revert "use functions for parameter saving and restoring""
bleykauf Jun 8, 2023
854735a
fix save_parameters
bleykauf Jun 12, 2023
61ed76b
use json for server parameter storage
bleykauf Jun 12, 2023
375f214
fix loading json
bleykauf Jun 12, 2023
bad10b5
fix opening of file
bleykauf Jun 12, 2023
33a44fa
fix stop event
bleykauf Jun 12, 2023
611ba2c
format json file
bleykauf Jun 12, 2023
14e0ddd
fix parameter restoration printing
bleykauf Jun 12, 2023
0db5369
suppress warnings
bleykauf Jun 12, 2023
f897b6a
fix indendation
bleykauf Jun 12, 2023
52ac696
ignore RuntimeWarning
bleykauf Jun 12, 2023
18cf192
make more parameters loggable
bleykauf Jun 12, 2023
dacaa61
prepare functionality for logging panel
bleykauf Jun 12, 2023
eea6089
restructure and add more typehints
bleykauf Jun 12, 2023
4da2c1b
simplify PythonCSR
bleykauf Jun 12, 2023
9b5b088
Revert "simplify PythonCSR"
bleykauf Jun 12, 2023
a463044
Revert "restructure and add more typehints"
bleykauf Jun 12, 2023
719d6e7
Revert "Revert "restructure and add more typehints""
bleykauf Jun 12, 2023
39843eb
Revert "Revert "Revert "restructure and add more typehints"""
bleykauf Jun 12, 2023
abf8d16
simplify CSR
bleykauf Jun 12, 2023
b76b878
refactor pack and unpack
bleykauf Jun 12, 2023
c1125da
Revert "refactor pack and unpack"
bleykauf Jun 12, 2023
2970f26
remove bare except for debugging
bleykauf Jun 12, 2023
1ca2176
Revert "remove bare except for debugging"
bleykauf Jun 12, 2023
02f1aa1
change class order
bleykauf Jun 12, 2023
3480742
make small changes to parameters
bleykauf Jun 12, 2023
f982835
rename on_change to register_listener
bleykauf Jun 12, 2023
5f37e98
Revert "rename on_change to register_listener"
bleykauf Jun 12, 2023
a508dc5
Revert "Revert "rename on_change to register_listener""
bleykauf Jun 12, 2023
02c8bf3
Revert "rename on_change to register_listener"
bleykauf Jun 12, 2023
f694d27
Revert "make small changes to parameters"
bleykauf Jun 12, 2023
582ab38
simplify parameter sync
bleykauf Jun 12, 2023
da943cc
Revert "simplify parameter sync"
bleykauf Jun 12, 2023
9b455c2
add exposed to method call
bleykauf Jun 12, 2023
eda765c
Revert "add exposed to method call"
bleykauf Jun 12, 2023
27fbd38
remove broken authenticator
bleykauf Jun 12, 2023
1fd6164
add exposed to a method call
bleykauf Jun 12, 2023
0610288
remove method for restorable parameters
bleykauf Jun 12, 2023
7827583
remove exposed from can_be_cached
bleykauf Jun 12, 2023
89e8b0b
simplify parameter sync
bleykauf Jun 12, 2023
85dce15
Revert "simplify parameter sync"
bleykauf Jun 12, 2023
1c6c474
remove call to log method
bleykauf Jun 12, 2023
f2deba9
remove _remote_param member
bleykauf Jun 12, 2023
5a0e156
debugging
bleykauf Jun 12, 2023
e82c11f
do not pass Parameter objects
bleykauf Jun 12, 2023
33d5647
remove exposed from can_be_cached
bleykauf Jun 12, 2023
a059bd7
simplify cache
bleykauf Jun 12, 2023
dc919be
fix reset
bleykauf Jun 12, 2023
031fd8f
rename on_change to add_listener
bleykauf Jun 12, 2023
8d99c72
fix method call
bleykauf Jun 12, 2023
f8e127d
remove one instance of pack/unpack
bleykauf Jun 12, 2023
abc1f9b
fix autolock
bleykauf Jun 12, 2023
07e2f1b
fix robust autolock
bleykauf Jun 12, 2023
6eac9ec
flatten call_listeners
bleykauf Jun 13, 2023
eba9a6f
add type hints for AsyncResult
bleykauf Jun 13, 2023
c9a88a9
pickle only in server, not in parameters
bleykauf Jun 13, 2023
62b7242
add communication protocol
bleykauf Jun 13, 2023
e308c0f
fix typing errors
bleykauf Jun 13, 2023
933bef3
type hints for app
bleykauf Jun 13, 2023
02ceab1
fix type of uuid
bleykauf Jun 13, 2023
927f073
Revert "fix type of uuid"
bleykauf Jun 13, 2023
ebbf8e7
Revert "type hints for app"
bleykauf Jun 13, 2023
c83958d
fix typehints for uuid
bleykauf Jun 13, 2023
c7b6d81
add missing self
bleykauf Jun 13, 2023
72a559d
fix no-redef mypy error
bleykauf Jun 13, 2023
1b8cd5f
remove pack/unpack from remote paramters
bleykauf Jun 13, 2023
6c45a81
remove pack/unpack from server
bleykauf Jun 13, 2023
b157aee
remove unused hash function
bleykauf Jun 13, 2023
3283b64
remove unused imports
bleykauf Jun 14, 2023
951ca73
type hints for LinienApp
bleykauf Jun 14, 2023
805b315
use relative imports
bleykauf Jun 14, 2023
9de2738
better type hints for client
bleykauf Jun 14, 2023
b65f354
overwrite return value
bleykauf Jun 14, 2023
3c97e25
rename on_change to add_listener for remote parameters
bleykauf Jun 14, 2023
ef386a7
add typehint for _remote_listener_queue
bleykauf Jun 14, 2023
de40c96
add type hints for listener queues
bleykauf Jun 14, 2023
5afd88b
improve method naming
bleykauf Jun 14, 2023
a6ccf1f
fix channel property
bleykauf Jun 14, 2023
9023d44
fix channel property
bleykauf Jun 14, 2023
7691877
clarify method names regarding listeners/callbacks
bleykauf Jun 14, 2023
556c9e8
gitMerge branch 'feature/influxdb' of https://github.com/linien-org/l…
bleykauf Jun 14, 2023
faf1b27
remove unused method register_callback
bleykauf Jun 14, 2023
9497c17
simplify docstring
bleykauf Jun 14, 2023
fd69308
fix add_callback
bleykauf Jun 14, 2023
cc1cd4e
add interface for logging
bleykauf Jun 14, 2023
8fddc1c
fix import of pyqtsignal
bleykauf Jun 14, 2023
ac08548
fix syntax error
bleykauf Jun 14, 2023
c31d257
add log kwarg
bleykauf Jun 14, 2023
37416b5
fix syntax error
bleykauf Jun 14, 2023
bc08230
fix call to parent
bleykauf Jun 14, 2023
254f354
remove app from sub-widgets
bleykauf Jun 15, 2023
8f9dfac
add typehint for logParametersToolButton
bleykauf Jun 15, 2023
93d5523
remove f-string from server
bleykauf Jun 15, 2023
57d40a0
rewire signals/slots
bleykauf Jun 16, 2023
b0914bf
only print first few pings
bleykauf Jun 16, 2023
cda3431
add typehints for influxdb controls
bleykauf Jun 16, 2023
4f0e27e
add some influxdb boilerplate
bleykauf Jun 16, 2023
93e007c
add more logging functionality
bleykauf Jun 16, 2023
788d802
fix updating credentials
bleykauf Jun 16, 2023
06c6858
fix some logging functionality
bleykauf Jun 16, 2023
52604d3
fix some logging functionality
bleykauf Jun 16, 2023
338e585
debugging
bleykauf Jun 16, 2023
4cb6715
copy credentials
bleykauf Jun 16, 2023
95819f1
add minor fixes
bleykauf Jun 16, 2023
67e2af6
add note about RedPitaya OS 2.00.
bleykauf Jun 20, 2023
ddbc596
add some more typehints to acquisition and registers
bleykauf Jun 21, 2023
b9f3a23
fix typehints
bleykauf Jun 21, 2023
9f4e2e4
sort logged parameters alphabetically
bleykauf Jun 28, 2023
983881f
remove unresolved import
bleykauf Jun 28, 2023
5d142fa
add info about suppressed pings
bleykauf Jun 28, 2023
2375517
improve logging ui
bleykauf Jun 28, 2023
e92be1e
move USER_DATA_PATH to common
bleykauf Jun 28, 2023
8131d62
make influxdb credentials restorable
bleykauf Jun 28, 2023
c00032f
pickle influxdb credentials
bleykauf Jun 28, 2023
f329f47
unpickle influxdb credentials
bleykauf Jun 28, 2023
74b60bc
print only changed logging state
bleykauf Jun 28, 2023
4288ae4
create property for credentials
bleykauf Jun 28, 2023
def26a2
save credentials upon change
bleykauf Jun 28, 2023
f73808b
improve logging ui and remove unused imports
bleykauf Jun 28, 2023
485acae
implement writing to influxdb
bleykauf Jun 30, 2023
c844463
utilize status codes
bleykauf Jun 30, 2023
699d6bd
add requests to setup.py
bleykauf Jun 30, 2023
24fa175
fix typing errors
bleykauf Jun 30, 2023
dc7e380
add mising argment
bleykauf Jul 2, 2023
4dab49c
add pip as requirement
bleykauf Jul 3, 2023
c4586db
pin version of certifi
bleykauf Jul 3, 2023
769435b
remove deepcopy
bleykauf Jul 3, 2023
0033661
use self.parameters
bleykauf Jul 3, 2023
d568d94
improve printing and gui
bleykauf Jul 3, 2023
5450c63
update readme
bleykauf Jul 3, 2023
02fe8e9
communicate log status to gui
bleykauf Jul 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/actions/build-linien/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Linien
description: Build all linien packages

runs:
using: "composite"
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Update pip
shell: bash
run: python -m pip install --upgrade pip

- name: Install build dependencies
shell: bash
run: pip install build wheel

- name: Build linien-common
shell: bash
working-directory: linien-common
run: python -m build

- name: Build linien-server
shell: bash
working-directory: linien-server
run: python -m build

- name: Build linien-client
shell: bash
working-directory: linien-client
run: python -m build

- name: Build linien-gui
shell: bash
working-directory: linien-gui
run: python -m build
6 changes: 5 additions & 1 deletion .github/actions/install-linien/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ runs:
using: "composite"
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Update pip
shell: bash
run: python -m pip install --upgrade pip

- name: Install linien-common
shell: bash
working-directory: linien-common
Expand Down
35 changes: 21 additions & 14 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,38 @@ on:
workflow_dispatch:
push:
paths:
- .github/workflows/mypy.yml
- .github/actions/install-linien/**
- linien-common/**
- linien-client/**
- linien-gui/**
- linien-server/**

permissions:
contents: read

jobs:
build:
mypy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Check out repository
uses: actions/checkout@v3

- name: Install linien-common
working-directory: linien-common
run: pip install .
- name: Install Linien
uses: ./.github/actions/install-linien

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy types-appdirs
- name: Install additional dependencies
run: pip install mypy types-appdirs pyqt5-stubs types-requests

- name: mypy for linien-common
run: mypy linien-common
run: mypy linien-common/linien_common

- name: mypy for linien-server
run: mypy linien-server/linien_server

- name: mypy for linien-client
run: mypy linien-client/linien_client

- name: mypy for linien-gui
run: mypy linien-gui/linien_gui
27 changes: 2 additions & 25 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,8 @@ jobs:
with:
lfs: "true"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel

- name: Build linien-common
working-directory: linien-common
run: python -m build

- name: Build linien-server
working-directory: linien-server
run: python -m build

- name: Build linien-client
working-directory: linien-client
run: python -m build

- name: Build linien-gui
working-directory: linien-gui
run: python -m build
- name: Build Linien
uses: ./.github/actions/build-linien

- name: Publish linien-common
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
35 changes: 6 additions & 29 deletions .github/workflows/publish-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,56 +15,33 @@ jobs:
with:
lfs: "true"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel

- name: Build linien-common
working-directory: linien-common
run: python -m build

- name: Build linien-server
working-directory: linien-server
run: python -m build

- name: Build linien-client
working-directory: linien-client
run: python -m build

- name: Build linien-gui
working-directory: linien-gui
run: python -m build
- name: Build Linien
uses: ./.github/actions/build-linien

- name: Publish linien-common to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: linien-common/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_COMMON }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish linien-server to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: linien-server/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_SERVER }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish linien-client to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: linien-client/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_CLIENT }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish linien-gui to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: linien-gui/dist/
password: ${{ secrets.TEST_PYPI_API_TOKEN_GUI }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
8 changes: 4 additions & 4 deletions .github/workflows/pyinstaller-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
with:
python-version: "3.10"

- name: Install dependencies
run: sudo apt-get install -y qt5-default qttools5-dev-tools binutils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa

- run: pip install pyinstaller
- name: Install additional dependencies
run: |
sudo apt-get install -y qt5-default qttools5-dev-tools binutils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa
pip install pyinstaller

- name: Install linien-common
working-directory: linien-common
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/pyinstaller-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch:
push:
paths:
- .github/workflows/pyinstaller-windows.yml
- .github/actions/install-linien/**
- linien-common/**
- linien-client/**
- linien-gui/**
Expand All @@ -17,24 +19,11 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- run: pip install pyinstaller

- name: Install linien-common
working-directory: linien-common
run: pip install .
- name: Install Linien
uses: ./.github/actions/install-linien

- name: Install linien-client
working-directory: linien-client
run: pip install .

- name: Install linien-gui
working-directory: linien-gui
run: pip install .
- name: Install Pyinstaller
run: pip install pyinstaller

- run: pyinstaller pyinstaller.spec
working-directory: linien-gui
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch:
push:
paths:
- .github/workflows/pytest.yml
- .github/actions/install-linien/**
- gateware/**
- linien-common/**
- linien-server/**
Expand All @@ -17,25 +19,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Check out repository
uses: actions/checkout@v3

- name: Install linien-common
working-directory: linien-common
run: pip install .

- name: Install linien-server
working-directory: linien-server
run: pip install .
- name: Install Linien
uses: ./.github/actions/install-linien

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest migen pytest-plt git+https://github.com/m-labs/misoc

- name: Test with pytest
run: |
pytest .
run: pytest .
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ Features
- **Lock detection**: Linien is capable of detecting loss of lock (temporarily disabled, use [v0.3.2](https://github.com/linien-org/linien/releases/tag/v0.3.2) if you rely in this feature
- **Automatic relocking**: if lock is lost, it relocks autonomously (temporarily disabled, use [v0.3.2](https://github.com/linien-org/linien/releases/tag/v0.3.2) if you rely in this feature)
- **Machine learning** is used to tune the spectroscopy parameters in order to optimize the signal
- **Remote-controllable**: the client libraries can be used to control or monitor the spectroscopy lock with python.
- **Remote-controllable**: the client libraries can be used to control or monitor the spectroscopy lock with Python.
- **Combined FMS+MTS**: Linien supports dual-channel spectroscopy that can be
used to implement [combined
FMS+MTS](https://arxiv.org/pdf/1701.01918.pdf)
- **Logging**: Use
[linien-influxdb](https://github.com/linien-org/linien-influxdb)
to log the lock status to influxdb.
- **Logging**: Lock status and parameters can be logged to InfluxDB v2.
- **Second integrator** for slow control of piezo in an ECDL
- **Additional analog outputs** may be used using the GUI or python client (ANALOG_OUT 1, 2 and 3)
- **16 GPIO outputs** may be programmed (e.g. for controlling other devices)
Expand Down Expand Up @@ -137,7 +135,7 @@ The bright red line is the demodulated spectroscopy signal. The dark red area is

Fast mode is intended for bare PID operation (no demodulation or filtering), bypassing most of the FPGA functionality. If enabled, the signal flow is FAST IN 1 → PID → FAST OUT 2. This is useful, if aiming for a high control bandwidth: fast mode reduces propagation delay from 320 ns to 125 ns which may make a difference when phase-locking lasers.

### Optimization of spectroscopy parameters using machine learning (optional)
### Optimization of spectroscopy parameters using machine learning

Linien may use machine learning to maximize the slope of a line. As for the autolock, click and drag over the line you want to optimize. Then, the line is centered and the optimization starts. Please note that this only works if initially a distinguished zero-crossing is visible.

Expand Down Expand Up @@ -170,6 +168,12 @@ Linien implements two different autolock algorithms:

If you have problems with the autolock, you may also lock manually. Activate the *Manual* tab and use the controls in the top (*Zoom* and *Position*) to center the line you want to lock to. Choose whether the target slope is rising or falling and click the green button.

### Logging

Linien has to option to log the lock status and parameters to an InfluxDB. Currently, only InfluxDB 2.x is supported. Logging can be configured via the Logging menu in the Linien GUI, but logging will continue even if the client is closed. Time stamps of the data points are determined by the InfluxDB, not by the RedPitaya. If updating/checking the InfluxDB credentials fails, there is additional information in the tool-tip of the fail indicator ❌.

The parameter names are documented in [`parameters.py`](https://github.com/linien-org/linien/blob/master/linien-server/linien_server/parameters.py). The `signal_stats` parameter does contain statistics of the input and output signals, e.g. `control_signal_mean` or `monitor_signal_max`.

Transfer function
-----------------

Expand Down Expand Up @@ -230,19 +234,19 @@ c.parameters.gpio_p_out.value = 0b01010101 # 4 on, 4 off
c.connection.root.write_registers()

# it is also possible to set up a callback function that is called whenever a
# parameter changes (remember to call `call_listeners()` periodically)
def on_change(value):
# parameter changes (remember to call `check_for_changed_parameters()` periodically)
def callback(value):
# this function is called whenever `my_param` changes on the server.
# note that this only works if `call_listeners` is called from
# note that this only works if `check_for_changed_parameters` is called from
# time to time as this function is responsible for checking for
# changed parameters.
print('parameter arrived!', value)

c.parameters.modulation_amplitude.on_change(on_change)
c.parameters.modulation_amplitude.add_callback(callback)

from time import sleep
for i in range(10):
c.parameters.call_listeners()
c.parameters.check_for_changed_parameters()
if i == 2:
c.parameters.modulation_amplitude.value = 0.1 * Vpp
sleep(.1)
Expand Down
Loading