diff --git a/.gitignore b/.gitignore
index 1b9de4d9..9e3c42ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-ihatemoney.cfg
*.pyc
*.egg-info
dist
@@ -10,5 +9,11 @@ dist
build
.vscode
.env
-.pytest_cache
-
+.pytest_cache
+ihatemoney/budget.db
+.idea/
+.envrc
+.DS_Store
+.idea
+.python-version
+
diff --git a/.isort.cfg b/.isort.cfg
new file mode 100644
index 00000000..ba73fb7a
--- /dev/null
+++ b/.isort.cfg
@@ -0,0 +1,13 @@
+[settings]
+# Needed for black compatibility
+multi_line_output=3
+include_trailing_comma=True
+force_grid_wrap=0
+line_length=88
+combine_as_imports=True
+
+# If set, imports will be sorted within their section independent to the import_type.
+force_sort_within_sections=True
+
+# skip
+skip_glob=.local,**/migrations/**,**/node_modules/**,**/node-forge/**
diff --git a/.travis.yml b/.travis.yml
index c18d65f8..ca72fb95 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,9 @@
sudo: false
language: python
python:
- - "3.5"
- "3.6"
- "3.7"
+ - "3.8"
script: tox
install:
- pip install tox-travis
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 76831ccb..e4ecb923 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -9,7 +9,7 @@ This document describes changes between each past release.
- Add support for espanol latino america (es_419)
- Use the external debts lib to solve settlements (#476)
- Remove balance column in statistics view (#323)
-
+- Remove requirements files in favor of setup.cfg pinning (#558)
4.1.3 (2019-09-18)
==================
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index e87a335f..bd4d363e 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -7,20 +7,27 @@ Adrien CLERC
Alexandre Avenel
Alexis Métaireau
Allan Nordhøy
+am97
+Andrew Dickinson
Arnaud Bos
Baptiste Jonglez
Benjamin Bouvier
Berteh
+bmatticus
Brice Maron
Byron Ullauri
Carey Metcalfe
Daniel Schreiber
+DavidRThrashJr
donkers
+Edwin Smulders
Elizabeth Sherrock
+eMerzh
Feth AREZKI
Frédéric Sureau
Glandos
Heimen Stoffels
+James Leong
Jocelyn Delalande
Lucas Verney
Luc Didry
@@ -37,5 +44,6 @@ Richard Coates
THANOS SIOURDAKIS
Toover
Xavier Mehrenberger
+zorun
The manual drawings are from Coline Billon, they are under CC BY 4.0.
diff --git a/MANIFEST.in b/MANIFEST.in
index 74ea23b1..d47086be 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,3 @@
include *.rst
recursive-include ihatemoney *.rst *.py *.yaml *.po *.mo *.html *.css *.js *.eot *.svg *.woff *.txt *.png *.ini *.cfg *.j2
-include LICENSE CONTRIBUTORS CHANGELOG.rst requirements.txt
+include LICENSE CONTRIBUTORS CHANGELOG.rst
diff --git a/Makefile b/Makefile
index 42b0e263..a6817094 100644
--- a/Makefile
+++ b/Makefile
@@ -11,10 +11,10 @@ ZOPFLIPNG := zopflipng
.PHONY: all
all: install ## Alias for install
.PHONY: install
-install: virtualenv $(INSTALL_STAMP) ## Install dependencies
+install: virtualenv setup.cfg $(INSTALL_STAMP) ## Install dependencies
$(INSTALL_STAMP):
$(VENV)/bin/pip install -U pip
- $(VENV)/bin/pip install -r requirements.txt
+ $(VENV)/bin/pip install -e .
touch $(INSTALL_STAMP)
.PHONY: virtualenv
@@ -23,9 +23,9 @@ $(PYTHON):
$(VIRTUALENV) $(VENV)
.PHONY: install-dev
-install-dev: $(INSTALL_STAMP) $(DEV_STAMP) ## Install development dependencies
-$(DEV_STAMP): $(PYTHON) dev-requirements.txt
- $(VENV)/bin/pip install -Ur dev-requirements.txt
+install-dev: virtualenv setup.cfg $(INSTALL_STAMP) $(DEV_STAMP) ## Install development dependencies
+$(DEV_STAMP): $(PYTHON)
+ $(VENV)/bin/pip install -Ue .[dev]
touch $(DEV_STAMP)
.PHONY: remove-install-stamp
@@ -41,11 +41,19 @@ serve: install ## Run the ihatemoney server
$(PYTHON) -m ihatemoney.manage runserver
.PHONY: test
-test: $(DEV_STAMP) ## Run the tests
+test: install-dev ## Run the tests
$(VENV)/bin/tox
+.PHONY: black
+black: install-dev ## Run the tests
+ $(VENV)/bin/black --target-version=py34 .
+
+.PHONY: isort
+isort: install-dev ## Run the tests
+ $(VENV)/bin/isort -rc .
+
.PHONY: release
-release: $(DEV_STAMP) ## Release a new version (see https://ihatemoney.readthedocs.io/en/latest/contributing.html#how-to-release)
+release: install-dev ## Release a new version (see https://ihatemoney.readthedocs.io/en/latest/contributing.html#how-to-release)
$(VENV)/bin/fullrelease
.PHONY: compress-assets
@@ -76,13 +84,6 @@ create-empty-database-revision: ## Create an empty database revision
@read -p "Please enter a message describing this revision: " rev_message; \
$(PYTHON) -m ihatemoney.manage db revision -d ihatemoney/migrations -m "$${rev_message}"
-.PHONY: build-requirements
-build-requirements: ## Save currently installed packages to requirements.txt
- $(VIRTUALENV) $(TEMPDIR)
- $(TEMPDIR)/bin/pip install -U pip
- $(TEMPDIR)/bin/pip install -Ue "."
- $(TEMPDIR)/bin/pip freeze | grep -v -- '-e' > requirements.txt
-
.PHONY: clean
clean: ## Destroy the virtual environment
rm -rf .venv
diff --git a/README.rst b/README.rst
index c2166955..84d73b4a 100644
--- a/README.rst
+++ b/README.rst
@@ -5,6 +5,10 @@ I hate money
:target: https://travis-ci.org/spiral-project/ihatemoney
:alt: Travis CI Build Status
+.. image:: https://hosted.weblate.org/widgets/i-hate-money/-/i-hate-money/svg-badge.svg
+ :target: https://hosted.weblate.org/engage/i-hate-money/?utm_source=widget
+ :alt: Translation status from Weblate
+
*I hate money* is a web application made to ease shared budget management.
It keeps track of who bought what, when, and for whom; and helps to settle the
bills.
@@ -21,7 +25,7 @@ encouraged to do so.
Requirements
============
-* **Python**: 3.5, 3.6, 3.7.
+* **Python**: 3.6, 3.7, 3.8.
* **Backends**: MySQL, PostgreSQL, SQLite, Memory.
Contributing
@@ -31,3 +35,9 @@ Do you wish to contribute to IHateMoney? Fantastic! There's a lot of very
useful help on the official `contributing
-
- ++
{{ _('Download the list of transactions needed to settle the current bills.') }}
{{ _("Who?") }} | +{{ _("Balance") }} | +
---|---|
{{ member.name }} | ++ {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} + | +
{% set url = url_for(".edit_project") %} + {% trans %} + This project has history disabled. New actions won't appear below. You can enable history on the + settings page + {% endtrans %} +
+ {% if history %} ++ {% trans %} + The table below reflects actions recorded prior to disabling project history. You can + clear project history to remove them.
+ {% endtrans %} + {% endif %} + {% endif %} + {% if current_log_pref != LoggingMode.RECORD_IP and any_ip_addresses %} ++ {{ _("Some entries below contain IP addresses, even though this project has IP recording disabled. ") }} + {{ _("Delete stored IP addresses") }} +
+ {% endif %} +{{ _("Time") }} | +{{ _("Event") }} | ++ + {{ _("From IP") }} | +
---|---|---|
+ |
+
+
+
+
+ {% if event.operation_type == OperationType.INSERT %}
+ {{ event.object_type }} {{ event.object_desc }} {{ _("added") }}
+ {% elif event.operation_type == OperationType.UPDATE %}
+ {% if event.object_type == _("Project") %}
+ {% if event.prop_changed == "password" %}
+ {{ _("Project private code changed") }}
+ {% elif event.prop_changed == "logging_preference" %}
+ {{ change_to_logging_preference(event) }}
+ {% elif event.prop_changed == "name" %}
+ {{ _("Project renamed to") }} {{ event.val_after }}
+ {% elif event.prop_changed == "contact_email" %}
+ {{ _("Project contact email changed to") }} {{ event.val_after }}
+ {% else %}
+ {{ _("Project settings modified") }}
+ {% endif %}
+ {% elif event.prop_changed == "activated" %}
+ {{ event.object_type }} {{ event.object_desc }}
+ {% if event.val_after == False %}{{ _("deactivated") }}{% else %}{{ _("reactivated") }}{% endif %}
+ {% elif event.prop_changed == "name" or event.prop_changed == "what" %}
+ {{ describe_object(event) }} {{ _("renamed to") }} {{ event.val_after }}
+ {% elif event.prop_changed == "weight" %}
+ {{ simple_property_change(event, _("Weight")) }}
+ {% elif event.prop_changed == "external_link" %}
+ {{ describe_object(event) }}: {{ _("External link changed to") }}
+ {{ event.val_after }}
+ {% elif event.prop_changed == "owers_added" %}
+ {{ owers_changed(event, True)}}
+ {% elif event.prop_changed == "owers_removed" %}
+ {{ owers_changed(event, False)}}
+ {% elif event.prop_changed == "payer" %}
+ {{ simple_property_change(event, _("Payer"))}}
+ {% elif event.prop_changed == "amount" %}
+ {{ simple_property_change(event, _("Amount")) }}
+ {% elif event.prop_changed == "date" %}
+ {{ simple_property_change(event, _("Date")) }}
+ {% elif event.prop_changed == "original_currency" %}
+ {{ simple_property_change(event, _("Currency")) }}
+ {% elif event.prop_changed == "converted_amount" %}
+ {{ simple_property_change(event, _("Amount in %(currency)s", currency=g.project.default_currency)) }}
+ {% else %}
+ {{ describe_object(event) }} {{ _("modified") }}
+ {% endif %}
+ {% elif event.operation_type == OperationType.DELETE %}
+ {{ event.object_type }} {{ event.object_desc }} {{ _("removed") }}
+ {% else %}
+ {# Should be unreachable #}
+ {{ describe_object(event) }} {{ _("changed in a unknown way") }}
+ {% endif %}
+
+ |
+ {% if event.ip %}{{ event.ip }}{% else %} -- {% endif %} | +
+ {{ _("Someone probably cleared the project history.") }} +
+{{ _("When?") }} | {{ _("Who paid?") }} | {{ _("For what?") }} | {{ _("For whom?") }} | {{ _("How much?") }} | {{ _("Actions") }} | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ _("When?") }} + | {{ _("Who paid?") }} + | {{ _("For what?") }} + | {{ _("For whom?") }} + | {{ _("How much?") }} + {% if g.project.default_currency != "No Currency" %} + | {{ _("Amount in %(currency)s", currency=g.project.default_currency) }} + {%- else -%} + | {{ _("Amount") }} + {% endif %} + | {{ _("Actions") }} | |||||||||||||||||||||||||||||
{{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each()) }} {{ _("each") }}) | ++ {% if bill.original_currency != "No Currency" %} + {{ "%0.2f"|format(bill.amount) }} {{bill.original_currency}} ({{ "%0.2f"|format(bill.pay_each_default(bill.amount)) }} {{bill.original_currency}} {{ _(" each") }}) + {%- else -%} + {{ "%0.2f"|format(bill.amount) }} ({{ "%0.2f"|format(bill.pay_each_default(bill.amount)) }} {{ _(" each") }}) + {% endif %} + | +{{ "%0.2f"|format(bill.converted_amount) }} | {{ _('edit') }} {{ _('delete') }} diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index 73211883..b38abb12 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -9,7 +9,7 @@ | {{ _("Balance") }} | ||||||||||||||||||||||||||||||||
{{ stat.member.name }} |
@@ -27,7 +27,7 @@
|