Skip to content

Commit 1a770b3

Browse files
committed
historian: migrate to uv shebang, remove poetry support
1 parent 02b548e commit 1a770b3

File tree

5 files changed

+22
-1982
lines changed

5 files changed

+22
-1982
lines changed

historian/README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ verbatim in order to maintain their integrity and ensure signatures
1414
remain valid.
1515

1616
** Install the plugin
17-
There are two ways to install the plugin:
17+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/) to run this
18+
plugin like a binary. After `uv` is installed you can simply run
1819

19-
- Specify the path to ~historian.py~ with the ~--plugin~ or
20-
~--important-plugin~ options.
21-
- Add a symbolic link to ~historian.py~ in one of the directories
22-
specified as ~--plugin-dir~ or in
23-
~$HOME/.lightning/bitcoin/plugins~.
20+
```
21+
lightning-cli plugin start /path/to/currencyrate.py
22+
```
2423

25-
Notice that copying the entire directory into the plugin-dir will
26-
cause errors at startup. This is caused by ~lightningd~ attempting to
27-
start all executables in the plugin-dir, even the ~historian-cli~
28-
which is not a plugin. The errors are not dangerous, just annoying and
29-
may delay startup slightly.
24+
For general plugin installation instructions see the repos main
25+
[README.md](https://github.com/lightningd/plugins/blob/master/README.md#Installation)
3026

3127
If the plugin starts correctly you should be able to call
3228
~lightning-cli historian-stats~ and see that it is starting to store

historian/historian.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
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+
# "inotify>=0.2.12",
7+
# "pika>=1.3.2",
8+
# "pyln-client>=24.2",
9+
# "python-dotenv>=1.1.0",
10+
# "sqlalchemy>=2.0.40",
11+
# ]
12+
# ///
13+
214
from inotify import constants
315
from inotify.adapters import Inotify
416
import os

0 commit comments

Comments
 (0)