diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3bc3f5..01f1611 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,10 +43,10 @@ repos: - Babel - aiohttp - aiosqlite - - asyncio-for-ynab~=1.83.0 + - asyncio-for-ynab~=1.84.0 - pyecharts - rich>=10 - - sqlite-export-for-ynab~=2.7.1 + - sqlite-export-for-ynab~=2.8.0 - repo: https://github.com/zizmorcore/zizmor-pre-commit rev: 9257c6050c0261b8c57e712f632dc4a8010109a9 # frozen: v1.25.2 hooks: diff --git a/manager_for_ynab/sankey/sankey.sql b/manager_for_ynab/sankey/sankey.sql index 92187e8..d43e3f7 100644 --- a/manager_for_ynab/sankey/sankey.sql +++ b/manager_for_ynab/sankey/sankey.sql @@ -5,6 +5,7 @@ WITH filtered_transactions AS ( , category_id , category_name , amount + , internal , COALESCE(payee_name, '') AS payee_name FROM flat_transactions WHERE @@ -41,9 +42,7 @@ WITH filtered_transactions AS ( , category_name AS payee_name , SUM(amount) AS amount FROM filtered_transactions - WHERE - category_group_name != 'Internal Master Category' - AND category_name != 'Inflow: Ready to Assign' + WHERE NOT internal GROUP BY category_group_id , category_group_name diff --git a/setup.cfg b/setup.cfg index 074becf..125c37c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,11 +22,11 @@ install_requires = Babel aiohttp aiosqlite - asyncio-for-ynab~=1.83.0 + asyncio-for-ynab~=1.84.0 prompt-toolkit pyecharts rich>=10 - sqlite-export-for-ynab~=2.7.1 + sqlite-export-for-ynab~=2.8.0 python_requires = >=3.14 [options.entry_points] diff --git a/tests/add_transaction/test.py b/tests/add_transaction/test.py index b1588dd..222db81 100644 --- a/tests/add_transaction/test.py +++ b/tests/add_transaction/test.py @@ -221,6 +221,7 @@ async def test_move_funds_moves_credit_card_payment_back_to_ready_to_assign( category_group_name="Credit Card Payments", name="Credit Card", hidden=False, + internal=False, budgeted=30000, activity=0, balance=0, @@ -484,6 +485,7 @@ async def test_move_funds_reports_returned_credit_card_payment( category_group_name="Credit Card Payments", name="Credit Card", hidden=False, + internal=False, budgeted=30000, activity=0, balance=0, diff --git a/tests/sankey/seed.sql b/tests/sankey/seed.sql index f93a6c5..c66356c 100644 --- a/tests/sankey/seed.sql +++ b/tests/sankey/seed.sql @@ -7,6 +7,7 @@ CREATE TABLE flat_transactions ( , cleared TEXT , "date" TEXT , payee_name TEXT + , internal BOOLEAN ) ; @@ -20,6 +21,7 @@ INSERT INTO flat_transactions VALUES , 'reconciled' , '2026-04-01' , 'Employer' + , TRUE ) , ( 'bills-group' @@ -30,6 +32,7 @@ INSERT INTO flat_transactions VALUES , 'reconciled' , '2026-04-02' , 'Landlord' + , FALSE ) , ( 'food-group' @@ -40,6 +43,7 @@ INSERT INTO flat_transactions VALUES , 'Reconciled' , '2026-04-03' , 'Market' + , FALSE ) , ( 'food-group' @@ -50,6 +54,7 @@ INSERT INTO flat_transactions VALUES , 'cleared' , '2026-04-03' , 'Cafe' + , FALSE ) , ( 'gifts-group' @@ -60,6 +65,7 @@ INSERT INTO flat_transactions VALUES , 'reconciled' , '2026-04-03' , 'Maria Oculam' + , FALSE ) , ( 'gifts-group' @@ -70,6 +76,7 @@ INSERT INTO flat_transactions VALUES , 'reconciled' , '2026-04-04' , 'Gift Shop' + , FALSE ) , ( 'internal-group' @@ -80,6 +87,7 @@ INSERT INTO flat_transactions VALUES , 'reconciled' , '2026-04-03' , 'Hidden' + , TRUE ) , ( 'bills-group' @@ -90,6 +98,7 @@ INSERT INTO flat_transactions VALUES , 'reconciled' , '2026-05-01' , 'Landlord' + , FALSE ) , ( 'inflow-group' @@ -100,5 +109,6 @@ INSERT INTO flat_transactions VALUES , 'reconciled' , '2026-04-04' , 'Starting Balance' + , TRUE ) ; diff --git a/tests/zero_out/fixtures.py b/tests/zero_out/fixtures.py index 0f50ac4..020eb8e 100644 --- a/tests/zero_out/fixtures.py +++ b/tests/zero_out/fixtures.py @@ -51,6 +51,7 @@ def build( id=group_id, name=name, hidden=False, + internal=False, deleted=False, categories=[ Category( @@ -59,6 +60,7 @@ def build( category_group_name=name, name=category_name, hidden=False, + internal=False, budgeted=0, activity=0, balance=0,