Skip to content

Commit 92a57a3

Browse files
committed
monitor: migrate to uv shebang
1 parent 02b548e commit 92a57a3

File tree

5 files changed

+1537
-2
lines changed

5 files changed

+1537
-2
lines changed

monitor/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Monitors the health of your peers and helps you to decide if you might want to c
44

55
## Installation
66

7+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/) to run this
8+
plugin like a binary. After `uv` is installed you can simply run
9+
10+
```
11+
lightning-cli plugin start /path/to/monitor.py
12+
```
13+
714
For general plugin installation instructions see the repos main
815
[README.md](https://github.com/lightningd/plugins/blob/master/README.md#Installation)
916

monitor/monitor.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env -S uv run --script
2+
3+
# /// script
4+
# requires-python = ">=3.9.2"
5+
# dependencies = [
6+
# "pyln-client>=24.11",
7+
# "packaging>=24.1"
8+
# ]
9+
# ///
10+
211
"""
312
This is a quick hack and adapted plugin from the summary.py plugin (orinigally written by Rusty Russell
413
This one is adapted by Rene Pickhardt and aims to help you identify inactive channels quickly

monitor/pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[project]
2+
name = "monitor"
3+
version = "0.1.0"
4+
description = "Monitors the health of your peers and helps you to decide if you might want to close a channel"
5+
readme = "README.md"
6+
requires-python = ">=3.9.2"
7+
8+
[dependency-groups]
9+
dev = [
10+
"pytest>=7.4,<9",
11+
"pytest-xdist>=3.7,<4",
12+
"pytest-timeout>=2.4,<3",
13+
"pyln-testing>=24.11.1",
14+
"pyln-client>=24.11.1",
15+
"pyln-proto>=24.11.1",
16+
]

monitor/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)