Commit graph

938 commits

Author SHA1 Message Date
Glandos
d1c0bbbbe9 Add test case when switching to no currency.
This ensure that bill's converted amounts are not converted in this case
Since all bills must have the same currency, the logical algorithm for
a human brain is simply to strip the currency,
and keep the original amount.
2021-07-04 22:53:38 +02:00
Glandos
5176f1950a more comments 2021-07-04 15:57:22 +02:00
Glandos
c0796c1ebf clearer code when switching to another currency
the code has the same effect for the database, but should be
clearer for reviewers ;)
2021-07-04 15:46:50 +02:00
Glandos
8ee59b3509 update test comments 2021-07-04 15:33:53 +02:00
Glandos
63f8d7a25f Adjust error message
Also… Why a useless `pass` statement was ever committed ?
2021-07-04 00:20:23 +02:00
Glandos
639ce4facd Rework currency switch test, again
Main test scenario provided by @zorun
Add a small test for edge case, detected by @almet
2021-07-01 23:01:24 +02:00
Glandos
535f9fce90 enforce multiple currency check in model
On the same way that form validator does
2021-07-01 23:00:20 +02:00
Glandos
867e84ae91 add validator for default_currency
This force the usage of project's id that must be provided to the form
2021-07-01 22:59:25 +02:00
Glandos
45a4eab600 Introduce has_multiple_currencies
Factor get_bills in get_bills_unordered and use it wherever needed.
It should be faster, but completely unoticeable :)
2021-07-01 22:57:55 +02:00
Glandos
63bb7705d0 clearer comment 2021-06-23 23:02:59 +02:00
Glandos
2f978612c7 black & isort 2021-06-23 22:35:46 +02:00
Glandos
a9bddef0d2 switch to No Currency for test projects
This reflects the real behavior of current form.
2021-06-23 22:34:05 +02:00
Glandos
d2290b19b5 restore lost import in rebasing 2021-06-22 22:19:08 +02:00
Glandos
0aa55ff3d1 Revert "Add warning in edit project form"
This reverts commit 8c9869555b03fd875a597665b7b2365b807e602e.
2021-06-22 22:06:53 +02:00
Glandos
c22c342807 Add warning in edit project form 2021-06-22 22:04:48 +02:00
Glandos
417313477e New algorithm when switching currencies
Fixes #599

Be careful, when switching to no currency, all bills are first converted
to the last known currency, and currency is erased
2021-06-22 22:02:17 +02:00
Glandos
8fd9ced9e8 Rework currency switching
Fixes #599
2021-06-22 22:00:29 +02:00
Glandos
5076a29f71 fix rebase conflicts 2021-06-22 21:54:51 +02:00
e2e9fe0f52 Update the tests to reflect last changes in the mock 2021-06-22 21:48:56 +02:00
a9128261f1 Add some more test and fix a discovered bug 2021-06-22 21:47:50 +02:00
Glandos
0fd8c26747 remove obsolete import 2021-06-22 21:47:50 +02:00
Glandos
c51ddcfe28 Revert "Add warning in edit project form"
This reverts commit 8c9869555b03fd875a597665b7b2365b807e602e.
2021-06-22 21:47:49 +02:00
Glandos
80a0535992 fix tests 2021-06-22 21:46:49 +02:00
Glandos
f1e1d82f1a Add warning in edit project form 2021-06-22 21:46:47 +02:00
Glandos
644c96f522 add test for new switch_currency 2021-06-22 21:44:29 +02:00
Glandos
af22696a01 New algorithm when switching currencies
Fixes #599

