1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

CSV Imports Overhaul (Transactions, Trades, Accounts, and Mint import support) (#1209)

* Remove stale 1.0 import logic and model

* Fresh start

* Checkpoint before removing nav

* First working prototype

* Add trade, account, and mint import flows

* Basic working version with tests

* System tests for each import type

* Clean up mappings flow

* Clean up PR, refactor stale code, tests

* Add back row validations

* Row validations

* Fix import job test

* Fix import navigation

* Fix mint import configuration form

* Currency preset for new accounts
This commit is contained in:
Zach Gollwitzer 2024-10-01 10:47:59 -04:00 committed by GitHub
parent 23786b444a
commit 398b246965
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
103 changed files with 2420 additions and 1689 deletions

View file

@ -0,0 +1,5 @@
type,name,amount,currency
Checking,Main Checking Account,5000.00,USD
Savings,Emergency Fund,10000.00,USD
Credit Card,Rewards Credit Card,-1500.00,USD
Investment,Retirement Portfolio,75000.00,USD
1 type name amount currency
2 Checking Main Checking Account 5000.00 USD
3 Savings Emergency Fund 10000.00 USD
4 Credit Card Rewards Credit Card -1500.00 USD
5 Investment Retirement Portfolio 75000.00 USD

View file

@ -0,0 +1,3 @@
name,age
"John Doe,23
"Jane Doe",25
Can't render this file because it contains an unexpected character in line 3 and column 1.

11
test/fixtures/files/imports/mint.csv vendored Normal file
View file

@ -0,0 +1,11 @@
Date,Description,Original Description,Amount,Transaction Type,Category,Account Name,Labels,Notes
05/01/2023,Grocery Store,SAFEWAY #1234,78.32,debit,Groceries,Checking Account,,
05/02/2023,Gas Station,SHELL OIL 57442893,-45.67,credit,Gas & Fuel,Credit Card,,
05/03/2023,Monthly Rent,AUTOPAY MORTGAGE,1500.00,debit,Mortgage & Rent,Checking Account,,
05/04/2023,Paycheck,ACME CORP PAYROLL,-2500.00,credit,Paycheck,Checking Account,Income,
05/05/2023,Restaurant,CHIPOTLE MEX GRILL,15.75,debit,Restaurants,Credit Card,,
05/06/2023,Online Shopping,AMAZON.COM,32.99,debit,Shopping,Credit Card,,
05/07/2023,Utility Bill,CITY POWER & LIGHT,89.50,debit,Utilities,Checking Account,,
05/08/2023,Coffee Shop,STARBUCKS,4.25,debit,Coffee Shops,Credit Card,,
05/09/2023,Gym Membership,FITNESS WORLD,49.99,debit,Gym,Checking Account,Health,Monthly membership
05/10/2023,Movie Theater,AMC THEATERS #123,24.50,debit,Movies & DVDs,Credit Card,Entertainment,
1 Date Description Original Description Amount Transaction Type Category Account Name Labels Notes
2 05/01/2023 Grocery Store SAFEWAY #1234 78.32 debit Groceries Checking Account
3 05/02/2023 Gas Station SHELL OIL 57442893 -45.67 credit Gas & Fuel Credit Card
4 05/03/2023 Monthly Rent AUTOPAY MORTGAGE 1500.00 debit Mortgage & Rent Checking Account
5 05/04/2023 Paycheck ACME CORP PAYROLL -2500.00 credit Paycheck Checking Account Income
6 05/05/2023 Restaurant CHIPOTLE MEX GRILL 15.75 debit Restaurants Credit Card
7 05/06/2023 Online Shopping AMAZON.COM 32.99 debit Shopping Credit Card
8 05/07/2023 Utility Bill CITY POWER & LIGHT 89.50 debit Utilities Checking Account
9 05/08/2023 Coffee Shop STARBUCKS 4.25 debit Coffee Shops Credit Card
10 05/09/2023 Gym Membership FITNESS WORLD 49.99 debit Gym Checking Account Health Monthly membership
11 05/10/2023 Movie Theater AMC THEATERS #123 24.50 debit Movies & DVDs Credit Card Entertainment

11
test/fixtures/files/imports/trades.csv vendored Normal file
View file

@ -0,0 +1,11 @@
date,ticker,qty,price,amount,account,name
2023-01-15,AAPL,10,150.25,1502.50,Brokerage Account,Buy Apple Inc
2023-02-03,GOOGL,5,2100.75,10503.75,Retirement Account,Buy Alphabet Inc
2023-03-10,MSFT,15,245.50,3682.50,Brokerage Account,Buy Microsoft Corp
2023-04-05,AMZN,8,3200.00,25600.00,Brokerage Account,Buy Amazon.com Inc
2023-05-20,TSLA,20,180.75,3615.00,Retirement Account,Buy Tesla Inc
2023-06-15,AAPL,-5,170.50,-852.50,Brokerage Account,Sell Apple Inc
2023-07-02,GOOGL,-2,2250.00,-4500.00,Retirement Account,Sell Alphabet Inc
2023-08-18,NVDA,12,450.25,5403.00,Brokerage Account,Buy NVIDIA Corp
2023-09-07,MSFT,-7,300.75,-2105.25,Brokerage Account,Sell Microsoft Corp
2023-10-01,META,25,310.50,7762.50,Retirement Account,Buy Meta Platforms Inc
1 date ticker qty price amount account name
2 2023-01-15 AAPL 10 150.25 1502.50 Brokerage Account Buy Apple Inc
3 2023-02-03 GOOGL 5 2100.75 10503.75 Retirement Account Buy Alphabet Inc
4 2023-03-10 MSFT 15 245.50 3682.50 Brokerage Account Buy Microsoft Corp
5 2023-04-05 AMZN 8 3200.00 25600.00 Brokerage Account Buy Amazon.com Inc
6 2023-05-20 TSLA 20 180.75 3615.00 Retirement Account Buy Tesla Inc
7 2023-06-15 AAPL -5 170.50 -852.50 Brokerage Account Sell Apple Inc
8 2023-07-02 GOOGL -2 2250.00 -4500.00 Retirement Account Sell Alphabet Inc
9 2023-08-18 NVDA 12 450.25 5403.00 Brokerage Account Buy NVIDIA Corp
10 2023-09-07 MSFT -7 300.75 -2105.25 Brokerage Account Sell Microsoft Corp
11 2023-10-01 META 25 310.50 7762.50 Retirement Account Buy Meta Platforms Inc

View file

@ -0,0 +1,10 @@
Date,Name,Amount,Category,Tags,Account,Notes
2023-05-01,Grocery Store,-89.75,Food,Groceries,Checking Account,Weekly grocery shopping
2023-05-03,Electric Company,-120.50,Utilities,Bills|Home,Credit Card,Monthly electricity bill
2023-05-05,Coffee Shop,-4.25,Food,Coffee|Work,Debit Card,Morning coffee
2023-05-07,Gas Station,-45.00,Transportation,Car|Fuel,Credit Card,Fill up car tank
2023-05-10,Online Retailer,-79.99,Shopping,Clothing,Credit Card,New shoes purchase
2023-05-12,Restaurant,-65.30,Food,Dining Out|Date Night,Checking Account,Dinner with partner
2023-05-15,Mobile Phone Provider,-55.00,Utilities,Bills|Communication,Debit Card,Monthly phone bill
2023-05-18,Movie Theater,-24.00,Entertainment,Movies,Credit Card,Weekend movie night
2023-05-20,Pharmacy,-32.50,Health,Medicine,Debit Card,Prescription refill
1 Date Name Amount Category Tags Account Notes
2 2023-05-01 Grocery Store -89.75 Food Groceries Checking Account Weekly grocery shopping
3 2023-05-03 Electric Company -120.50 Utilities Bills|Home Credit Card Monthly electricity bill
4 2023-05-05 Coffee Shop -4.25 Food Coffee|Work Debit Card Morning coffee
5 2023-05-07 Gas Station -45.00 Transportation Car|Fuel Credit Card Fill up car tank
6 2023-05-10 Online Retailer -79.99 Shopping Clothing Credit Card New shoes purchase
7 2023-05-12 Restaurant -65.30 Food Dining Out|Date Night Checking Account Dinner with partner
8 2023-05-15 Mobile Phone Provider -55.00 Utilities Bills|Communication Debit Card Monthly phone bill
9 2023-05-18 Movie Theater -24.00 Entertainment Movies Credit Card Weekend movie night
10 2023-05-20 Pharmacy -32.50 Health Medicine Debit Card Prescription refill

3
test/fixtures/files/imports/valid.csv vendored Normal file
View file

@ -0,0 +1,3 @@
date,Custom Name Column,category,amount
invalid_date,Starbucks drink,Food,-20.50
2024-01-01,Amazon purchase,Shopping,-89.50
1 date Custom Name Column category amount
2 invalid_date Starbucks drink Food -20.50
3 2024-01-01 Amazon purchase Shopping -89.50