Skip to content

Commit a3be1f0

Browse files
author
adam
committed
updates for Python3 compatability + added option for expense category input
1 parent 3afb19c commit a3be1f0

File tree

3 files changed

+54
-4
lines changed

3 files changed

+54
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: python
22
python:
3-
- '2.7'
3+
- '3.10'
44
install: pip install -r setup/requirements.txt
55
script: cd test; nosetests
66
before_install:

src/groupsplit.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,12 @@ def dump_cats():
367367
if 'subcategories' in item:
368368
for subcategory in item['subcategories']:
369369
result.append({'id': subcategory['id'], 'name': subcategory['name']})
370-
file_name = 'all_categories_list.csv'
370+
file_name = '../test/all_categories_list.csv'
371371
with open(file_name, 'w', newline='') as csv_file:
372372
fieldnames = ['id', 'name']
373373
writer = csv.DictWriter(csv_file, fieldnames=fieldnames)
374374
writer.writeheader()
375375
writer.writerows(result)
376376

377377
if __name__ == "__main__":
378-
#main()
379-
dump_cats()
378+
main()

test/all_categories_list.csv

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
id,name
2+
1,Utilities
3+
48,Cleaning
4+
5,Electricity
5+
6,Heat/gas
6+
11,Other
7+
37,Trash
8+
8,TV/Phone/Internet
9+
7,Water
10+
2,Uncategorized
11+
18,General
12+
19,Entertainment
13+
20,Games
14+
21,Movies
15+
22,Music
16+
23,Other
17+
24,Sports
18+
25,Food and drink
19+
13,Dining out
20+
12,Groceries
21+
38,Liquor
22+
26,Other
23+
27,Home
24+
39,Electronics
25+
16,Furniture
26+
14,Household supplies
27+
17,Maintenance
28+
4,Mortgage
29+
28,Other
30+
29,Pets
31+
3,Rent
32+
30,Services
33+
31,Transportation
34+
46,Bicycle
35+
32,Bus/train
36+
15,Car
37+
33,Gas/fuel
38+
47,Hotel
39+
34,Other
40+
9,Parking
41+
35,Plane
42+
36,Taxi
43+
40,Life
44+
50,Childcare
45+
41,Clothing
46+
49,Education
47+
42,Gifts
48+
10,Insurance
49+
43,Medical expenses
50+
44,Other
51+
45,Taxes

0 commit comments

Comments
 (0)