Be careful, when switching to no currency, all bills are first converted
to the last known currency, and currency is erased
2021-06-22 21:41:41 +02:00
Glandos
2e9e656acd Currency: switching back to "no currency" gives unexpected results
Fixes #599
2021-06-22 21:41:41 +02:00
Glandos
219f308e8c Rework currency switching
Fixes #599
2021-06-22 21:41:41 +02:00
Glandos
27d95f2d01 fix flake8 2021-06-10 00:09:59 +02:00
Glandos
c62965d4bf fix basic deprecation warnings 2021-06-10 00:09:59 +02:00
Glandos
44fa1af375 change method to find login_throttler
that was triggering a lot of deprecation warnings due to
iterating over all known objects.
2021-06-10 00:09:59 +02:00
Glandos
69a1ad6685 Adapt code for https://github.com/wtforms/wtforms/pull/568 2021-06-09 23:38:05 +02:00
Glandos
6c43ffaac4 Adapt code for https://github.com/wtforms/wtforms/pull/288 2021-06-09 23:38:05 +02:00
Glandos
901522e8e7 Upgrade WTForms to <2.4 2021-06-09 23:38:05 +02:00
dependabot[bot]
7f695ca25a Update jinja2 requirement from ~=2.11 to >=2.11,<4.0
Updates the requirements on [jinja2](https://github.com/pallets/jinja) to permit the latest version.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.0...3.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 23:22:12 +02:00
Glandos
859aa8fb1e
Fix test for generate_hash_password (#766)
Use the function that check password instead of just checking the output length. This length can be variable and will change with Werkzeug 2
2021-06-07 23:11:38 +02:00
dependabot[bot]
3894f1568a Update flask-migrate requirement from <3,>=2.5.3 to >=2.5.3,<4
Updates the requirements on [flask-migrate](https://github.com/miguelgrinberg/flask-migrate) to permit the latest version.
- [Release notes](https://github.com/miguelgrinberg/flask-migrate/releases)
- [Changelog](https://github.com/miguelgrinberg/Flask-Migrate/blob/main/CHANGES.md)
- [Commits](https://github.com/miguelgrinberg/flask-migrate/compare/v2.5.3...v3.0.1)

---
updated-dependencies:
- dependency-name: flask-migrate
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-06 15:26:01 +02:00
Glandos
74e222f1a1 remove usage of Flask-Script
Use flask.cli instead with compatibility layer for existing commands,
such as "runserver".
2021-06-06 15:13:21 +02:00
dependabot[bot]
eff871e83c Update itsdangerous requirement from ~=1.1 to >=1.1,<3.0
Updates the requirements on [itsdangerous](https://github.com/pallets/itsdangerous) to permit the latest version.
- [Release notes](https://github.com/pallets/itsdangerous/releases)
- [Changelog](https://github.com/pallets/itsdangerous/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/itsdangerous/compare/1.1.0...2.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-03 23:11:48 +02:00
dependabot[bot]
63fe3ed45b Update flask requirement from ~=1.1 to >=1.1,<3.0
Updates the requirements on [flask](https://github.com/pallets/flask) to permit the latest version.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/1.1.0...2.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-03 22:54:30 +02:00
dependabot[bot]
9f029d52ca Bump sphinx from 3.5.3 to 4.0.2
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 3.5.3 to 4.0.2.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/commits/v4.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-03 22:45:14 +02:00
dependabot[bot]
e8f9d1cd93 Update flask-babel requirement from ~=1.0 to >=1,<3
Updates the requirements on [flask-babel](https://github.com/python-babel/flask-babel) to permit the latest version.
- [Release notes](https://github.com/python-babel/flask-babel/releases)
- [Commits](https://github.com/python-babel/flask-babel/compare/v1.0.0...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-03 22:40:31 +02:00
Glandos
45f4d8f8b0 Using one job for all linting and doc generation
Requirements for doc are now an extra require in setup.cfg
2021-06-03 22:35:49 +02:00
Glandos
43ee61afe8 Upper bound for Flask-Migrate
Version 3.0.0 dropped support for Flask-Script which is used in our "db" command. We could migrate to Flask CLI instead.
2021-06-03 22:20:09 +02:00
Kristoffer Grundström
08b3765bdd Translated using Weblate (Swedish)
Currently translated at 85.7% (198 of 231 strings)

Co-authored-by: Kristoffer Grundström <swedishsailfishosuser@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/sv/
Translation: I Hate Money/I Hate Money
2021-06-03 21:57:06 +02:00
phlostically
065449bb5e Translated using Weblate (Esperanto)
Currently translated at 100.0% (231 of 231 strings)

Translated using Weblate (Esperanto)

Currently translated at 94.8% (219 of 231 strings)

Translated using Weblate (Esperanto)

Currently translated at 92.6% (214 of 231 strings)

Co-authored-by: phlostically <phlostically@mailinator.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/eo/
Translation: I Hate Money/I Hate Money
2021-06-03 21:57:06 +02:00
Vsevolod
467870a245 Translated using Weblate (Russian)
Currently translated at 100.0% (231 of 231 strings)

Co-authored-by: Vsevolod <sevauserg.com@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/ru/
Translation: I Hate Money/I Hate Money
2021-06-03 21:57:06 +02:00
Allan Nordhøy
6bea519c78 Translated using Weblate (Norwegian Bokmål)
Currently translated at 74.0% (171 of 231 strings)

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
Translation: I Hate Money/I Hate Money
2021-06-03 21:57:06 +02:00
Eugenia Russell
3a521c2f33 Translated using Weblate (Greek)
Currently translated at 55.8% (129 of 231 strings)

Translated using Weblate (Greek)

Currently translated at 42.8% (99 of 231 strings)

Translated using Weblate (Greek)

Currently translated at 26.4% (61 of 231 strings)

Co-authored-by: Eugenia Russell <eugenia.russell2019@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/el/
Translation: I Hate Money/I Hate Money
2021-06-03 21:57:06 +02:00
dependabot-preview[bot]
0e6d0d622f
Upgrade to GitHub-native Dependabot (#748)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-22 21:31:53 +02:00