tariochbctools 1.1.0__tar.gz → 1.2.0__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.
Files changed (98) hide show
  1. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/.pre-commit-config.yaml +6 -6
  2. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/PKG-INFO +3 -2
  3. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/importers.rst +11 -0
  4. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/setup.py +5 -5
  5. tariochbctools-1.2.0/src/tariochbctools/importers/radicant/importer.py +144 -0
  6. tariochbctools-1.2.0/src/tariochbctools/plugins/__init__.py +1 -0
  7. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/plugins/generate_base_ccy_prices.py +5 -1
  8. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools.egg-info/PKG-INFO +3 -2
  9. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools.egg-info/SOURCES.txt +4 -0
  10. tariochbctools-1.2.0/tests/conftest.py +10 -0
  11. tariochbctools-1.2.0/tests/tariochbctools/plugins/__init__.py +0 -0
  12. tariochbctools-1.2.0/tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_expected.beancount +3 -0
  13. tariochbctools-1.2.0/tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_input.beancount +4 -0
  14. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/plugins/test_generate_base_ccy_prices.py +3 -1
  15. tariochbctools-1.1.0/src/tariochbctools/plugins/__init__.py +0 -2
  16. tariochbctools-1.1.0/tests/conftest.py +0 -10
  17. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/.coveragerc +0 -0
  18. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/.isort.cfg +0 -0
  19. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/.readthedocs.yml +0 -0
  20. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/LICENSE.txt +0 -0
  21. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/MANIFEST.in +0 -0
  22. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/README.rst +0 -0
  23. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/_static/.gitignore +0 -0
  24. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/conf.py +0 -0
  25. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/index.rst +0 -0
  26. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/installation.rst +0 -0
  27. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/license.rst +0 -0
  28. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/plugins.rst +0 -0
  29. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/price_fetchers.rst +0 -0
  30. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/docs/requirements.txt +0 -0
  31. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/pyproject.toml +0 -0
  32. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/setup.cfg +0 -0
  33. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/__init__.py +0 -0
  34. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/__init__.py +0 -0
  35. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/bcge/__init__.py +0 -0
  36. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/bcge/importer.py +0 -0
  37. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/bitst/__init__.py +0 -0
  38. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/bitst/importer.py +0 -0
  39. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/blockchain/__init__.py +0 -0
  40. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/blockchain/importer.py +0 -0
  41. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/cembrastatement/__init__.py +0 -0
  42. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/cembrastatement/importer.py +0 -0
  43. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/general/__init__.py +0 -0
  44. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/general/deduplication.py +0 -0
  45. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/general/mailAdapterImporter.py +0 -0
  46. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/general/mt940importer.py +0 -0
  47. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/general/priceLookup.py +0 -0
  48. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/ibkr/__init__.py +0 -0
  49. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/ibkr/importer.py +0 -0
  50. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/neon/__init__.py +0 -0
  51. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/neon/importer.py +0 -0
  52. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/netbenefits/__init__.py +0 -0
  53. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/netbenefits/importer.py +0 -0
  54. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/nordigen/__init__.py +0 -0
  55. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/nordigen/importer.py +0 -0
  56. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/nordigen/nordigen_config.py +0 -0
  57. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/postfinance/__init__.py +0 -0
  58. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/postfinance/importer.py +0 -0
  59. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/quickfile/__init__.py +0 -0
  60. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/quickfile/importer.py +0 -0
  61. {tariochbctools-1.1.0/src/tariochbctools/importers/revolut → tariochbctools-1.2.0/src/tariochbctools/importers/radicant}/__init__.py +0 -0
  62. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/raiffeisench/importer.py +0 -0
  63. {tariochbctools-1.1.0/src/tariochbctools/importers/schedule → tariochbctools-1.2.0/src/tariochbctools/importers/revolut}/__init__.py +0 -0
  64. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/revolut/importer.py +0 -0
  65. {tariochbctools-1.1.0/src/tariochbctools/importers/swisscard → tariochbctools-1.2.0/src/tariochbctools/importers/schedule}/__init__.py +0 -0
  66. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/schedule/importer.py +0 -0
  67. {tariochbctools-1.1.0/src/tariochbctools/importers/transferwise → tariochbctools-1.2.0/src/tariochbctools/importers/swisscard}/__init__.py +0 -0
  68. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/swisscard/importer.py +0 -0
  69. {tariochbctools-1.1.0/src/tariochbctools/importers/truelayer → tariochbctools-1.2.0/src/tariochbctools/importers/transferwise}/__init__.py +0 -0
  70. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/transferwise/importer.py +0 -0
  71. {tariochbctools-1.1.0/src/tariochbctools/importers/viseca → tariochbctools-1.2.0/src/tariochbctools/importers/truelayer}/__init__.py +0 -0
  72. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/truelayer/importer.py +0 -0
  73. {tariochbctools-1.1.0/src/tariochbctools/importers/zak → tariochbctools-1.2.0/src/tariochbctools/importers/viseca}/__init__.py +0 -0
  74. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/viseca/importer.py +0 -0
  75. {tariochbctools-1.1.0/src/tariochbctools/importers/zkb → tariochbctools-1.2.0/src/tariochbctools/importers/zak}/__init__.py +0 -0
  76. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/zak/importer.py +0 -0
  77. {tariochbctools-1.1.0/src/tariochbctools/plugins/prices → tariochbctools-1.2.0/src/tariochbctools/importers/zkb}/__init__.py +0 -0
  78. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/importers/zkb/importer.py +0 -0
  79. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/plugins/check_portfolio_sum.py +0 -0
  80. {tariochbctools-1.1.0/tests → tariochbctools-1.2.0/src/tariochbctools/plugins/prices}/__init__.py +0 -0
  81. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools/plugins/prices/ibkr.py +0 -0
  82. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools.egg-info/dependency_links.txt +0 -0
  83. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools.egg-info/entry_points.txt +0 -0
  84. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools.egg-info/not-zip-safe +0 -0
  85. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools.egg-info/requires.txt +0 -0
  86. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/src/tariochbctools.egg-info/top_level.txt +0 -0
  87. {tariochbctools-1.1.0/tests/tariochbctools → tariochbctools-1.2.0/tests}/__init__.py +0 -0
  88. {tariochbctools-1.1.0/tests/tariochbctools/importers → tariochbctools-1.2.0/tests/tariochbctools}/__init__.py +0 -0
  89. {tariochbctools-1.1.0/tests/tariochbctools/plugins → tariochbctools-1.2.0/tests/tariochbctools/importers}/__init__.py +0 -0
  90. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/importers/test_quickfile.py +0 -0
  91. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/importers/test_truelayer.py +0 -0
  92. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_expected.beancount +0 -0
  93. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_input.beancount +0 -0
  94. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_expected.beancount +0 -0
  95. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_input.beancount +0 -0
  96. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_expected.beancount +0 -0
  97. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_input.beancount +0 -0
  98. {tariochbctools-1.1.0 → tariochbctools-1.2.0}/tox.ini +0 -0
