sqlite-export-for-ynab 2.9.7__tar.gz → 2.9.9__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 (23) hide show
  1. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/LICENSE +0 -2
  2. {sqlite_export_for_ynab-2.9.7/sqlite_export_for_ynab.egg-info → sqlite_export_for_ynab-2.9.9}/PKG-INFO +4 -5
  3. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/pyproject.toml +54 -56
  4. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/_main.py +12 -41
  5. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9/sqlite_export_for_ynab.egg-info}/PKG-INFO +4 -5
  6. sqlite_export_for_ynab-2.9.9/sqlite_export_for_ynab.egg-info/requires.txt +7 -0
  7. sqlite_export_for_ynab-2.9.7/sqlite_export_for_ynab.egg-info/requires.txt +0 -10
  8. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/README.md +0 -0
  9. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/setup.cfg +0 -0
  10. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/__init__.py +0 -0
  11. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/__main__.py +0 -0
  12. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/ddl/__init__.py +0 -0
  13. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/ddl/create-relations.sql +0 -0
  14. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/ddl/drop-relations.sql +0 -0
  15. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab/py.typed +0 -0
  16. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/SOURCES.txt +0 -0
  17. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/dependency_links.txt +0 -0
  18. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/entry_points.txt +0 -0
  19. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/sqlite_export_for_ynab.egg-info/top_level.txt +0 -0
  20. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/testing/__init__.py +0 -0
  21. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/testing/fixtures.py +0 -0
  22. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/tests/__init__.py +0 -0
  23. {sqlite_export_for_ynab-2.9.7 → sqlite_export_for_ynab-2.9.9}/tests/_main_test.py +0 -0
@@ -1,5 +1,3 @@
1
- MIT License
2
-
3
1
  Copyright (c) 2024 Max R
4
2
 
5
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlite_export_for_ynab
3
- Version: 2.9.7
3
+ Version: 2.9.9
4
4
  Summary: SQLite Export for YNAB - Export YNAB Data to SQLite
5
5
  Author-email: Max R <mxr@users.noreply.github.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/mxr/sqlite-export-for-ynab
8
- Keywords: ynab,sqlite,sql,budget,plan,cli
8
+ Keywords: budget,cli,plan,sql,sqlite,ynab
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Programming Language :: Python :: 3 :: Only
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -16,11 +16,10 @@ License-File: LICENSE
16
16
  Requires-Dist: aiohttp>=3
17
17
  Requires-Dist: aiopathlib
18
18
  Requires-Dist: aiosqlite
19
- Requires-Dist: asyncio-for-ynab~=1.86.0
19
+ Requires-Dist: asyncio-for-ynab~=1.87.0
20
20
  Requires-Dist: fasteners
21
- Requires-Dist: rich>=10
21
+ Requires-Dist: rich>=12
22
22
  Requires-Dist: tenacity
23
- Requires-Dist: typing-extensions; python_version < "3.12"
24
23
  Dynamic: license-file
25
24
 
26
25
  # sqlite-export-for-ynab
@@ -1,17 +1,13 @@
1
- [build-system]
2
- build-backend = "setuptools.build_meta"
3
- requires = ["setuptools"]
4
-
5
- [dependency-groups]
6
- dev = [
7
- "covdefaults>=2.1.0",
8
- "coverage",
9
- "pytest",
10
- "pytest-asyncio",
11
- ]
12
-
13
1
  [project]
