Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
enable-cache: false

- name: Extract exact python and os version
id: exact_versions
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
enable-cache: false

- name: Download Bitcoin & install binaries
run: |
Expand Down
12 changes: 8 additions & 4 deletions backup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ Related info about backup solutions: https://github.com/ElementsProject/lightnin

## Installation

There are some Python dependencies. You can install them using `poetry`:
You need [uv](https://docs.astral.sh/uv/getting-started/installation/) to run this
plugin like a binary. After `uv` is installed you can simply run

```bash
poetry install
```
lightning-cli plugin start /path/to/backup.py
```

For general plugin installation instructions see the repos main
[README.md](https://github.com/lightningd/plugins/blob/master/README.md#Installation)


## Setup
Expand All @@ -26,7 +30,7 @@ which makes sure no two instances are using the same backup. (Make sure to stop
your Lightning node before running this command)

```bash
poetry run ./backup-cli init --lightning-dir ~/.lightning/bitcoin file:///mnt/external/location/file.bkp
uv run ./backup-cli init --lightning-dir ~/.lightning/bitcoin file:///mnt/external/location/file.bkp
```

Notes:
Expand Down
14 changes: 13 additions & 1 deletion backup/backup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/usr/bin/env python3
#!/usr/bin/env -S uv run --script

# /// script
# requires-python = ">=3.9.2"
# dependencies = [
# "pyln-client>=25.2.2",
# "click>=8.0.4",
# "psutil>=5.9.4",
# "flask>=2.2",
# "werkzeug<4",
# ]
# ///

from pyln.client import Plugin
import json
import logging
Expand Down
1,503 changes: 0 additions & 1,503 deletions backup/poetry.lock

This file was deleted.

25 changes: 1 addition & 24 deletions backup/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
description = "Keep your Core-Lightning node save by backing it up, in real-time (allows recovering without channel closures)."
authors = [{ name = "Christian Decker", email = "<decker@blockstream.io>" }]
requires-python = ">=3.9.2"

dependencies = [
"pyln-client>=25.2.2",
"click>=8.0.4",
Expand All @@ -19,27 +20,3 @@ dev = [
"pytest-xdist>=3.1.0",
"flaky>=3.7.0",
]

[tool.uv]
package = false

[tool.poetry]
package-mode = false

[tool.poetry.dependencies]
python = "^3.9.2"
pyln-client = "^25.2.2"
click = "^8.0.4"
psutil = "^5.9.4"
flask = "^2.2"
werkzeug = "<4"

[tool.poetry.group.dev.dependencies]
pyln-testing = "^25.2.2"
flaky = "^3.7.0"
pytest-timeout = "^2.2.0"
pytest-xdist = "^3.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
15 changes: 0 additions & 15 deletions backup/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading