Skip to content

Commit debb1bc

Browse files
committed
⬆️ Update to nixos-25.11 and update Python deps
1 parent 85b25f6 commit debb1bc

File tree

9 files changed

+320
-224
lines changed

9 files changed

+320
-224
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Set up Python 3.12
15+
- name: Set up Python 3.13
1616
uses: actions/setup-python@v4
1717
with:
18-
python-version: "3.12"
18+
python-version: "3.13"
1919
- uses: astral-sh/setup-uv@v1
2020
with:
2121
version: "latest"
2222
- name: Install dependencies
23-
run: uv sync -p 3.12
23+
run: uv sync -p 3.13
2424
- name: format
2525
run: uv run ruff format --check

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.13

flake.lock

Lines changed: 68 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
description = "flake for mr-t using uv2nix";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
5+
nixpkgs.url = "nixpkgs/nixos-25.11";
6+
7+
desy-flake = {
8+
url = "git+https://gitlab.desy.de/philipp.middendorf/desy-flake";
9+
inputs.nixpkgs.follows = "nixpkgs";
10+
};
611

712
pyproject-nix = {
813
url = "github:pyproject-nix/pyproject.nix";
@@ -28,6 +33,7 @@
2833
, uv2nix
2934
, pyproject-nix
3035
, pyproject-build-systems
36+
, desy-flake
3137
, ...
3238
}:
3339
let
@@ -60,10 +66,15 @@
6066
};
6167

6268
# This example is only using x86_64-linux
63-
pkgs = nixpkgs.legacyPackages.x86_64-linux;
69+
pkgs = import nixpkgs {
70+
system = "x86_64-linux";
71+
overlays = [
72+
desy-flake.overlays.default
73+
];
74+
};
6475

6576
# Use Python 3.12 from nixpkgs
66-
python = pkgs.python312;
77+
python = pkgs.python313;
6778

6879
# Construct package set
6980
pythonSet =
@@ -154,6 +165,8 @@
154165

155166
# Prevent uv from downloading managed Python's
156167
UV_PYTHON_DOWNLOADS = "never";
168+
169+
HDF5_PLUGIN_PATH = "${pkgs.hdf5-external-filter-plugins}/lib/plugins";
157170
};
158171

159172
shellHook = ''

pyproject.toml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@ name = "mr-t"
33
version = "1.0.0"
44
description = "connect to Eiger, stream to file and UDP"
55
readme = "README.md"
6-
requires-python = ">=3.12"
6+
requires-python = ">=3.13"
7+
license = "GPL-3.0-or-later"
78
dependencies = [
89
"asyncudp==0.11.0",
9-
"culsans==0.7.1",
10-
"h5py==3.14.0",
11-
"pyzmq==26.2.0",
12-
"structlog==24.4.0",
13-
"typed-argument-parser==1.10.1",
10+
"culsans==0.10.0",
11+
"h5py==3.15.1",
12+
"pyzmq==27.1.0",
13+
"structlog==25.5.0",
14+
"typed-argument-parser==1.11.0",
15+
]
16+
authors = [
17+
{name = "Philipp Middendorf", email = "philipp.middendorf@desy.de"}
1418
]
1519

1620
[project.scripts]
1721
mr_t_server = "mr_t.server:main"
1822
dummy_client = "mr_t.dummy_client:main"
1923

2024
[build-system]
21-
requires = ["hatchling"]
22-
build-backend = "hatchling.build"
25+
requires = ["uv_build>=0.9.0,<0.10.0"]
26+
build-backend = "uv_build"
2327

2428
[tool.isort]
2529
profile = "black"
@@ -87,17 +91,16 @@ reportImplicitStringConcatenation = true
8791
reportMissingSuperCall = false
8892

8993
reportPropertyTypeMismatch = true
90-
reportShadowedImports = true
9194
# Works also, but doesn't play along with Tap
9295
reportUninitializedInstanceVariable = false
9396
# This works, but there's no way to ignore something in mypy, but not in pyright
9497
reportUnnecessaryTypeIgnoreComment = false
9598
# Sensible, but false positive waaaaaay to often
9699
reportUnusedCallResult = false
97-
pythonVersion = "3.12"
100+
pythonVersion = "3.13"
98101

99102
[dependency-groups]
100103
dev = [
101-
"ruff>=0.8.6",
104+
"ruff>=0.14.8",
102105
]
103106

src/mr_t/h5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ async def receive_h5_messages(
2525
if cache_full():
2626
await asyncio.sleep(0.5)
2727
continue
28-
yield ZmqImage(dataset[frame_number][:].tobytes())
28+
yield ZmqImage(dataset[frame_number][:].tobytes()) # type: ignore
2929
yield ZmqSeriesEnd()

src/mr_t/rx.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/mr_t/server.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Any,
88
AsyncIterable,
99
AsyncIterator,
10-
Callable,
1110
Optional,
1211
TypeAlias,
1312
TypeVar,
@@ -218,11 +217,14 @@ async def main_async() -> None:
218217
sys.exit(2)
219218

220219
current_series: CurrentSeries | None = None
221-
cache_full: Callable[[], bool] = (
222-
lambda: len(current_series.saved_frames) > args.frame_cache_limit
223-
if current_series is not None and args.frame_cache_limit is not None
224-
else False
225-
)
220+
221+
def cache_full() -> bool:
222+
return (
223+
len(current_series.saved_frames) > args.frame_cache_limit
224+
if current_series is not None and args.frame_cache_limit is not None
225+
else False
226+
)
227+
226228
sender = (
227229
receive_zmq_messages(
228230
zmq_target=args.eiger_zmq_host_and_port,

0 commit comments

Comments
 (0)