@@ -2,7 +2,7 @@ exclude: '^docs/conf.py'
2
2
 
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
- rev: v4.6.0
5
+ rev: v5.0.0
6
6
  hooks:
7
7
  - id: trailing-whitespace
8
8
  - id: check-added-large-files
@@ -18,24 +18,24 @@ repos:
18
18
  args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19
19
 
20
20
  - repo: https://github.com/pycqa/isort
21
- rev: 5.13.2
21
+ rev: 6.0.1
22
22
  hooks:
23
23
  - id: isort
24
24
 
25
25
  - repo: https://github.com/psf/black
26
- rev: 24.4.2
26
+ rev: 25.1.0
27
27
  hooks:
28
28
  - id: black
29
29
  language_version: python3
30
30
 
31
31
  - repo: https://github.com/asottile/blacken-docs
32
- rev: 1.18.0
32
+ rev: 1.19.1
33
33
  hooks:
34
34
  - id: blacken-docs
35
35
  additional_dependencies: [black]
36
36
 
37
37
  - repo: https://github.com/PyCQA/flake8
38
- rev: 7.1.0
38
+ rev: 7.2.0
39
39
  hooks:
40
40
  - id: flake8
41
41
  additional_dependencies: [flake8-print]
@@ -49,7 +49,7 @@ repos:
49
49
  files: README.rst
