tariochbctools 1.5.1__tar.gz → 1.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/PKG-INFO +1 -1
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/postfinance/importer.py +3 -2
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/PKG-INFO +1 -1
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/SOURCES.txt +1 -0
- tariochbctools-1.5.2/tests/tariochbctools/importers/test_postfinance.py +46 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/.coveragerc +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/.isort.cfg +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/.pre-commit-config.yaml +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/.readthedocs.yml +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/LICENSE.txt +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/MANIFEST.in +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/README.rst +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/_static/.gitignore +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/conf.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/importers.rst +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/index.rst +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/installation.rst +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/license.rst +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/plugins.rst +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/price_fetchers.rst +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/docs/requirements.txt +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/pyproject.toml +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/setup.cfg +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/setup.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/awardwalletimp/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/awardwalletimp/config.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/awardwalletimp/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/bcge/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/bcge/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/bitst/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/bitst/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/blockchain/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/blockchain/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/cembrastatement/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/cembrastatement/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/deduplication.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/mailAdapterImporter.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/mt940importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/priceLookup.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/ibkr/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/ibkr/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/neon/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/neon/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/netbenefits/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/netbenefits/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/nordigen/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/nordigen/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/nordigen/nordigen_config.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/postfinance/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/quickfile/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/quickfile/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/radicant/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/radicant/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/raiffeisench/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/revolut/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/revolut/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/schedule/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/schedule/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/swisscard/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/swisscard/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/transferwise/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/transferwise/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/truelayer/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/truelayer/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/viseca/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/viseca/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/zak/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/zak/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/zkb/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/zkb/importer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/plugins/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/plugins/check_portfolio_sum.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/plugins/generate_base_ccy_prices.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/plugins/prices/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/plugins/prices/ibkr.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/dependency_links.txt +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/entry_points.txt +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/not-zip-safe +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/requires.txt +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/top_level.txt +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/conftest.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/importers/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/importers/test_awardwallet.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/importers/test_quickfile.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/importers/test_truelayer.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/__init__.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_expected.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_input.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_expected.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_input.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_expected.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_input.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_expected.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_input.beancount +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/plugins/test_generate_base_ccy_prices.py +0 -0
- {tariochbctools-1.5.1 → tariochbctools-1.5.2}/tox.ini +0 -0
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/postfinance/importer.py
RENAMED
@@ -1,10 +1,11 @@
|
|
1
1
|
import csv
|
2
2
|
import logging
|
3
3
|
import re
|
4
|
-
from datetime import
|
4
|
+
from datetime import timedelta
|
5
5
|
from decimal import Decimal
|
6
6
|
|
7
7
|
import beangulp
|
8
|
+
import dateutil.parser
|
8
9
|
from beancount.core import data
|
9
10
|
|
10
11
|
|
@@ -31,7 +32,7 @@ class Importer(beangulp.Importer):
|
|
31
32
|
for row in reader:
|
32
33
|
try:
|
33
34
|
book_date_str, text, credit, debit, val_date, balance_str = tuple(row)
|
34
|
-
book_date =
|
35
|
+
book_date = dateutil.parser.parse(book_date_str).date()
|
35
36
|
if credit:
|
36
37
|
amount = data.Amount(Decimal(credit), self.currency)
|
37
38
|
elif debit:
|
@@ -85,6 +85,7 @@ tests/conftest.py
|
|
85
85
|
tests/tariochbctools/__init__.py
|
86
86
|
tests/tariochbctools/importers/__init__.py
|
87
87
|
tests/tariochbctools/importers/test_awardwallet.py
|
88
|
+
tests/tariochbctools/importers/test_postfinance.py
|
88
89
|
tests/tariochbctools/importers/test_quickfile.py
|
89
90
|
tests/tariochbctools/importers/test_truelayer.py
|
90
91
|
tests/tariochbctools/plugins/__init__.py
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import pytest
|
2
|
+
from beancount.core.amount import Amount
|
3
|
+
from beancount.core.number import D
|
4
|
+
|
5
|
+
from tariochbctools.importers.postfinance import importer as pfimp
|
6
|
+
|
7
|
+
TEST_CSV = """
|
8
|
+
Booking date;Notification text;Credit in CHF;Debit in CHF;Value;Balance in CHF
|
9
|
+
31.12.2022;"Preis für Bankpaket Smart";;-5;31.12.2022;7881.98
|
10
|
+
"""
|
11
|
+
|
12
|
+
TEST_CSV_2021 = """
|
13
|
+
Booking date;Notification text;Credit in CHF;Debit in CHF;Value;Balance in CHF
|
14
|
+
2022-12-31;"Preis für Bankpaket Smart";;-5;2022-12-31;7881.98
|
15
|
+
"""
|
16
|
+
|
17
|
+
|
18
|
+
@pytest.fixture(name="importer")
|
19
|
+
def importer_fixture():
|
20
|
+
importer = pfimp.Importer(".*.csv", "Assets:PostFinance:CHF")
|
21
|
+
yield importer
|
22
|
+
|
23
|
+
|
24
|
+
@pytest.fixture
|
25
|
+
def tmp_csv(tmp_path, request):
|
26
|
+
csv = tmp_path / "test.csv"
|
27
|
+
csv.write_text(request.param)
|
28
|
+
yield csv
|
29
|
+
|
30
|
+
|
31
|
+
@pytest.mark.parametrize("tmp_csv", [TEST_CSV], indirect=True)
|
32
|
+
def test_identify(importer, tmp_csv):
|
33
|
+
assert importer.identify(str(tmp_csv))
|
34
|
+
|
35
|
+
|
36
|
+
@pytest.mark.parametrize(
|
37
|
+
"tmp_csv",
|
38
|
+
(TEST_CSV, TEST_CSV_2021),
|
39
|
+
ids=("dd.mm.yyyy", "yyyy-mm-dd"),
|
40
|
+
indirect=True,
|
41
|
+
)
|
42
|
+
def test_extract(importer, tmp_csv):
|
43
|
+
entries = importer.extract(str(tmp_csv), [])
|
44
|
+
assert entries
|
45
|
+
assert entries[0].postings[-1].units == Amount(D(-5), "CHF")
|
46
|
+
assert entries[0].date.year == 2022
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/awardwalletimp/config.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/bitst/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/bitst/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/blockchain/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/blockchain/importer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/deduplication.py
RENAMED
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/mt940importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/general/priceLookup.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/netbenefits/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/netbenefits/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/nordigen/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/nordigen/importer.py
RENAMED
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/postfinance/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/quickfile/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/quickfile/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/radicant/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/radicant/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/raiffeisench/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/revolut/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/revolut/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/schedule/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/schedule/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/swisscard/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/swisscard/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/transferwise/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/transferwise/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/truelayer/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/truelayer/importer.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/viseca/__init__.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/importers/viseca/importer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/plugins/check_portfolio_sum.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools/plugins/generate_base_ccy_prices.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/src/tariochbctools.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/importers/test_awardwallet.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/importers/test_quickfile.py
RENAMED
File without changes
|
{tariochbctools-1.5.1 → tariochbctools-1.5.2}/tests/tariochbctools/importers/test_truelayer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|