From 1f8a8a5122edd6c216f1183263a2455a5298034d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 01:23:33 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/psf/black: 23.10.1 → 24.10.0](https://github.com/psf/black/compare/23.10.1...24.10.0) - [github.com/pre-commit/mirrors-mypy: v1.6.1 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.6.1...v1.14.1) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b66e27a..83fe20d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: 'monthly' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: check-toml @@ -10,7 +10,7 @@ repos: args: [-b, master] - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 24.10.0 hooks: - id: black name: black @@ -19,7 +19,7 @@ repos: types: [python] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.1 + rev: v1.14.1 hooks: - id: mypy exclude: ^docs/conf.py From c561b9d24efd57c881317f67417c8eb1c0774e27 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 01:27:50 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- yaqd_spectra_physics/__version__.py | 1 - .../spectra-physics-millennia.avpr | 249 ------------------ 2 files changed, 250 deletions(-) diff --git a/yaqd_spectra_physics/__version__.py b/yaqd_spectra_physics/__version__.py index 6a21d7d..1b5e8a6 100644 --- a/yaqd_spectra_physics/__version__.py +++ b/yaqd_spectra_physics/__version__.py @@ -1,6 +1,5 @@ """Define version.""" - import pathlib import subprocess diff --git a/yaqd_spectra_physics/spectra-physics-millennia.avpr b/yaqd_spectra_physics/spectra-physics-millennia.avpr index bf3623a..e69de29 100644 --- a/yaqd_spectra_physics/spectra-physics-millennia.avpr +++ b/yaqd_spectra_physics/spectra-physics-millennia.avpr @@ -1,249 +0,0 @@ -{ - "config": { - "baud_rate": { - "default": 9600, - "doc": "Dip switch S1 on laser head determines baud rate (consult manual). Default is 9600.", - "origin": "uses-uart", - "type": "int" - }, - "enable": { - "default": true, - "doc": "Disable this daemon. The kind entry-point will not attempt to start this daemon.", - "origin": "is-daemon", - "type": "boolean" - }, - "limits": { - "default": [ - 0.2, - 5.0 - ], - "doc": "Lasing power limits (Watts).", - "type": "limits" - }, - "log_level": { - "default": "info", - "doc": "Set daemon log-level.", - "origin": "is-daemon", - "type": { - "name": "level", - "symbols": [ - "debug", - "info", - "notice", - "warning", - "error", - "critical", - "alert", - "emergency" - ], - "type": "enum" - } - }, - "log_to_file": { - "default": false, - "doc": "Optionally force logging to a file.", - "origin": "is-daemon", - "type": "boolean" - }, - "make": { - "default": null, - "origin": "is-daemon", - "type": [ - "null", - "string" - ] - }, - "model": { - "default": null, - "origin": "is-daemon", - "type": [ - "null", - "string" - ] - }, - "port": { - "doc": "TCP port for daemon to occupy.", - "origin": "is-daemon", - "type": "int" - }, - "refresh_wait": { - "default": 30, - "doc": "Wait interval, in seconds, to poll state when idle. Default is 30 sec.", - "type": "int" - }, - "serial": { - "default": null, - "doc": "Serial number for the particular device represented by the daemon", - "origin": "is-daemon", - "type": [ - "null", - "string" - ] - }, - "serial_port": { - "origin": "uses-uart", - "type": "string" - } - }, - "doc": "Millennia serial interface", - "fields": { - "power": { - "getter": "get_power", - "setter": "set_power", - "type": "float" - } - }, - "installation": { - "PyPI": "https://pypi.org/project/yaqd-spectra-physics" - }, - "links": { - "bugtracker": "https://github.com/yaq-project/yaqd-spectra-physics/issues", - "source": "https://github.com/yaq-project/yaqd-spectra-physics" - }, - "messages": { - "busy": { - "doc": "Returns true if daemon is currently busy.", - "origin": "is-daemon", - "request": [], - "response": "boolean" - }, - "direct_serial_write": { - "doc": "Expose direct access to the serial port to clients.\n\nThis should not be encouraged for normal use, but may be very important for debugging.\nIf a device is expected to return data, it should be logged at the INFO level, not returned to the client.\nThis is done to allow long tasks to be run asynchronously, and to explicitly discourage use of this method except when debugging.\nSetting `busy` to true is encouraged, but individual daemon writers should consider their own use case.\n", - "origin": "uses-serial", - "request": [ - { - "name": "message", - "type": "bytes" - } - ], - "response": "string" - }, - "get_config": { - "doc": "Full configuration for the individual daemon as defined in the TOML file.\nThis includes defaults and shared settings not directly specified in the daemon-specific TOML table.\n", - "origin": "is-daemon", - "request": [], - "response": "string" - }, - "get_config_filepath": { - "doc": "String representing the absolute filepath of the configuration file on the host machine.\n", - "origin": "is-daemon", - "request": [], - "response": "string" - }, - "get_state": { - "doc": "Get version of the running daemon", - "origin": "is-daemon", - "request": [], - "response": "string" - }, - "id": { - "doc": "JSON object with information to identify the daemon, including name, kind, make, model, serial.\n", - "origin": "is-daemon", - "request": [], - "response": { - "type": "map", - "values": [ - "null", - "string" - ] - } - }, - "query": { - "doc": "Issue serial command and receive response. Command checks for and logs errors.", - "request": [ - { - "name": "message", - "type": "bytes" - } - ], - "response": "string" - }, - "shutdown": { - "doc": "Cleanly shutdown (or restart) daemon.", - "origin": "is-daemon", - "request": [ - { - "default": false, - "name": "restart", - "type": "boolean" - } - ], - "response": "null" - } - }, - "protocol": "spectra-physics-millennia", - "requires": [], - "state": { - "c1": { - "default": "0", - "doc": "measured diode currents (Amperes)", - "type": "string" - }, - "c2": { - "default": "0", - "doc": "measured diode currents (Amperes)", - "type": "string" - }, - "error_code": { - "default": "0", - "doc": "Code for status that displays on controller. See manual Appendix A.", - "type": "string" - }, - "power": { - "default": "0", - "doc": "measured laser power (Watts)", - "type": "string" - }, - "set_power": { - "default": "0", - "doc": "destination power", - "type": "string" - } - }, - "traits": [ - "is-daemon", - "uses-serial", - "uses-uart" - ], - "types": [ - { - "name": "mode", - "symbols": [ - "P", - "C%" - ], - "type": "enum" - }, - { - "items": "float", - "name": "limits", - "type": "array" - }, - { - "fields": [ - { - "name": "shape", - "type": { - "items": "int", - "type": "array" - } - }, - { - "name": "typestr", - "type": "string" - }, - { - "name": "data", - "type": "bytes" - }, - { - "name": "version", - "type": "int" - } - ], - "logicalType": "ndarray", - "name": "ndarray", - "type": "record" - } - ] -} \ No newline at end of file