50
50
 
51
51
  - repo: https://github.com/pre-commit/mirrors-mypy
52
- rev: v1.10.1
52
+ rev: v1.15.0
53
53
  hooks:
54
54
  - id: mypy
55
55
  args: [--install-types, --non-interactive, --ignore-missing-imports, --disallow-incomplete-defs]
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: tariochbctools
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: Importers, plugins and price fetchers for Beancount
5
5
  Home-page: https://github.com/tarioch/beancounttools/
6
6
  Author: Patrick Ruckstuhl
@@ -41,6 +41,7 @@ Requires-Dist: pytest-mock; extra == "testing"
41
41
  Requires-Dist: flake8; extra == "testing"
42
42
  Requires-Dist: black; extra == "testing"
43
43
  Requires-Dist: isort; extra == "testing"
44
+ Dynamic: license-file
44
45
 
45
46
  .. image:: https://img.shields.io/pypi/l/tariochbctools.svg
46
47
  :target: https://pypi.python.org/pypi/tariochbctools
@@ -432,3 +432,14 @@ Import Fidelity Netbenefits `<https://netbenefits.fidelity.com/>` transactions f
432
432
  baseCcy="CHF",
433
433
  )
434
434
  ]
435
+
436
+ radicant account statements
437
+ ---------------------------
438
+
439
+ Import PDF from `radicant <https://radicant.com/>`__
440
+
441
+ .. code-block:: python
442
+
443
+ from tariochbctools.importers.radicant import importer as radicant
444
+
445
+ CONFIG = [radicant.Importer("Account.*\.pdf", "Assets:Radicant")]
@@ -1,10 +1,10 @@
1
1
  """
2
- Setup file for tariochbctools.
3
- Use setup.cfg to configure your project.
2
+ Setup file for tariochbctools.
3
+ Use setup.cfg to configure your project.
4
4
 
5
- This file was generated with PyScaffold 4.0.2.
6
- PyScaffold helps you to put up the scaffold of your new Python project.
7
- Learn more under: https://pyscaffold.org/
5
+ This file was generated with PyScaffold 4.0.2.
6
+ PyScaffold helps you to put up the scaffold of your new Python project.
7
+ Learn more under: https://pyscaffold.org/
8
8
  """
9
9
 
10
10
  from setuptools import setup
@@ -0,0 +1,144 @@
1
+ import re
2
+ from datetime import datetime
3
+
4
+ import beangulp
5
+ import camelot
6
+ from beancount.core import amount, data
7
+ from beancount.core.number import D
8
+
9
+
10
+ class Importer(beangulp.Importer):
11
+ """An importer for radicant Account Statement PDF files."""
12
+
13
+ def __init__(self, filepattern: str, account: data.Account):
14
+ self._filepattern = filepattern
15
+ self._account = account
16
+ self.currency = "CHF"
17
+
18
+ def identify(self, filepath: str) -> bool:
19
+ return re.search(self._filepattern, filepath) is not None
20
+
21
+ def account(self, filepath: str) -> data.Account:
22
+ return self._account
23
+
24
+ def cleanAmount(
25
+ self, debit: str | None, credit: str | None
26
+ ) -> amount.Amount | None:
27
+ if debit:
28
+ return -amount.Amount(D(debit.replace("'", "")), self.currency)
29
+ elif credit:
30
+ return amount.Amount(D(credit.replace("'", "")), self.currency)
31
+ else:
32
+ return None
33
+
34
+ def createEntry(
35
+ self,
36
+ filepath: str,
37
+ date: str,
38
+ amt: amount.Amount,
39
+ text: str,
40
+ conversionOriginal: str | None,
41
+ conversionRate: str | None,
42
+ ) -> data.Transaction:
43
+
44
+ book_date = datetime.strptime(date, "%d.%m.%y").date()
45
+
46
+ if conversionOriginal and conversionRate:
47
+ kv = {"original": conversionOriginal, "rate": conversionRate}
48
+ text = text.replace("Amount: " + conversionOriginal, "")
49
+ else:
50
+ kv = None
51
+
52
+ meta = data.new_metadata(filepath, 0, kv)
53
+ return data.Transaction(
54
+ meta,
55
+ book_date,
56
+ "*",
57
+ "",
58
+ text.strip(),
59
+ data.EMPTY_SET,
60
+ data.EMPTY_SET,
61
+ [
62
+ data.Posting(self._account, amt, None, None, None, None),
63
+ ],
64
+ )
65
+
66
+ def extract(self, filepath: str, existing: data.Entries) -> data.Entries:
67
+ entries = []
68
+
69
+ conversionPattern = re.compile(r"(?P<original>.+) at the rate of (?P<rate>.+)")
70
+
71
+ tables = camelot.read_pdf(
72
+ filepath,
73
+ flavor="stream",
74
+ pages="all",
75
+ table_regions=["40,470,580,32"],
76
+ columns=["80,300,370,440,500"],
77
+ )
78
+
79
+ for table in tables:
80
+ df = table.df
81
+
82
+ lastTrxDate = None
83
+ lastAmount = None
84
+ lastDetails = ""
85
+ beforeStart = True
86
+ conversionOriginal = None
87
+ conversionRate = None
88
+ for _, row in df.iterrows():
89
+ date, text, _, debit, credit, _ = tuple(row)
90
+
91
+ # skip stuff before
92
+ if beforeStart and "Date" != date:
93
+ continue
94
+ elif "Date" == date:
95
+ beforeStart = False
96
+ continue
97
+
98
+ # skip stuff after
99
+ if "Balance as of" in text:
100
+ break
101
+
102
+ trxDate = date
103
+ details = text.strip()
104
+ amt = self.cleanAmount(debit, credit)
105
+
106
+ if amt:
107
+ if lastTrxDate:
108
+ entries.append(
109
+ self.createEntry(
110
+ filepath,
111
+ lastTrxDate,
112
+ lastAmount,
113
+ lastDetails,
114
+ conversionOriginal,
115
+ conversionRate,
116
+ )
117
+ )
118
+
119
+ lastTrxDate = trxDate
120
+ lastAmount = amt
121
+ lastDetails = ""
122
+ conversionOriginal = None
123
+ conversionRate = None
124
+
125
+ match = conversionPattern.match(details)
126
+ if match:
127
+ conversionOriginal = match.group("original")
128
+ conversionRate = match.group("rate")
129
+ else:
130
+ lastDetails += details + " "
131
+
132
+ if lastTrxDate:
133
+ entries.append(
134
+ self.createEntry(
135
+ filepath,
136
+ lastTrxDate,
137
+ lastAmount,
138
+ lastDetails,
139
+ conversionOriginal,
140
+ conversionRate,
141
+ )
142
+ )
143
+
144
+ return entries
@@ -0,0 +1 @@
1
+ """Beancount plugins."""
@@ -13,7 +13,11 @@ def generate(entries, options_map, baseCcy):
13
13
 
14
14
  additionalEntries = []
15
15
  for entry in entries:
16
- if isinstance(entry, data.Price) and entry.amount.currency != baseCcy:
16
+ if (
17
+ isinstance(entry, data.Price)
18
+ and entry.amount.currency != baseCcy
19
+ and entry.currency != baseCcy
20
+ ):
17
21
  fxTuple = tuple([entry.amount.currency, baseCcy])
18
22
  fxRate = prices.get_price(priceMap, fxTuple, entry.date)
