csv2ofx 0.34.1__tar.gz → 0.34.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.
Files changed (127) hide show
  1. {csv2ofx-0.34.1/csv2ofx.egg-info → csv2ofx-0.34.2}/PKG-INFO +1 -2
  2. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/amazon.py +8 -1
  3. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/stripe.py +5 -3
  4. {csv2ofx-0.34.1 → csv2ofx-0.34.2/csv2ofx.egg-info}/PKG-INFO +1 -2
  5. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx.egg-info/requires.txt +0 -1
  6. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/amazon.csv +1 -0
  7. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/pyproject.toml +1 -2
  8. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/tests/test_cli.py +7 -7
  9. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/LICENSE +0 -0
  10. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/MANIFEST.in +0 -0
  11. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/README.md +0 -0
  12. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/__init__.py +0 -0
  13. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/__main__.py +0 -0
  14. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/main.py +0 -0
  15. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/__init__.py +0 -0
  16. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/abnamro.py +0 -0
  17. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/boursorama.py +0 -0
  18. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/capitalone.py +0 -0
  19. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/creditunion.py +0 -0
  20. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/custom.py +0 -0
  21. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/default.py +0 -0
  22. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/eqbank.py +0 -0
  23. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/exim.py +0 -0
  24. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/gls.py +0 -0
  25. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/ingdirect.py +0 -0
  26. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/ingesp.py +0 -0
  27. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/mdb.py +0 -0
  28. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/mint.py +0 -0
  29. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/mint_extra.py +0 -0
  30. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/mint_headerless.py +0 -0
  31. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/mintapi.py +0 -0
  32. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/msmoneyreport.py +0 -0
  33. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/n26.py +0 -0
  34. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/outbank.py +0 -0
  35. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/payoneer.py +0 -0
  36. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/pcmastercard.py +0 -0
  37. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/rabobank.py +0 -0
  38. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/schwabchecking.py +0 -0
  39. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/split_account.py +0 -0
  40. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/starling.py +0 -0
  41. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/ubs-ch-fr.py +0 -0
  42. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/ubs.py +0 -0
  43. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/xero.py +0 -0
  44. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/mappings/yodlee.py +0 -0
  45. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/ofx.py +0 -0
  46. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/qif.py +0 -0
  47. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx/utils.py +0 -0
  48. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx.egg-info/SOURCES.txt +0 -0
  49. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx.egg-info/dependency_links.txt +0 -0
  50. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx.egg-info/entry_points.txt +0 -0
  51. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/csv2ofx.egg-info/top_level.txt +0 -0
  52. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/amazon.ofx +0 -0
  53. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/creditunion.qif +0 -0
  54. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/default.ofx +0 -0
  55. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/default.qif +0 -0
  56. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/default_w_splits.ofx +0 -0
  57. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/default_w_splits.qif +0 -0
  58. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/gls.ofx +0 -0
  59. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/ingesp.ofx +0 -0
  60. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/mint.ofx +0 -0
  61. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/mint.qif +0 -0
  62. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/mint_alt.qif +0 -0
  63. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/mint_extra.qif +0 -0
  64. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/n26.ofx +0 -0
  65. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/outbank.ofx +0 -0
  66. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/payoneer.ofx +0 -0
  67. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/pcmastercard.ofx +0 -0
  68. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-baltest-case1.ofx +0 -0
  69. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-baltest-case2.ofx +0 -0
  70. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-baltest-case3.ofx +0 -0
  71. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-baltest-case4.ofx +0 -0
  72. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-baltest-case5.ofx +0 -0
  73. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-baltest-case6.ofx +0 -0
  74. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-baltest-case7.ofx +0 -0
  75. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking-msmoney.ofx +0 -0
  76. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/schwab-checking.ofx +0 -0
  77. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/stripe-all.ofx +0 -0
  78. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/stripe-all.qif +0 -0
  79. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/stripe-default.ofx +0 -0
  80. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/stripe-default.qif +0 -0
  81. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/ubs-ch-fr.qif +0 -0
  82. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/converted/xero.qif +0 -0
  83. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/example/investment_example.qif +0 -0
  84. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/example/transaction_example.ofx +0 -0
  85. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/example/transfer_example.ofx +0 -0
  86. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/capitalone.csv +0 -0
  87. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/creditunion.csv +0 -0
  88. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/default.csv +0 -0
  89. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/gls.csv +0 -0
  90. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/ingesp.csv +0 -0
  91. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/mint.csv +0 -0
  92. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/mint_extra.csv +0 -0
  93. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/mint_headerless.csv +0 -0
  94. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/n26-fr.csv +0 -0
  95. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/outbank.csv +0 -0
  96. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/payoneer.csv +0 -0
  97. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/pcmastercard.csv +0 -0
  98. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking-baltest-case1.csv +0 -0
  99. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking-baltest-case2.csv +0 -0
  100. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking-baltest-case3.csv +0 -0
  101. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking-baltest-case4.csv +0 -0
  102. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking-baltest-case5.csv +0 -0
  103. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking-baltest-case6.csv +0 -0
  104. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking-baltest-case7.csv +0 -0
  105. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/schwab-checking.csv +0 -0
  106. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/stripe-all.csv +0 -0
  107. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/stripe-default.csv +0 -0
  108. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/ubs-ch-fr_trimmed.csv +0 -0
  109. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/data/test/xero.csv +0 -0
  110. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/OFX 2.1.1.pdf +0 -0
  111. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/OFXAudit.xls +0 -0
  112. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/OFX_Message_Support.doc +0 -0
  113. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification.html +0 -0
  114. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/a.html +0 -0
  115. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/a_002.html +0 -0
  116. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/a_003.html +0 -0
  117. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/a_004.html +0 -0
  118. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/a_005.html +0 -0
  119. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/bootstrap.js +0 -0
  120. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/jquery.js +0 -0
  121. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/QIF Specification_files/sitecss.css +0 -0
  122. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/docs/qif-file-format.txt +0 -0
  123. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/helpers/check-stage +0 -0
  124. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/helpers/clean +0 -0
  125. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/helpers/srcdist +0 -0
  126. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/helpers/wheel +0 -0
  127. {csv2ofx-0.34.1 → csv2ofx-0.34.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csv2ofx
3
- Version: 0.34.1
3
+ Version: 0.34.2
4
4
  Summary: converts a csv file of transactions to an ofx or qif file
5
5
  Author-email: Reuben Cummings <reubano@gmail.com>
6
6
  Maintainer-email: "Jason R. Coombs" <jaraco@jaraco.com>
@@ -25,7 +25,6 @@ Requires-Dist: pytest; extra == "test"
25
25
  Requires-Dist: pytest-enabler; extra == "test"
26
26
  Requires-Dist: pytest-ruff; extra == "test"
27
27
  Requires-Dist: freezegun; extra == "test"
28
- Requires-Dist: pytest-lazy-fixtures; extra == "test"
29
28
  Dynamic: license-file
30
29
 
31
30
  # csv2ofx
@@ -48,8 +48,15 @@ def filter_pending(row):
48
48
  return row['date'] != 'pending'
49
49
 
50
50
 
51
+ def filter_cancelled(row):
52
+ """
53
+ Cancelled orders have no total.
54
+ """
55
+ return bool(row['total'])
56
+
57
+
51
58
  def filter(row):
52
- return filter_pending(row) and filter_payment(row)
59
+ return filter_pending(row) and filter_payment(row) and filter_cancelled(row)
53
60
 
54
61
 
55
62
  mapping = {
@@ -24,8 +24,10 @@ mapping = {
24
24
  "date": itemgetter("created"),
25
25
  "amount": itemgetter("amount"),
26
26
  "currency": itemgetter("currency"),
27
- "payee": lambda tr: tr.get("customer_description")
28
- if len(tr.get("customer_description")) > 0
29
- else tr.get("card_name", ""),
27
+ "payee": lambda tr: (
28
+ tr.get("customer_description")
29
+ if len(tr.get("customer_description")) > 0
30
+ else tr.get("card_name", "")
31
+ ),
30
32
  "desc": itemgetter("description"),
31
33
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csv2ofx
3
- Version: 0.34.1
3
+ Version: 0.34.2
4
4
  Summary: converts a csv file of transactions to an ofx or qif file
5
5
  Author-email: Reuben Cummings <reubano@gmail.com>
6
6
  Maintainer-email: "Jason R. Coombs" <jaraco@jaraco.com>
@@ -25,7 +25,6 @@ Requires-Dist: pytest; extra == "test"
25
25
  Requires-Dist: pytest-enabler; extra == "test"
26
26
  Requires-Dist: pytest-ruff; extra == "test"
27
27
  Requires-Dist: freezegun; extra == "test"
28
- Requires-Dist: pytest-lazy-fixtures; extra == "test"
29
28
  Dynamic: license-file
30
29
 
31
30
  # csv2ofx
@@ -7,4 +7,3 @@ pytest
7
7
  pytest-enabler
8
8
  pytest-ruff
9
9
  freezegun
10
- pytest-lazy-fixtures
@@ -4,4 +4,5 @@ order id,order url,items,to,date,total,shipping,shipping_refund,gift,tax,refund,
4
4
  114-5269613-6941034,https://www.amazon.com/...,"TOPGREENER Smart Wi-Fi In-Wall Tamper Resistant Dual USB Charger Outlet, Energy Monitoring, Compatible with Amazon Alexa and Google Assistant, Outlet; ",John Doe,2022-10-11,34.12,0,0,0,1.93,0,"Visa ending in 9876: October 12, 2022: $34.12; "
5
5
  D01-1234567-8901234,https://www.amazon.com/...,,,pending,,,,,,,
6
6
  D01-5678901-2345678,https://www.amazon.com/...,,,pending,,,,,,,
7
+ 111-1747627-cancelled,https://www.amazon.com/gp/your-account/order-details/...,,,2025-04-11,,,,,,,
7
8
  order id,order url,items,to,date,total,shipping,shipping_refund,gift,tax,refund,payments
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "csv2ofx"
7
- version = "0.34.1"
7
+ version = "0.34.2"
8
8
  description = "converts a csv file of transactions to an ofx or qif file"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -43,7 +43,6 @@ test = [
43
43
  "pytest-enabler",
44
44
  "pytest-ruff",
45
45
  "freezegun",
46
- "pytest-lazy-fixtures",
47
46
  ]
48
47
 
49
48
  [tool.setuptools]
@@ -1,4 +1,5 @@
1
1
  import itertools
2
+ import os
2
3
  import pathlib
3
4
  import shlex
4
5
  import subprocess
@@ -6,7 +7,6 @@ import time
6
7
 
7
8
  import freezegun
8
9
  import pytest
9
- from pytest_lazy_fixtures import lf
10
10
 
11
11
  import csv2ofx.main
12
12
 
@@ -101,7 +101,7 @@ samples = [
101
101
  ),
102
102
  (
103
103
  ["-o", "-m amazon", "-e 20230604"],
104
- lf("amazon_inputs"),
104
+ "amazon.csv",
105
105
  "amazon.ofx",
106
106
  ),
107
107
  (
@@ -110,20 +110,19 @@ samples = [
110
110
  "payoneer.ofx",
111
111
  ),
112
112
  (
113
- ['-m', 'n26'],
113
+ ['-m', 'n26', "-e 20250406"],
114
114
  'n26-fr.csv',
115
115
  'n26.ofx',
116
116
  ),
117
117
  ]
118
118
 
119
119
 
120
- @pytest.fixture
121
- def amazon_inputs(monkeypatch):
120
+ @pytest.fixture(autouse=True)
121
+ def amazon_env(monkeypatch):
122
122
  # for Amazon import; excludes transaction 3/3
123
123
  monkeypatch.setenv("AMAZON_EXCLUDE_CARDS", "9876")
124
124
  # clear the purchases account if set
125
125
  monkeypatch.delenv("AMAZON_PURCHASES_ACCOUNT", raising=False)
126
- return "amazon.csv"
127
126
 
128
127
 
129
128
  data = pathlib.Path('data')
@@ -160,6 +159,7 @@ def test_help():
160
159
 
161
160
  @pytest.mark.xfail("sys.version_info < (3, 13)")
162
161
  def test_help_in_readme():
163
- out = subprocess.check_output(['csv2ofx', '--help'], text=True)
162
+ env = {**os.environ, "NO_COLOR": "1"}
163
+ out = subprocess.check_output(['csv2ofx', '--help'], text=True, env=env)
164
164
  readme = pathlib.Path('README.md').read_text()
165
165
  assert out in readme, "README help is stale, please update."
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
File without changes