Commit Graph

42 Commits

Author SHA1 Message Date
dni ⚡
e13a37c193
FEAT: add PYPI python package release workflow on tag (#1628)
* add pypi worflow, pyproject types, package metadata, ignore python package build, docker build fails if poetry uses readme for python package

* add pypi to release
2024-04-17 10:53:57 +02:00
Vlad Stan
bfda0b62da
test: add unit tests for wallets (funding sources) (#2363)
* test: initial commit

* feat: allow external label for `create_invoice` (useful for testing)

* chore: code format

* fix: ignore temp coverage files

* feat: add properties to the Status classes for a better readability

* fix: add extra validation for data

* fix: comment out bad `status.pending` (to be fixed in core)

* fix: 404 tests

* test: first draft of generic rest wallet tests

* test: migrate two more tests

* feat: add response type

* feat: test exceptions

* test: extract first `create_invoice` test

* chore: reminder

* add: error test

* chore: code format

* chore: experiment

* feat: adapt parsing

* refactor: data structure

* fix: some tests

* refactor: extract methods

* fix: make response uniform

* fix: test data

* chore: clean-up

* fix: uniform responses

* fix: user agent

* fix: user agent

* fix: user-agent again

* test: add `with error` test

* feat: customize test name

* fix: better exception handling for `status`

* fix: add `try-catch` for `raise_for_status`

* test: with no mocks

* chore: clean-up generalized tests

* chore: code format

* chore: code format

* chore: remove extracted tests

* test: add `create_invoice`: error test

* add: test for `create_invoice` with http 404

* test: extract `test_pay_invoice_ok`

* test: extract `test_pay_invoice_error_response`

* test: extract `test_pay_invoice_http_404`

* test: add "missing data"

* test: add `bad-json`

* test: add `no mocks` for `create_invoice`

* test: add `no mocks` for `pay_invoice`

* test: add `bad json` tests

* chore: re-order tests

* fix: response type

* test: add `missing data` test for `pay_imvoice`

* chore: re-order tests

* test: add `success` test for `get_invoice_status `

* feat: update test structure

* test: new status

* test: add more test

* fix: error handling

* chore: code clean-up

* test: add success test for `get_payment_status `

* test: add `pending` tests for `check_payment_status`

* chore: remove extracted tests

* test: add more tests

* test: add `no mocks` test

* fix: funding source loading

* refactor: extract `rest_wallet_fixtures_from_json` function

* chore: update comment

* feat: cover `cleanup` call also

* chore: code format

* refactor: start to extract data model

* refactor: extract mock class

* fix: typings

* refactor: improve typings

* chore: add some documentation

* chore: final clean-up

* chore: rename file

* chore: `poetry add --dev pytest_httpserver` (after rebase)
2024-04-08 12:18:21 +03:00
dni ⚡
d0107f7830
ci: workflow to check bundle files (#2126)
fail if `bundle.min.css` or `bundle.min.js` differes from a `make bundle` output

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2023-11-28 10:39:21 +01:00
dni ⚡
6773a0f533
[REFACTOR] .super_user move it into data dir (#1900)
related to https://github.com/lnbits/lnbits/pull/1855
put the `.super_user` into our data_dir to not pollute our root dir
removed the weird mention to the url in the logs and mention
the `lnbits-cli superuser` instead

this is a breaking change for the bundlers, `cat .super_user` is not good anymore.
fix would be `cat data/.super_user` but for future compatibility i recommend
using `poetry run lnbits-cli superuser`
2023-09-11 12:19:19 +01:00
dni ⚡
153e22fb54
remove extensions dir completly, create it on startup (#1778)
* remove extensions dir compleltly, and create it on server.py start

* also ignore symlinks
2023-07-18 13:46:50 +02:00
callebtc
be7c589722
add pre-commit-config (#1785) 2023-06-26 10:38:16 +02:00
dni ⚡
667de4d1f0
generate .super_user file on startup if adminui is enabled (#1651)
* generate .super_user file on startup if adminui is enabled
* only save super_user id instead of url
2023-04-25 10:25:50 +02:00
dni ⚡
1b84ebf13d
FEAT: build static files with npm (sass, concat, minify), remove build step from python, include minified bundle files (#1601) 2023-04-21 14:51:46 +02:00
dni ⚡
4dd206da2a
good bye venv (#1569)
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2023-03-16 16:45:23 +01:00
dni ⚡
6cf1d97d5a
FEAT: add db export admin route for pg and sqlite, add to adminui 2023-03-02 15:22:39 +01:00
calle
0b7e4269be
fix gitignore (#1527)
* fix gitignore

* fix
2023-02-20 16:26:35 +01:00
dni ⚡
ca75b328a1
remove invoices (#1515)
* remove invoices

* remove invoices tests

* remove unused tests/extensions dir

* fix issue

* formatting

* test passing locally. and i dont know why

* fix _extension_dir loading

* gitkeep extension dir

* formatting

* remove bundle from check

* do not prettier compliled css

* do not prettier compliled css

* create extension dir, if it does not exists, just to be sure

* Update lnbits/extension_manager.py

---------

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2023-02-20 15:34:18 +01:00
calle
7968c495ea
☮️ peace (#1449)
* ☮️ peace

* cashu: fix default tab
2023-02-04 03:50:05 +01:00
calle
d01c5dfdec
Cashu waket: multimint support (#1448)
* multimint working

* working

* fix typo

* migrations

* migration

* migration

* migration

* fix local storage

* notifications

* strings

* add mint dialog

* make format

* update favicons

* icons
2023-02-04 03:45:08 +01:00
ben
0da9cb0d64 STOP DELETING! 2023-02-02 10:56:05 +00:00
Bitkarrot
e7802c27ab
update .gitignore to ignore .toml (#1404)
* update .gitignore to ignore .toml

Prevent accidental .toml checkins for fly.io deploys!

* Update .gitignore

ignore fly.toml

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* Update .gitignore

---------

Co-authored-by: dni  <office@dnilabs.com>
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2023-02-01 16:51:18 +01:00
ben
5c5f414c25 Added gitignore extensions....again 2023-01-31 22:14:39 +00:00
calle
80a94aa9ce
Fix/cashu update protocol (#1433)
* updates NOTE: fix pyproject and requirements

* revert GET to POST

* update cashu on pip and change name of models

* adjust client to spendable

* refactor spendable
2023-01-30 09:29:44 +01:00
Arc
f1ef9a58fe Revert "fix gitignore (#1429)"
This reverts commit ff3f86afa6.
2023-01-29 22:59:38 +00:00
calle
ff3f86afa6
fix gitignore (#1429) 2023-01-29 11:25:43 +01:00
ben
850169b3bd Ignore extensions and upgrades 2023-01-26 10:32:00 +00:00
Vlad Stan
331e93195d chore: ignore the data dir 2023-01-18 17:38:24 +02:00
ben
3ffcab2d4d Merge branch 'main' into matthewcroughan/nixify 2022-07-25 15:01:33 +01:00
dni ⚡
462fffbeaa
.gitignore coverage.xml + do not delete mock_data.zip (#779)
* add coverage.xml to gitignore

* fix deleting mock_data.zip

Co-authored-by: dni <dni.khr@gmail.com>
2022-07-25 15:08:30 +02:00
ben
5f3183c54c Merge branch 'main' into matthewcroughan/nixify 2022-07-25 10:34:29 +01:00
calle
4bb184e08b
CI: DB migration with real data (#776)
* fix migration conv.py

* migrate with mock data
2022-07-25 09:13:41 +02:00
matthewcroughan
c4924bcf24 gitignore: add Nix ignores 2022-07-08 09:20:38 +01:00
Daniel Krahofer
0ae1cf6e52
Ignore docker directory
Ignore docker directory if you clone and use the https://github.com/lnbits/legend-regtest-enviroment
2022-06-30 12:03:46 +02:00
Charles Hill
4e6c30a909
Unit tests for FastAPI branch
Run via `make test`
2021-12-04 13:11:45 -06:00
Tiago vasconcelos
d8be362ac4 exclude package-lock.json form github 2021-06-18 10:06:16 +01:00
fiatjaf
6928f431a7 poor man's flask-assets. 2020-09-15 15:54:05 -03:00
Eneko Illarramendi
a651f747ac chore: remove gunicorn and gevent from minimum requirements
It is now up to the user to install these (or other) for production deployment.
More info: https://flask.palletsprojects.com/en/1.1.x/tutorial/deploy/#run-with-a-production-server
2020-09-03 19:38:01 +02:00
fiatjaf
4730500ed7 apply prettier to everything. 2020-05-03 13:55:17 -03:00
Eneko Illarramendi
d917feeb02 feat: prepare for deploying to Dokku 2020-04-21 23:13:37 +02:00
Eneko Illarramendi
f98a5040ac refactor: decorators, models and more broken bits 2020-03-04 23:11:15 +01:00
Eneko Illarramendi
0d33bc2933 refactor: remove databases from code an use schemas instead
All databases are now saved together in the same LNBITS_DATA_FOLDER.
Extensions have to define a schema.yml file for creating the necessary database.
2020-02-10 19:40:01 +01:00
fiatjaf
463ee21c9f take JS out of HTML, fix transactions chart, add apipayments.time. 2019-12-14 17:26:26 -03:00
Eneko Illarramendi
5849ffc678 refactor: abstract wallets 2019-12-14 10:13:27 +01:00
fiatjaf
23ffa40f30 balances view and other minor edits. 2019-12-14 00:11:41 -03:00
fiatjaf
7097d01f9e move schema to sqlfile, create on init. 2019-12-13 20:34:19 -03:00
fiatjaf
978854fc72 move variables to environment. 2019-12-13 19:41:39 -03:00
Eneko Illarramendi
3d3632a06f refactor: add some dev files and black original code
Original server code has been moved to __init__ file, so we can
work on `lnbits` as a package.
2019-12-13 17:56:19 +01:00