From df84850941552d80029c8b2f7c7bb360a4a9090a Mon Sep 17 00:00:00 2001 From: appleb_m Date: Wed, 29 Apr 2026 17:34:41 +0200 Subject: [PATCH] Update to version 0.3.1 --- CHANGELOG.md | 17 +++++++++++++---- README.md | 4 +++- VERSION | 2 +- docs/conf.py | 19 ++++++++++++++++++- docs/index.rst | 27 +++++++++++++++++++-------- pyproject.toml | 2 +- src/aare/daq/daq.py | 6 ++++++ src/aare/gui/gui.py | 2 +- src/aare/gui/main_window.py | 2 +- 9 files changed, 63 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e0f700e..3650736c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ # Changelog +## 0.3.1 (2026-04-29) +- **DAQ/Server**: + - Improved baton exchange logic with automatic timeout and Redis-backed state. +- **GUI**: + - Updated about dialog with correct version and copyright. + - Improved layout persistence and state management. + ## 0.3.0 (2026-04-24) - Merge three repos into one, remove Ultralytics as dependency - **Testing & CI/CD**: @@ -6,6 +13,7 @@ - Integrated `pytest-cov` and `pytest-mock` into the testing workflow with 100% coverage on core modules like `coordinate` and `exception_handler`. - Added automated testing stage to Gitea workflow (`.gitea/workflows/action.yaml`) ensuring tests pass before build and documentation updates. - Added `pytest-qt` support for GUI testing. + - Added tests for `aerotech`, `models`, `autofocus`, `automation`, `beamline`, `diffraction_geometry`, `enum_pv`, `face_detection`, `jfjoch_client`, `mlbox`, `my_motor`, `spreadsheet_updater`, and `workflows`. - **DAQ/Server**: - Added lifespan function for one-time initialization of core objects (devices, daq, config) on startup, reducing conflicting Redis and device connections. - Big Aerotech upgrade: transitioned to Aerotech API with ported coordinate functions. @@ -27,6 +35,8 @@ - Updated `server_exception_handler.py` and `error_codes.py` to cover all custom exceptions. - Added `auto_exposure` endpoint and improved `autofocus` logic. - Fixed multiple bugs in raster scan positioning and state transitions. + - Refactored `MLBOX` and `LOOP_CENTERING` types; loop centering now avoids moving if only non-crystal classes (pin, ice, needle) are found. + - Split `LOOP_CENTERING` from main DAQ script for better maintainability. - **Baton & Sessions**: - Major rework of the baton exchange procedure and session management. - Added `NOT_BATON_HOLDER` error code and specialized handling for baton requests. @@ -51,6 +61,7 @@ - Added automation progress panel and wired it to the persistent Redis backend. - Improved prediction subscriber performance and target stability visualization. - Added shortcuts and improved user feedback in the status bar using `BeamlineStateEnum` display names. + - Improved prediction subscriber and metrics panel performance. - **TELL & Infrastructure**: - Added mTLS certificate authentication for `aaredb`, `tellupdater`, and `spreadsheetupdater`. - Improved SSE client resilience in `tellupdater` with retry mechanisms and enhanced error logging. @@ -62,6 +73,7 @@ - Added control for pin blower and annealing (in/out) to `TellClient`. - Improved TELL HTTP communication handling to prevent swallowed errors. - Added magnet position sensor state checks and exception handling. + - Improved Gitea workflows with better dependency management and testing steps. - **Common & Devices**: - Added BEC worker and Aerotech controller initialization in `devices.py`. - Added magnet position sensor functions and centralized transmission settings. @@ -75,10 +87,7 @@ - Added `display_name` to `BeamlineStateEnum` for consistent UI strings. - Refactored `SampleShortInfo` handling across DAQ and database modules. - Multiple bug fixes in ML box prediction logic and coordinate transformations. -- **Infrastructure**: - - Updated dependencies (added `pshell`) and improved documentation autodeployment workflows. - - Refactored package structure and imports. - - Fixed `logger_config` file path expansion. + - `JFJOCH` wrapper: Added retries for image retrieval and new `wait_till_running` method. ### 0.2.69 - check beamline state before running raster, rotation and automation diff --git a/README.md b/README.md index ddcd28f4..eb9ff3c5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Readme +# AareDAQ (v0.3.1) + +AareDAQ is the Data Acquisition system for MX beamlines at PSI. ## GUI Controls Cheat Sheet diff --git a/VERSION b/VERSION index 0d91a54c..9e11b32f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0 +0.3.1 diff --git a/docs/conf.py b/docs/conf.py index c2372267..932cfdea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,7 +16,7 @@ sys.path.insert(0, os.path.abspath('../src/aare/gui')) project = 'AareDAQ' copyright = '2026, Paul Scherrer Institute' author = 'Martin Appleby, Guillaume Gotthard, Filip Leonarski and Dawn (Jiaxin) Daun' -release = '0.3.0' +release = '0.3.1' master_doc = 'index' root_doc = 'index' @@ -109,6 +109,13 @@ html_theme_options = { "site_url": "https://gitea.psi.ch/mx/aaredaq", "repo_url": "https://gitea.psi.ch/mx/aaredaq", "repo_name": "AareDAQ", + "social": [ + { + "icon": "fontawesome/brands/github", + "link": "https://gitea.psi.ch/mx/aaredaq", + "name": "AareDAQ on Gitea", + }, + ], "palette": [ { "media": "(prefers-color-scheme: light)", @@ -137,8 +144,17 @@ html_theme_options = { "navigation.top", "search.share", "toc.follow", + "navigation.instant", + "content.tabs.link", + "content.code.annotate", + "content.code.copy", ], "globaltoc_collapse": False, + "toc_title": "On this page", + "toc_title_container": True, + "font": { + "code": "JetBrains Mono", + }, } html_theme_options["google_fonts"] = [] html_sidebars = { @@ -154,4 +170,5 @@ autodoc_default_options = { 'members': True, 'undoc-members': True, 'show-inheritance': True, + 'member-order': 'bysource', } diff --git a/docs/index.rst b/docs/index.rst index e1106fb8..7e2b3cfa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,22 +3,33 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to the AareDAQ Documentation -===================== +Welcome to AareDAQ +================= + +AareDAQ is the Data Acquisition system for MX beamlines at the Paul Scherrer Institute (PSI). +It provides a robust backend for orchestrating beamline devices and a user-friendly GUI for data collection. + +Overview +-------- + +* :doc:`User Guide `: New to AareDAQ? Check out the overview and cheat sheet. +* :doc:`Changelog `: See what's new in the latest version. +* :doc:`API Reference `: Detailed documentation for all AareDAQ modules and classes. .. toctree:: :maxdepth: 2 - :caption: Contents: - :glob: + :caption: Documentation + :hidden: - ../README - ../CHANGELOG + README + CHANGELOG .. toctree:: :maxdepth: 2 - :caption: API Reference + :caption: Development + :hidden: - api/aare + API Reference Indices and tables ================== diff --git a/pyproject.toml b/pyproject.toml index 405fc025..c7bb3694 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aaredaq" -version = "0.3.0" +version = "0.3.1" description = "AareDAQ (with GUI)" readme = "README.md" requires-python = ">=3.11" diff --git a/src/aare/daq/daq.py b/src/aare/daq/daq.py index 27c591b8..6a94fb96 100644 --- a/src/aare/daq/daq.py +++ b/src/aare/daq/daq.py @@ -74,6 +74,12 @@ from aare.devices.tell_client import TellEventValueEnum logger = setup_logger("aareDAQ") #TODO tidy up DAQ - migrate functions itno different scripts, to reduce size? class AareDAQ: + """ + Main Data Acquisition class for the Aare system. + + This class orchestrates interactions between various beamline devices, + the Aare database, ML services, and data collection workflows. + """ MIN_SPOTS_LOW_RES_THRESHOLD = 10.0 diff --git a/src/aare/gui/gui.py b/src/aare/gui/gui.py index a0aaacba..c9c08641 100644 --- a/src/aare/gui/gui.py +++ b/src/aare/gui/gui.py @@ -17,7 +17,7 @@ def main(): try: app = QApplication(sys.argv) app.setApplicationName("AareGUI") - app.setApplicationVersion("0.1.0") + app.setApplicationVersion("0.3.1") app.setOrganizationName("PSI") app.setOrganizationDomain("psi.ch") diff --git a/src/aare/gui/main_window.py b/src/aare/gui/main_window.py index a8db6096..045392de 100644 --- a/src/aare/gui/main_window.py +++ b/src/aare/gui/main_window.py @@ -1016,7 +1016,7 @@ class MainWindow(QMainWindow): QMessageBox.about( self, "About", - "Aare Macromolecular Crystallography GUI\nVersion: 1.0\nCopyright: Paul Scherrer Institute 2024-2025", + "Aare Macromolecular Crystallography GUI\nVersion: 0.3.1\nCopyright: Paul Scherrer Institute 2024-2026", ) def show_controls_help(self) -> None: