Merge branch 'python39' into 'master'

transition to python/3.9

See merge request bec/csaxs-bec!3
This commit was merged in pull request #15.
This commit is contained in:
2024-03-05 11:36:38 +01:00
6 changed files with 14 additions and 16 deletions

View File

@@ -1,7 +1,8 @@
import csv
from collections import defaultdict
import os
from typing import Callable
from collections import defaultdict
from collections.abc import Callable
import numpy as np

View File

@@ -1,11 +1,11 @@
from typing import List
import csv
from collections import defaultdict
import os
from typing import Callable
import numpy as np
from collections import defaultdict
from collections.abc import Callable
from copy import deepcopy
import numpy as np
class ScanItem:
def __init__(self, offset_xy: Callable) -> None:
@@ -13,7 +13,7 @@ class ScanItem:
self.offset_xy = offset_xy
self.split_upon_points = 8000
def to_scan_params(self) -> List[dict]:
def to_scan_params(self) -> list[dict]:
interval_x = int(
np.round(
np.abs(float(self.entry["X [start]"]) - float(self.entry["X [end]"]))

View File

@@ -4,7 +4,7 @@ if [ "pc15543.psi.ch" != "$(hostname)" ]; then
exit 1
fi
module add psi-python38/2020.11
module add psi-python39/2021.11
echo module add tmux/3.2 >> ~/.bashrc
echo module add redis/7.0.12 >> ~/.bashrc
@@ -35,7 +35,7 @@ read -p "Do you want to set the current BEC account to $(whoami)? (yes/no) " yn
val=$(whoami)
case $yn in
case $yn in
yes ) echo ok, setting account to $val;
redis-cli SET internal/account:val $val;;
no ) echo ;;
@@ -45,5 +45,3 @@ esac
$(pwd)/open_tunnel.sh

View File

@@ -1,4 +1,4 @@
module add psi-python38/2020.11
module add psi-python39/2021.11
cd ~/Data10/software
python -m venv ./bec_widgets_venv
@@ -13,4 +13,4 @@ pip install -e .
cd ~/Data10/software/bec-widgets
pip install -e .
echo "For the moment widgets only run on beamline consoles comp1/2 and cons1"
echo "For the moment widgets only run on beamline consoles comp1/2 and cons1"

View File

@@ -4,7 +4,7 @@
# BEAMLINE_REPO=gitlab.psi.ch:bec/csaxs-bec.git
# git clone git@$BEAMLINE_REPO
module add psi-python38/2020.11
module add psi-python39/2021.11
# start redis
docker run --network=host --name redis-bec -d redis
@@ -25,4 +25,3 @@ source ./bin/install_bec_dev.sh
cd ../
# start the BEC server
bec-server start --config ./csaxs-bec/deployment/bec-server-config.yaml

View File

@@ -15,7 +15,7 @@ classifiers =
package_dir =
= .
packages = find:
python_requires = >=3.8
python_requires = >=3.9
[options.packages.find]
where = .