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
21 changes: 10 additions & 11 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ jobs:
strategy:
matrix:
python-version: ["3.10", "3.12"]
poetry-version: ["1.8.5"]
steps:
- uses: actions/checkout@v4
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry install
python-version: ${{ inputs.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: ${{ inputs.python-version }}
- name: Install the project dependencies
shell: bash
run: uv sync --locked --all-extras --dev
- name: Check black
run: |
make checkblack
21 changes: 10 additions & 11 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ jobs:
strategy:
matrix:
python-version: ["3.10", "3.12"]
poetry-version: ["1.8.5"]
steps:
- uses: actions/checkout@v4
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
poetry install
python-version: ${{ inputs.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: ${{ inputs.python-version }}
- name: Install the project dependencies
shell: bash
run: uv sync --locked --all-extras --dev
- name: Run tests
run: make mypy
16 changes: 11 additions & 5 deletions .github/workflows/pypi.yaml → .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.15
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
pypi_token: ${{ secrets.PYPI_API_KEY }}

python-version: 3.12
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Build the project
run: uv build
- name: Publish to pypi
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_KEY }}
run: uv publish
- name: Create github release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
# Update output format to enable automatic inline annotations.
- name: Run Ruff
run: ruff check --output-format=github .
- uses: astral-sh/ruff-action@v3
21 changes: 10 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ jobs:
strategy:
matrix:
python-version: ["3.10", "3.12"]
poetry-version: ["1.8.5"]
steps:
- uses: actions/checkout@v4
- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
python-version: ${{ inputs.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry install
enable-cache: true
python-version: ${{ inputs.python-version }}
- name: Install the project dependencies
shell: bash
run: uv sync --locked --all-extras --dev
- name: Test with pytest
run: |
make test
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ lint: ruff mypy
check: checkblack checkruff

black:
poetry run black .
uv run black .

ruff:
poetry run ruff check . --fix
uv run ruff check . --fix

checkruff:
poetry run ruff check .
uv run ruff check .

checkblack:
poetry run black --check .
uv run black --check .

mypy:
poetry run mypy .
uv run mypy .

test:
poetry run pytest tests --cov=lnurl --cov-report=xml
uv run pytest tests --cov=lnurl --cov-report=xml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Will throw and ValidationError if the data is not valid, so you can catch it and
CLI
---------
```console
$ poetry run lnurl
$ uv run lnurl
Usage: lnurl [OPTIONS] COMMAND [ARGS]...

Python CLI for LNURL decode and encode lnurls
Expand Down
Loading
Loading