19
23
  if fxRate[1] and not _alreadyExistingPrice(
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: tariochbctools
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: Importers, plugins and price fetchers for Beancount
5
5
  Home-page: https://github.com/tarioch/beancounttools/
6
6
  Author: Patrick Ruckstuhl
@@ -41,6 +41,7 @@ Requires-Dist: pytest-mock; extra == "testing"
41
41
  Requires-Dist: flake8; extra == "testing"
42
42
  Requires-Dist: black; extra == "testing"
43
43
  Requires-Dist: isort; extra == "testing"
44
+ Dynamic: license-file
44
45
 
45
46
  .. image:: https://img.shields.io/pypi/l/tariochbctools.svg
46
47
  :target: https://pypi.python.org/pypi/tariochbctools
@@ -53,6 +53,8 @@ src/tariochbctools/importers/postfinance/__init__.py
53
53
  src/tariochbctools/importers/postfinance/importer.py
54
54
  src/tariochbctools/importers/quickfile/__init__.py
55
55
  src/tariochbctools/importers/quickfile/importer.py
56
+ src/tariochbctools/importers/radicant/__init__.py
57
+ src/tariochbctools/importers/radicant/importer.py
56
58
  src/tariochbctools/importers/raiffeisench/importer.py
57
59
  src/tariochbctools/importers/revolut/__init__.py
58
60
  src/tariochbctools/importers/revolut/importer.py
@@ -85,6 +87,8 @@ tests/tariochbctools/plugins/__init__.py
85
87
  tests/tariochbctools/plugins/test_generate_base_ccy_prices.py
86
88
  tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_expected.beancount
87
89
  tests/tariochbctools/plugins/data/generate_base_ccy_prices/entry_already_exists_input.beancount
90
+ tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_expected.beancount
91
+ tests/tariochbctools/plugins/data/generate_base_ccy_prices/issue122_input.beancount
88
92
  tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_expected.beancount
89
93
  tests/tariochbctools/plugins/data/generate_base_ccy_prices/missing_fx_input.beancount
90
94
  tests/tariochbctools/plugins/data/generate_base_ccy_prices/normal_expected.beancount
@@ -0,0 +1,10 @@
1
+ """
2
+ Dummy conftest.py for tariochbctools.
3
+
4
+ If you don't know what this is for, just leave it empty.
5
+ Read more about conftest.py under:
6
+ - https://docs.pytest.org/en/stable/fixture.html
7
+ - https://docs.pytest.org/en/stable/writing_plugins.html
8
+ """
9
+
10
+ # import pytest
@@ -0,0 +1,3 @@
1
+ 2020-01-01 price USD 10 TUG
2
+ 2020-01-01 price USD 0.10 EUR
3
+ 2020-01-01 price EUR 100 TUG
@@ -0,0 +1,4 @@
1
+ plugin "tariochbctools.plugins.generate_base_ccy_prices" "EUR"
2
+
3
+ 2020-01-01 price USD 10 TUG
4
+ 2020-01-01 price EUR 100 TUG
@@ -6,7 +6,9 @@ from beancount import loader
6
6
  from beancount.parser import printer
7
7
 
8
8
 
9
- @pytest.mark.parametrize("testCase", ["normal", "missing_fx", "entry_already_exists"])
9
+ @pytest.mark.parametrize(
10
+ "testCase", ["normal", "missing_fx", "entry_already_exists", "issue122"]
11
+ )
10
12
  def test_data(testCase):
11
13
  dataDir = os.path.join(
12
14
  os.path.dirname(__file__), "data", "generate_base_ccy_prices"
@@ -1,2 +0,0 @@
1
- """Beancount plugins.
2
- """
@@ -1,10 +0,0 @@
1
- """
2
- Dummy conftest.py for tariochbctools.
3
-
4
- If you don't know what this is for, just leave it empty.
5
- Read more about conftest.py under:
6
- - https://docs.pytest.org/en/stable/fixture.html
7
- - https://docs.pytest.org/en/stable/writing_plugins.html
8
- """
9
-
10
- # import pytest
File without changes
File without changes