14
- authors = [{name = "Max R", email = "mxr@users.noreply.github.com"}]
2
+ name = "sqlite_export_for_ynab"
3
+ version = "2.9.9"
4
+ description = "SQLite Export for YNAB - Export YNAB Data to SQLite"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11" # generated by mxr/base
7
+ license = "MIT" # generated by mxr/base
8
+ license-files = ["LICENSE"] # generated by mxr/base
9
+ authors = [{ name = "Max R", email = "mxr@users.noreply.github.com" }] # generated by mxr/base
10
+ keywords = ["budget", "cli", "plan", "sql", "sqlite", "ynab"]
15
11
  classifiers = [
16
12
  "Programming Language :: Python :: 3",
17
13
  "Programming Language :: Python :: 3 :: Only",
@@ -22,31 +18,34 @@ dependencies = [
22
18
  "aiohttp>=3",
23
19
  "aiopathlib",
24
20
  "aiosqlite",
25
- "asyncio-for-ynab~=1.86.0",
21
+ "asyncio-for-ynab~=1.87.0",
26
22
  "fasteners",
27
- "rich>=10",
23
+ "rich>=12",
28
24
  "tenacity",
29
- "typing-extensions; python_version<'3.12'",
30
25
  ]
31
- description = "SQLite Export for YNAB - Export YNAB Data to SQLite"
32
- keywords = ["ynab", "sqlite", "sql", "budget", "plan", "cli"]
33
- license = "MIT"
34
- license-files = ["LICENSE"]
35
- name = "sqlite_export_for_ynab"
36
- readme = "README.md"
37
- requires-python = ">=3.11"
38
- version = "2.9.7"
39
26
 
40
- [project.scripts]
27
+ [project.urls] # generated by mxr/base
28
+ Homepage = "https://github.com/mxr/sqlite-export-for-ynab"
29
+
30
+ [project.scripts] # generated by mxr/base
41
31
  sqlite-export-for-ynab = "sqlite_export_for_ynab._main:main"
42
32
 
43
- [project.urls]
44
- Homepage = "https://github.com/mxr/sqlite-export-for-ynab"
33
+ [dependency-groups]
34
+ dev = [
35
+ "covdefaults>=2.1.0",
36
+ "coverage",
37
+ "pytest",
38
+ "pytest-asyncio",
39
+ ]
45
40
 
46
- [tool.coverage.run]
41
+ [build-system] # generated by mxr/base
42
+ requires = ["setuptools"]
43
+ build-backend = "setuptools.build_meta"
44
+
45
+ [tool.coverage.run] # generated by mxr/base
47
46
  plugins = ["covdefaults"]
48
47
 
49
- [tool.mypy]
48
+ [tool.mypy] # generated by mxr/base
50
49
  check_untyped_defs = true
51
50
  disallow_any_generics = true
52
51
  disallow_incomplete_defs = true
@@ -54,21 +53,18 @@ disallow_untyped_defs = true
54
53
  warn_redundant_casts = true
55
54
  warn_unused_ignores = true
56
55
 
57
- [[tool.mypy.overrides]]
56
+ [[tool.mypy.overrides]] # generated by mxr/base
58
57
  disallow_untyped_defs = false
59
58
  module = "testing.*"
60
59
 
61
- [[tool.mypy.overrides]]
60
+ [[tool.mypy.overrides]] # generated by mxr/base
62
61
  disallow_untyped_defs = false
63
62
  module = "tests.*"
64
63
 
65
64
  [tool.pytest.ini_options]
66
65
  asyncio_default_fixture_loop_scope = "function"
67
66
 
68
- [tool.ruff]
69
- target-version = "py311"
70
-
71
- [tool.ruff.lint]
67
+ [tool.ruff.lint] # generated by mxr/base
72
68
  extend-select = [
73
69
  "A", # see flake8-builtins
74
70
  "B", # see flake8-bugbear
@@ -79,7 +75,7 @@ extend-select = [
79
75
  "UP", # see pyupgrade
80
76
  ]
81
77
 
82
- [tool.ruff.lint.isort]
78
+ [tool.ruff.lint.isort] # generated by mxr/base
83
79
  force-single-line = true
84
80
  required-imports = ["from __future__ import annotations"]
85
81
 
@@ -87,56 +83,58 @@ required-imports = ["from __future__ import annotations"]
87
83
  sqlite_export_for_ynab = ["py.typed"]
88
84
  "sqlite_export_for_ynab.ddl" = ["*.sql"]
89
85
 
90
- [tool.setuptools.packages]
86
+ [tool.setuptools.packages] # generated by mxr/base
91
87
  find = {}
92
88
 
93
- [tool.sqlfluff.layout.type.comma]
89
+ [tool.sqlfluff.layout.type.comma] # generated by mxr/base
94
90
  line_position = "leading"
95
91
  spacing_before = "touch"
96
92
 
97
- [tool.sqlfluff.layout.type.from_clause]
93
+ [tool.sqlfluff.layout.type.from_clause] # generated by mxr/base
98
94
  keyword_line_position = "leading"
99
95
 
100
- [tool.sqlfluff.layout.type.when_clause]
96
+ [tool.sqlfluff.layout.type.when_clause] # generated by mxr/base
101
97
  keyword_line_position = "leading"
102
98
 
103
- [tool.sqlfluff.rules.capitalisation.functions]
104
- extended_capitalisation_policy = 'upper'
99
+ [tool.sqlfluff.rules.capitalisation.functions] # generated by mxr/base
100
+ extended_capitalisation_policy = "upper"
105
101
 
106
- [tool.sqlfluff.rules.capitalisation.identifiers]
107
- extended_capitalisation_policy = 'lower'
102
+ [tool.sqlfluff.rules.capitalisation.identifiers] # generated by mxr/base
103
+ extended_capitalisation_policy = "lower"
108
104
 
109
- [tool.sqlfluff.rules.capitalisation.keywords]
110
- capitalisation_policy = 'upper'
105
+ [tool.sqlfluff.rules.capitalisation.keywords] # generated by mxr/base
106
+ capitalisation_policy = "upper"
111
107
 
112
- [tool.sqlfluff.rules.capitalisation.literals]
113
- capitalisation_policy = 'upper'
108
+ [tool.sqlfluff.rules.capitalisation.literals] # generated by mxr/base
109
+ capitalisation_policy = "upper"
114
110
 
115
- [tool.sqlfluff.rules.convention.not_equal]
111
+ [tool.sqlfluff.rules.convention.not_equal] # generated by mxr/base
116
112
  preferred_not_equal_style = "c_style"
117
113
 
118
- [tool.sqlfluff.rules.convention.terminator]
114
+ [tool.sqlfluff.rules.convention.terminator] # generated by mxr/base
119
115
  multiline_newline = true
120
116
  require_final_semicolon = true
121
117
 
122
- [tool.sqlfluff.rules.references.quoting]
118
+ [tool.sqlfluff.rules.references.quoting] # generated by mxr/base
123
119
  prefer_quoted_keywords = true
124
120
 
125
- [tool.tox]
126
- env_list = ["py", "pypy3", "pre-commit"]
121
+ [tool.tox] # generated by mxr/base
122
+ env_list = ["py", "pre-commit"]
127
123
 
128
- [tool.tox.env.pre-commit]
124
+ [tool.tox.env.pre-commit] # generated by mxr/base
129
125
  commands = [["pre-commit", "run", "--all-files", "--show-diff-on-failure"]]
130
126
  deps = ["pre-commit-uv"]
127
+ runner = "uv-venv-runner"
131
128
  skip_install = true
132
129
 
133
- [tool.tox.env_run_base]
130
+ [tool.tox.env_run_base] # generated by mxr/base
134
131
  commands = [
135
132
  ["coverage", "erase"],
136
133
  ["coverage", "run", "-m", "pytest", "{posargs:tests}"],
137
134
  ["coverage", "report"],
138
135
  ]
139
136
  dependency_groups = ["dev"]
137
+ runner = "uv-venv-lock-runner"
140
138
 
141
- [tool.ty.rules]
139
+ [tool.ty.rules] # generated by mxr/base
142
140
  all = "error"
@@ -43,10 +43,12 @@ from asyncio_for_ynab import TransactionsApi
43
43
  from asyncio_for_ynab import TransactionsResponse
44
44
  from asyncio_for_ynab import TransactionsResponseData
45
45
  from rich.progress import BarColumn
46
+ from rich.progress import MofNCompleteColumn
46
47
  from rich.progress import Progress
47
48
  from rich.progress import TaskID
48
49
  from rich.progress import TextColumn
49
50
  from rich.progress import TimeElapsedColumn
51
+ from tenacity import AsyncRetrying
50
52
  from tenacity import retry
51
53
  from tenacity import stop_after_attempt
52
54
 
@@ -64,48 +66,15 @@ _T = TypeVar("_T")
64
66
 
65
67
  if sys.version_info >= (3, 12): # pragma: >=3.12 cover
66
68
  from itertools import batched
67
- from typing import override
68
69
  else: # pragma: <3.12 cover
69
70
  from itertools import islice
70
71
 
71
- from typing_extensions import override
72
-
73
72
  def batched(iterable: Iterable[_T], n: int) -> Iterator[tuple[_T, ...]]:
74
73
  it = iter(iterable)
75
74
  while batch := tuple(islice(it, n)):
76
75
  yield batch
77
76
 
78
77
 
79
- try:
80
- from rich.progress import (
81
- MofNCompleteColumn, # pyright: ignore[reportAssignmentType]
82
- )
83
- # https://github.com/benleb/surepy/issues/240
84
- except ImportError: # pragma: no cover
85
- from rich.progress import ProgressColumn
86
- from rich.progress import Task
87
- from rich.text import Text
88
-
89
- if TYPE_CHECKING:
90
- from rich.table import Column
91
-
92
- class MofNCompleteColumn(ProgressColumn): # type:ignore[no-redef]
93
- def __init__(self, separator: str = "/", table_column: Column | None = None):
94
- self.separator = separator
95
- super().__init__(table_column=table_column)
96
-
97
- @override
98
- def render(self, task: Task) -> Text:
99
- """Show completed/total."""
100
- completed = int(task.completed)
101
- total = int(task.total) if task.total is not None else "?"
102
- total_width = len(str(total))
103
- return Text(
104
- f"{completed:{total_width}d}{self.separator}{total}",
105
- style="progress.download",
106
- )
107
-
108
-
109
78
  _EntryTable = Literal[
110
79
  "accounts",
111
80
  "account_periodic_values",
@@ -693,15 +662,17 @@ class _ProgressYnab:
693
662
  lkos: dict[str, int]
694
663
  task_id: TaskID
695
664
 
696
- @retry(stop=stop_after_attempt(3))
697
665
  async def get(self, endpoint: Callable[..., Awaitable[_T]]) -> _T:
698
- try:
699
- return await endpoint(
700
- plan_id=self.plan_id,
701
- last_knowledge_of_server=self.lkos.get(self.plan_id),
702
- )
703
- finally:
704
- self.context.progress.update(self.task_id, advance=1)
666
+ async for attempt in AsyncRetrying(stop=stop_after_attempt(3)):
667
+ with attempt:
668
+ try:
669
+ return await endpoint(
670
+ plan_id=self.plan_id,
671
+ last_knowledge_of_server=self.lkos.get(self.plan_id),
672
+ )
673
+ finally:
674
+ self.context.progress.update(self.task_id, advance=1)
675
+ raise AssertionError("unreachable")
705
676
 
706
677
 
707
678
  @dataclass(slots=True, frozen=True)
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlite_export_for_ynab
3
- Version: 2.9.7
3
+ Version: 2.9.9
4
4
  Summary: SQLite Export for YNAB - Export YNAB Data to SQLite
5
5
  Author-email: Max R <mxr@users.noreply.github.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/mxr/sqlite-export-for-ynab
8
- Keywords: ynab,sqlite,sql,budget,plan,cli
8
+ Keywords: budget,cli,plan,sql,sqlite,ynab
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: Programming Language :: Python :: 3 :: Only
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -16,11 +16,10 @@ License-File: LICENSE
16
16
  Requires-Dist: aiohttp>=3
17
17
  Requires-Dist: aiopathlib
18
18
  Requires-Dist: aiosqlite
19
- Requires-Dist: asyncio-for-ynab~=1.86.0
19
+ Requires-Dist: asyncio-for-ynab~=1.87.0
20
20
  Requires-Dist: fasteners
21
- Requires-Dist: rich>=10
21
+ Requires-Dist: rich>=12
22
22
  Requires-Dist: tenacity
23
- Requires-Dist: typing-extensions; python_version < "3.12"
24
23
  Dynamic: license-file
25
24
 
26
25
  # sqlite-export-for-ynab
@@ -0,0 +1,7 @@
1
+ aiohttp>=3
2
+ aiopathlib
3
+ aiosqlite
4
+ asyncio-for-ynab~=1.87.0
5
+ fasteners
6
+ rich>=12
7
+ tenacity
@@ -1,10 +0,0 @@
1
- aiohttp>=3
2
- aiopathlib
3
- aiosqlite
4
- asyncio-for-ynab~=1.86.0
5
- fasteners
6
- rich>=10
7
- tenacity
8
-
9
- [:python_version < "3.12"]
10
- typing-extensions