diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml
index b4589ea3a0..5908f1ad25 100644
--- a/.github/workflows/pages.yaml
+++ b/.github/workflows/pages.yaml
@@ -25,10 +25,10 @@ jobs:
# See "Caveats" at https://pypi.org/project/sphinx-last-updated-by-git
fetch-depth: 0
- - name: "Set up Python 3.8"
+ - name: "Set up Python 3.10"
uses: "actions/setup-python@v5"
with:
- python-version: "3.8"
+ python-version: "3.10"
- name: "Install OpenLDAP's dev package with apt"
run: |
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index 502db0ac4c..5c621d200f 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -14,10 +14,10 @@ jobs:
- uses: actions/checkout@v3
- - name: Set up Python 3.8
+ - name: Set up Python 3.10
uses: actions/setup-python@v4
with:
- python-version: "3.8"
+ python-version: "3.10"
- name: Install openldap
# yamllint disable rule:line-length
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index abac6ae5ff..d9eb2c8053 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["3.8", "3.9", "3.10", "3.11"]
+ python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
@@ -30,7 +30,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry --user
- python -m poetry install --extras=tango
+ python -m poetry install
- name: Test with pytest
run: |
diff --git a/.isort.cfg b/.isort.cfg
index 4923de2c83..108c2f9157 100644
--- a/.isort.cfg
+++ b/.isort.cfg
@@ -1,4 +1,4 @@
[settings]
profile=black
-py_version=38
+py_version=310
force_grid_wrap=2
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 75873ce5b4..86fbad4775 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,11 +10,11 @@ repos:
- --strict
- repo: https://github.com/python-poetry/poetry
- rev: 1.8.0
+ rev: 2.0.1
hooks:
- id: poetry-check
- - repo: https://github.com/myint/autoflake
+ - repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
@@ -27,20 +27,18 @@ repos:
- --ignore-pass-after-docstring
- repo: https://github.com/pycqa/isort
- rev: 5.13.2
+ rev: 6.0.0
hooks:
- id: isort
- - repo: https://github.com/psf/black
- rev: 24.8.0 # The following version (`24.10.0`) dropped support for Python 3.8.
+ - repo: https://github.com/psf/black-pre-commit-mirror
+ rev: 25.1.0
hooks:
- id: black
name: Black
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.6.0
- # The following version (pre-commit-hooks 5.0.0) requires pre-commit 3.2.0
- # which does not support Python 3.8 (dropped in pre-commit 3.0.0).
+ rev: v5.0.0
hooks:
- id: trailing-whitespace
# Exclude files from trailing-whitespace checks until we get around fixing them.
diff --git a/conda-environment-dev.yml b/conda-environment-dev.yml
index a3746ed2af..077f17d0bd 100644
--- a/conda-environment-dev.yml
+++ b/conda-environment-dev.yml
@@ -1,6 +1,7 @@
%YAML 1.2
---
+
name: mxcubecore
channels:
@@ -11,7 +12,7 @@ dependencies:
# Runtime dependencies
# ====================
- - python >=3.8,<3.12
+ - python >=3.10,<3.12 # Keep in sync with `pyproject.toml`
# `openldap` is necessary for `python-ldap` but can not be installed by pip or Poetry.
# Note also that on PyPI `python-ldap` is only available as *sdist*, not as *wheel*,
@@ -26,4 +27,7 @@ dependencies:
# Development dependencies
# ========================
- - poetry
+ - poetry ==2.0.1 # Keep in sync with `.pre-commit-config.yaml` and `poetry.lock`
+
+
+...
diff --git a/deprecated/HardwareObjects/TacoDevice_MTSafe.py b/deprecated/HardwareObjects/TacoDevice_MTSafe.py
index adc4141f84..7df4d9a89c 100644
--- a/deprecated/HardwareObjects/TacoDevice_MTSafe.py
+++ b/deprecated/HardwareObjects/TacoDevice_MTSafe.py
@@ -454,7 +454,7 @@ def dev_io(mdevname, mdevcommand, *parin, **kw):
io_out,
0,
parin,
- **kw
+ **kw,
)
except Exception:
raise Dev_Exception(
diff --git a/deprecated/HardwareObjects/mockup/CameraMockup.py b/deprecated/HardwareObjects/mockup/CameraMockup.py
index 2517f8f44e..abc32f9630 100644
--- a/deprecated/HardwareObjects/mockup/CameraMockup.py
+++ b/deprecated/HardwareObjects/mockup/CameraMockup.py
@@ -1,5 +1,4 @@
-"""Class for cameras connected to framegrabbers run by Taco Device Servers
-"""
+"""Class for cameras connected to framegrabbers run by Taco Device Servers"""
import logging
import os
diff --git a/mxcubecore/Command/Exporter.py b/mxcubecore/Command/Exporter.py
index 5f4ab2a8a1..87f20bd916 100644
--- a/mxcubecore/Command/Exporter.py
+++ b/mxcubecore/Command/Exporter.py
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Lesser Public License
# along with MXCuBE. If not, see .
-"""Exporter, ExporterChannel and ExporterCommand implementation """
+"""Exporter, ExporterChannel and ExporterCommand implementation"""
# from warnings import warn
import logging
@@ -231,7 +231,7 @@ def __init__(
address=None,
port=None,
timeout=3,
- **kwargs
+ **kwargs,
):
ChannelObject.__init__(self, name, username, **kwargs)
diff --git a/mxcubecore/Command/Pool.py b/mxcubecore/Command/Pool.py
index bad95004e8..be981bc3a4 100755
--- a/mxcubecore/Command/Pool.py
+++ b/mxcubecore/Command/Pool.py
@@ -165,7 +165,7 @@ def __init__(
username=None,
polling=None,
timeout=10000,
- **kwargs
+ **kwargs,
):
ChannelObject.__init__(self, name, username, **kwargs)
diff --git a/mxcubecore/Command/Sardana.py b/mxcubecore/Command/Sardana.py
index 7fbe7bcb3b..7426e15aea 100644
--- a/mxcubecore/Command/Sardana.py
+++ b/mxcubecore/Command/Sardana.py
@@ -19,7 +19,7 @@
# along with MXCuBE. If not, see .
-"""Sardana Control System """
+"""Sardana Control System"""
from __future__ import absolute_import
diff --git a/mxcubecore/Command/Spec.py b/mxcubecore/Command/Spec.py
index 72a38fc744..7adfcb62e1 100644
--- a/mxcubecore/Command/Spec.py
+++ b/mxcubecore/Command/Spec.py
@@ -95,7 +95,7 @@ def __init__(
version=None,
username=None,
dispatchMode=SpecVariable.FIREEVENT,
- **kwargs
+ **kwargs,
):
ChannelObject.__init__(self, name, username, **kwargs)
SpecVariableA.__init__(self, varname, version, dispatchMode)
diff --git a/mxcubecore/Command/Taco.py b/mxcubecore/Command/Taco.py
index 370aa2a26a..608e9b7300 100644
--- a/mxcubecore/Command/Taco.py
+++ b/mxcubecore/Command/Taco.py
@@ -161,7 +161,7 @@ def __init__(
username=None,
polling=None,
args=None,
- **kwargs
+ **kwargs,
):
ChannelObject.__init__(self, name, username, **kwargs)
diff --git a/mxcubecore/Command/Tine.py b/mxcubecore/Command/Tine.py
index 7ba3218b16..3bad23b566 100755
--- a/mxcubecore/Command/Tine.py
+++ b/mxcubecore/Command/Tine.py
@@ -48,7 +48,7 @@ def __init__(
username=None,
ListArgs=None,
timeout=1000,
- **kwargs
+ **kwargs,
):
CommandObject.__init__(self, name, username, **kwargs)
self.commandName = command_name
diff --git a/mxcubecore/Command/exporter/StandardClient.py b/mxcubecore/Command/exporter/StandardClient.py
index a13e6da3a9..dda3002065 100644
--- a/mxcubecore/Command/exporter/StandardClient.py
+++ b/mxcubecore/Command/exporter/StandardClient.py
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Lesser Public License
# along with MXCuBE. If not, see .
-""" ProtocolError and StandardClient implementation"""
+"""ProtocolError and StandardClient implementation"""
import socket
import sys
diff --git a/mxcubecore/HardwareObjects/BeamlineTools.py b/mxcubecore/HardwareObjects/BeamlineTools.py
index 5da25adcde..c21042188f 100644
--- a/mxcubecore/HardwareObjects/BeamlineTools.py
+++ b/mxcubecore/HardwareObjects/BeamlineTools.py
@@ -17,8 +17,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with MXCuBE. If not, see .
-"""
-"""
+""" """
from mxcubecore.BaseHardwareObjects import HardwareObject
diff --git a/mxcubecore/HardwareObjects/BlissShutter.py b/mxcubecore/HardwareObjects/BlissShutter.py
index 0b8d8c31e6..779c7e44b7 100644
--- a/mxcubecore/HardwareObjects/BlissShutter.py
+++ b/mxcubecore/HardwareObjects/BlissShutter.py
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with MXCuBE. If not, see .
-""" BlissShutter class - interface for shutter controlled by BLISS
+"""BlissShutter class - interface for shutter controlled by BLISS
Implements _set_value, get_value methods
Bliss states are: UNKNOWN, OPEN, CLOSED, FAULT
"MOVING", "DISABLE", "STANDBY", "RUNNING"
diff --git a/mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py b/mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py
index 390dec46ce..2972e746de 100644
--- a/mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py
+++ b/mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Lesser Public License
# along with MXCuBE. If not, see .
-""" Execute commands and toggle two state actions
+"""Execute commands and toggle two state actions
Example xml file: