2020-05-04 17:20:36 +02:00
|
|
|
---
|
|
|
|
layout: default
|
|
|
|
title: For developers
|
2020-09-03 19:53:22 +02:00
|
|
|
nav_order: 4
|
2020-05-04 17:20:36 +02:00
|
|
|
has_children: true
|
|
|
|
---
|
|
|
|
|
2024-04-25 11:13:08 +02:00
|
|
|
# For developers
|
2020-05-04 17:20:36 +02:00
|
|
|
|
|
|
|
Thanks for contributing :)
|
2021-11-17 10:53:32 -06:00
|
|
|
|
2024-04-25 11:13:08 +02:00
|
|
|
# Run
|
2023-08-03 09:53:36 +02:00
|
|
|
|
|
|
|
This starts the lnbits uvicorn server
|
2024-04-25 11:13:08 +02:00
|
|
|
|
2023-08-03 09:53:36 +02:00
|
|
|
```bash
|
|
|
|
poetry run lnbits
|
|
|
|
```
|
|
|
|
|
|
|
|
This starts the lnbits uvicorn with hot reloading.
|
2024-04-25 11:13:08 +02:00
|
|
|
|
2023-08-03 09:53:36 +02:00
|
|
|
```bash
|
|
|
|
make dev
|
|
|
|
# or
|
|
|
|
poetry run lnbits --reload
|
|
|
|
```
|
|
|
|
|
2024-04-25 11:13:08 +02:00
|
|
|
# Precommit hooks
|
2023-06-20 08:41:23 +02:00
|
|
|
|
|
|
|
This ensures that all commits adhere to the formatting and linting rules.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
make install-pre-commit-hook
|
|
|
|
```
|
|
|
|
|
2024-04-25 11:13:08 +02:00
|
|
|
# Tests
|
2021-11-17 10:53:32 -06:00
|
|
|
|
|
|
|
This project has unit tests that help prevent regressions. Before you can run the tests, you must install a few dependencies:
|
2024-04-25 11:13:08 +02:00
|
|
|
|
2021-11-17 10:53:32 -06:00
|
|
|
```bash
|
2022-08-03 14:10:32 +02:00
|
|
|
poetry install
|
|
|
|
npm i
|
2021-11-17 10:53:32 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
Then to run the tests:
|
2024-04-25 11:13:08 +02:00
|
|
|
|
2021-11-17 10:53:32 -06:00
|
|
|
```bash
|
|
|
|
make test
|
|
|
|
```
|
2022-08-03 14:10:32 +02:00
|
|
|
|
|
|
|
Run formatting:
|
2024-04-25 11:13:08 +02:00
|
|
|
|
2022-08-03 14:10:32 +02:00
|
|
|
```bash
|
|
|
|
make format
|
|
|
|
```
|
|
|
|
|
|
|
|
Run mypy checks:
|
2024-04-25 11:13:08 +02:00
|
|
|
|
2022-08-03 14:10:32 +02:00
|
|
|
```bash
|
|
|
|
poetry run mypy
|
|
|
|
```
|
|
|
|
|
|
|
|
Run everything:
|
2024-04-25 11:13:08 +02:00
|
|
|
|
2022-08-03 14:10:32 +02:00
|
|
|
```bash
|
|
|
|
make all
|
|
|
|
```
|