dao-treasury 0.0.41__cp310-cp310-win32.whl → 0.0.70__cp310-cp310-win32.whl

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 (42) hide show
  1. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Expenses.json +551 -0
  2. dao_treasury/.grafana/provisioning/dashboards/breakdowns/Revenue.json +551 -0
  3. dao_treasury/.grafana/provisioning/dashboards/dashboards.yaml +7 -57
  4. dao_treasury/.grafana/provisioning/dashboards/streams/LlamaPay.json +11 -16
  5. dao_treasury/.grafana/provisioning/dashboards/summary/Monthly.json +151 -22
  6. dao_treasury/.grafana/provisioning/dashboards/transactions/Treasury Transactions.json +38 -61
  7. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow (Including Unsorted).json +122 -149
  8. dao_treasury/.grafana/provisioning/dashboards/treasury/Cashflow.json +87 -100
  9. dao_treasury/.grafana/provisioning/dashboards/treasury/Current Treasury Assets.json +981 -0
  10. dao_treasury/.grafana/provisioning/dashboards/treasury/Historical Treasury Balances.json +2989 -0
  11. dao_treasury/.grafana/provisioning/dashboards/treasury/Operating Cashflow.json +64 -78
  12. dao_treasury/_docker.cp310-win32.pyd +0 -0
  13. dao_treasury/_docker.py +24 -20
  14. dao_treasury/_nicknames.cp310-win32.pyd +0 -0
  15. dao_treasury/_wallet.cp310-win32.pyd +0 -0
  16. dao_treasury/constants.cp310-win32.pyd +0 -0
  17. dao_treasury/constants.py +5 -0
  18. dao_treasury/db.py +49 -3
  19. dao_treasury/docker-compose.yaml +1 -1
  20. dao_treasury/main.py +39 -1
  21. dao_treasury/sorting/__init__.cp310-win32.pyd +0 -0
  22. dao_treasury/sorting/_matchers.cp310-win32.pyd +0 -0
  23. dao_treasury/sorting/_rules.cp310-win32.pyd +0 -0
  24. dao_treasury/sorting/factory.cp310-win32.pyd +0 -0
  25. dao_treasury/sorting/rule.cp310-win32.pyd +0 -0
  26. dao_treasury/sorting/rule.py +8 -10
  27. dao_treasury/sorting/rules/__init__.cp310-win32.pyd +0 -0
  28. dao_treasury/sorting/rules/ignore/__init__.cp310-win32.pyd +0 -0
  29. dao_treasury/sorting/rules/ignore/llamapay.cp310-win32.pyd +0 -0
  30. dao_treasury/streams/__init__.cp310-win32.pyd +0 -0
  31. dao_treasury/streams/llamapay.cp310-win32.pyd +0 -0
  32. dao_treasury/treasury.py +4 -2
  33. dao_treasury/types.cp310-win32.pyd +0 -0
  34. {dao_treasury-0.0.41.dist-info → dao_treasury-0.0.70.dist-info}/METADATA +18 -3
  35. dao_treasury-0.0.70.dist-info/RECORD +54 -0
  36. dao_treasury-0.0.70.dist-info/top_level.txt +2 -0
  37. dao_treasury__mypyc.cp310-win32.pyd +0 -0
  38. bf2b4fe1f86ad2ea158b__mypyc.cp310-win32.pyd +0 -0
  39. dao_treasury/.grafana/provisioning/dashboards/treasury/Treasury.json +0 -2018
  40. dao_treasury-0.0.41.dist-info/RECORD +0 -51
  41. dao_treasury-0.0.41.dist-info/top_level.txt +0 -2
  42. {dao_treasury-0.0.41.dist-info → dao_treasury-0.0.70.dist-info}/WHEEL +0 -0
@@ -18,12 +18,13 @@
18
18
  "editable": true,
19
19
  "fiscalYearStartMonth": 0,
20
20
  "graphTooltip": 1,
21
+ "id": 5,
21
22
  "links": [],
22
- "liveNow": false,
23
23
  "panels": [
24
24
  {
25
25
  "datasource": "SQLite",
26
26
  "fieldConfig": {
27
+ "unit": "currencyUSD",
27
28
  "defaults": {
28
29
  "color": {
29
30
  "mode": "thresholds"
@@ -34,7 +35,7 @@
34
35
  "steps": [
35
36
  {
36
37
  "color": "green",
37
- "value": null
38
+ "value": 0
38
39
  },
39
40
  {
40
41
  "color": "red",
@@ -57,16 +58,17 @@
57
58
  "graphMode": "area",
58
59
  "justifyMode": "auto",
59
60
  "orientation": "auto",
61
+ "percentChangeColorMode": "standard",
60
62
  "reduceOptions": {
61
- "calcs": [
62
- "lastNotNull"
63
- ],
63
+ "calcs": ["lastNotNull"],
64
64
  "fields": "",
65
65
  "values": false
66
66
  },
67
- "textMode": "auto"
67
+ "showPercentChange": false,
68
+ "textMode": "auto",
69
+ "wideLayout": true
68
70
  },
69
- "pluginVersion": "10.2.0",
71
+ "pluginVersion": "12.1.1",
70
72
  "targets": [
71
73
  {
72
74
  "datasource": "SQLite",
@@ -74,18 +76,17 @@
74
76
  "queryType": "table",
75
77
  "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
76
78
  "refId": "A",
77
- "timeColumns": [
78
- "time",
79
- "ts"
80
- ]
79
+ "timeColumns": ["time", "ts"]
81
80
  }
82
81
  ],
83
82
  "title": "Revenue",
84
- "type": "stat"
83
+ "type": "stat",
84
+ "description": "Displays the total value of all transactions sorted as Revenue for the selected period."
85
85
  },
86
86
  {
87
87
  "datasource": "SQLite",
88
88
  "fieldConfig": {
89
+ "unit": "currencyUSD",
89
90
  "defaults": {
90
91
  "color": {
91
92
  "mode": "thresholds"
@@ -96,7 +97,7 @@
96
97
  "steps": [
97
98
  {
98
99
  "color": "green",
99
- "value": null
100
+ "value": 0
100
101
  },
101
102
  {
102
103
  "color": "red",
@@ -119,16 +120,17 @@
119
120
  "graphMode": "area",
120
121
  "justifyMode": "auto",
121
122
  "orientation": "auto",
123
+ "percentChangeColorMode": "standard",
122
124
  "reduceOptions": {
123
- "calcs": [
124
- "lastNotNull"
125
- ],
125
+ "calcs": ["lastNotNull"],
126
126
  "fields": "",
127
127
  "values": false
128
128
  },
129
- "textMode": "auto"
129
+ "showPercentChange": false,
130
+ "textMode": "auto",
131
+ "wideLayout": true
130
132
  },
131
- "pluginVersion": "10.2.0",
133
+ "pluginVersion": "12.1.1",
132
134
  "targets": [
133
135
  {
134
136
  "datasource": "SQLite",
@@ -136,18 +138,17 @@
136
138
  "queryType": "table",
137
139
  "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
138
140
  "refId": "A",
139
- "timeColumns": [
140
- "time",
141
- "ts"
142
- ]
141
+ "timeColumns": ["time", "ts"]
143
142
  }
144
143
  ],
145
144
  "title": "Expenses",
146
- "type": "stat"
145
+ "type": "stat",
146
+ "description": "Displays the total value of all transactions sorted as Expenses for the selected period."
147
147
  },
148
148
  {
149
149
  "datasource": "SQLite",
150
150
  "fieldConfig": {
151
+ "unit": "currencyUSD",
151
152
  "defaults": {
152
153
  "color": {
153
154
  "mode": "thresholds"
@@ -158,7 +159,7 @@
158
159
  "steps": [
159
160
  {
160
161
  "color": "green",
161
- "value": null
162
+ "value": 0
162
163
  },
163
164
  {
164
165
  "color": "red",
@@ -181,16 +182,17 @@
181
182
  "graphMode": "area",
182
183
  "justifyMode": "auto",
183
184
  "orientation": "auto",
185
+ "percentChangeColorMode": "standard",
184
186
  "reduceOptions": {
185
- "calcs": [
186
- "lastNotNull"
187
- ],
187
+ "calcs": ["lastNotNull"],
188
188
  "fields": "",
189
189
  "values": false
190
190
  },
191
- "textMode": "auto"
191
+ "showPercentChange": false,
192
+ "textMode": "auto",
193
+ "wideLayout": true
192
194
  },
193
- "pluginVersion": "10.2.0",
195
+ "pluginVersion": "12.1.1",
194
196
  "targets": [
195
197
  {
196
198
  "datasource": "SQLite",
@@ -198,18 +200,17 @@
198
200
  "queryType": "table",
199
201
  "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Cost of Revenue' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
200
202
  "refId": "A",
201
- "timeColumns": [
202
- "time",
203
- "ts"
204
- ]
203
+ "timeColumns": ["time", "ts"]
205
204
  }
206
205
  ],
207
206
  "title": "Cost of Revenue",
208
- "type": "stat"
207
+ "type": "stat",
208
+ "description": "Displays the total value of all transactions sorted as Cost of Revenue for the selected period."
209
209
  },
210
210
  {
211
211
  "datasource": "SQLite",
212
212
  "fieldConfig": {
213
+ "unit": "currencyUSD",
213
214
  "defaults": {
214
215
  "color": {
215
216
  "mode": "thresholds"
@@ -220,7 +221,7 @@
220
221
  "steps": [
221
222
  {
222
223
  "color": "green",
223
- "value": null
224
+ "value": 0
224
225
  },
225
226
  {
226
227
  "color": "red",
@@ -243,16 +244,17 @@
243
244
  "graphMode": "area",
244
245
  "justifyMode": "auto",
245
246
  "orientation": "auto",
247
+ "percentChangeColorMode": "standard",
246
248
  "reduceOptions": {
247
- "calcs": [
248
- "lastNotNull"
249
- ],
249
+ "calcs": ["lastNotNull"],
250
250
  "fields": "",
251
251
  "values": false
252
252
  },
253
- "textMode": "auto"
253
+ "showPercentChange": false,
254
+ "textMode": "auto",
255
+ "wideLayout": true
254
256
  },
255
- "pluginVersion": "10.2.0",
257
+ "pluginVersion": "12.1.1",
256
258
  "targets": [
257
259
  {
258
260
  "datasource": "SQLite",
@@ -260,18 +262,17 @@
260
262
  "queryType": "table",
261
263
  "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Income' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
262
264
  "refId": "A",
263
- "timeColumns": [
264
- "time",
265
- "ts"
266
- ]
265
+ "timeColumns": ["time", "ts"]
267
266
  }
268
267
  ],
269
268
  "title": "Other Income",
270
- "type": "stat"
269
+ "type": "stat",
270
+ "description": "Displays the total value of all transactions sorted as Other Income for the selected period."
271
271
  },
272
272
  {
273
273
  "datasource": "SQLite",
274
274
  "fieldConfig": {
275
+ "unit": "currencyUSD",
275
276
  "defaults": {
276
277
  "color": {
277
278
  "mode": "thresholds"
@@ -282,7 +283,7 @@
282
283
  "steps": [
283
284
  {
284
285
  "color": "green",
285
- "value": null
286
+ "value": 0
286
287
  },
287
288
  {
288
289
  "color": "red",
@@ -305,16 +306,17 @@
305
306
  "graphMode": "area",
306
307
  "justifyMode": "auto",
307
308
  "orientation": "auto",
309
+ "percentChangeColorMode": "standard",
308
310
  "reduceOptions": {
309
- "calcs": [
310
- "lastNotNull"
311
- ],
311
+ "calcs": ["lastNotNull"],
312
312
  "fields": "",
313
313
  "values": false
314
314
  },
315
- "textMode": "auto"
315
+ "showPercentChange": false,
316
+ "textMode": "auto",
317
+ "wideLayout": true
316
318
  },
317
- "pluginVersion": "10.2.0",
319
+ "pluginVersion": "12.1.1",
318
320
  "targets": [
319
321
  {
320
322
  "datasource": "SQLite",
@@ -322,19 +324,18 @@
322
324
  "queryType": "table",
323
325
  "rawQueryText": "SELECT SUM(t.value_usd) AS total_revenue FROM general_ledger t JOIN txgroup_hierarchy gh USING (txgroup_id) WHERE gh.top_category = 'Other Expenses' AND t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
324
326
  "refId": "A",
325
- "timeColumns": [
326
- "time",
327
- "ts"
328
- ]
327
+ "timeColumns": ["time", "ts"]
329
328
  }
330
329
  ],
331
330
  "title": "Other Expenses",
332
- "type": "stat"
331
+ "type": "stat",
332
+ "description": "Displays the total value of all transactions sorted as Other Expenses for the selected period."
333
333
  },
334
334
  {
335
335
  "datasource": "SQLite",
336
- "description": "",
336
+ "description": "Shows the net total cashflow (all Revenue and Other Income minus all Expenses, Cost of Revenue, and Other Expenses) for the selected period.",
337
337
  "fieldConfig": {
338
+ "unit": "currencyUSD",
338
339
  "defaults": {
339
340
  "color": {
340
341
  "mode": "thresholds"
@@ -345,7 +346,7 @@
345
346
  "steps": [
346
347
  {
347
348
  "color": "green",
348
- "value": null
349
+ "value": 0
349
350
  },
350
351
  {
351
352
  "color": "red",
@@ -368,16 +369,17 @@
368
369
  "graphMode": "area",
369
370
  "justifyMode": "auto",
370
371
  "orientation": "auto",
372
+ "percentChangeColorMode": "standard",
371
373
  "reduceOptions": {
372
- "calcs": [
373
- "lastNotNull"
374
- ],
374
+ "calcs": ["lastNotNull"],
375
375
  "fields": "",
376
376
  "values": false
377
377
  },
378
- "textMode": "auto"
378
+ "showPercentChange": false,
379
+ "textMode": "auto",
380
+ "wideLayout": true
379
381
  },
380
- "pluginVersion": "10.2.0",
382
+ "pluginVersion": "12.1.1",
381
383
  "targets": [
382
384
  {
383
385
  "datasource": "SQLite",
@@ -385,10 +387,7 @@
385
387
  "queryType": "table",
386
388
  "rawQueryText": "SELECT (\n SUM(CASE WHEN gh.top_category = 'Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Cost of Revenue' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Expenses' THEN t.value_usd ELSE 0 END)\n + SUM(CASE WHEN gh.top_category = 'Other Income' THEN t.value_usd ELSE 0 END)\n - SUM(CASE WHEN gh.top_category = 'Other Expenses' THEN t.value_usd ELSE 0 END)\n) AS total_net\nFROM general_ledger t\nJOIN txgroup_hierarchy gh USING (txgroup_id)\nWHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000",
387
389
  "refId": "A",
388
- "timeColumns": [
389
- "time",
390
- "ts"
391
- ]
390
+ "timeColumns": ["time", "ts"]
392
391
  }
393
392
  ],
394
393
  "title": "Sorted Total",
@@ -396,8 +395,9 @@
396
395
  },
397
396
  {
398
397
  "datasource": "SQLite",
399
- "description": "",
398
+ "description": "Time series chart of all sorted cashflows, grouped by category, for the selected period. Shows Total Revenue, Total Expenses, and Net for each week, helping to analyze trends in the DAO's financial flows over time.",
400
399
  "fieldConfig": {
400
+ "unit": "currencyUSD",
401
401
  "defaults": {
402
402
  "color": {
403
403
  "mode": "palette-classic"
@@ -409,6 +409,7 @@
409
409
  "axisLabel": "",
410
410
  "axisPlacement": "auto",
411
411
  "barAlignment": 0,
412
+ "barWidthFactor": 0.6,
412
413
  "drawStyle": "bars",
413
414
  "fillOpacity": 70,
414
415
  "gradientMode": "none",
@@ -440,7 +441,7 @@
440
441
  "steps": [
441
442
  {
442
443
  "color": "green",
443
- "value": null
444
+ "value": 0
444
445
  },
445
446
  {
446
447
  "color": "red",
@@ -490,10 +491,12 @@
490
491
  "showLegend": true
491
492
  },
492
493
  "tooltip": {
494
+ "hideZeros": false,
493
495
  "mode": "single",
494
496
  "sort": "none"
495
497
  }
496
498
  },
499
+ "pluginVersion": "12.1.1",
497
500
  "targets": [
498
501
  {
499
502
  "datasource": "SQLite",
@@ -501,9 +504,7 @@
501
504
  "queryType": "table",
502
505
  "rawQueryText": "SELECT t.timestamp, SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) AS \"Total Revenue\", SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN t.value_usd ELSE 0 END) * -1 AS \"Total Expenses\", SUM(CASE WHEN gh.top_category in ('Revenue', 'Other Income') THEN t.value_usd ELSE 0 END) - SUM(CASE WHEN gh.top_category in ('Cost of Revenue','Expenses','Other Expenses') THEN t.value_usd ELSE 0 END) AS \"Net\" FROM general_ledger AS t JOIN txgroup_hierarchy gh ON t.txgroup_id = gh.txgroup_id WHERE t.timestamp >= $__from/1000 AND t.timestamp <= $__to/1000 GROUP BY timestamp ORDER BY timestamp;",
503
506
  "refId": "A",
504
- "timeColumns": [
505
- "timestamp"
506
- ]
507
+ "timeColumns": ["timestamp"]
507
508
  }
508
509
  ],
509
510
  "title": "Weekly Cashflow",
@@ -522,6 +523,7 @@
522
523
  "options": {
523
524
  "conversions": [
524
525
  {
526
+ "dateFormat": "YYYY-WW",
525
527
  "destinationType": "time",
526
528
  "targetField": "timestamp"
527
529
  }
@@ -534,39 +536,27 @@
534
536
  "options": {
535
537
  "fields": {
536
538
  "Cost of Revenue": {
537
- "aggregations": [
538
- "sum"
539
- ],
539
+ "aggregations": ["sum"],
540
540
  "operation": "aggregate"
541
541
  },
542
542
  "Expenses": {
543
- "aggregations": [
544
- "sum"
545
- ],
543
+ "aggregations": ["sum"],
546
544
  "operation": "aggregate"
547
545
  },
548
546
  "Net": {
549
- "aggregations": [
550
- "sum"
551
- ],
547
+ "aggregations": ["sum"],
552
548
  "operation": "aggregate"
553
549
  },
554
550
  "Other Expenses": {
555
- "aggregations": [
556
- "sum"
557
- ],
551
+ "aggregations": ["sum"],
558
552
  "operation": "aggregate"
559
553
  },
560
554
  "Other Income": {
561
- "aggregations": [
562
- "sum"
563
- ],
555
+ "aggregations": ["sum"],
564
556
  "operation": "aggregate"
565
557
  },
566
558
  "Revenue": {
567
- "aggregations": [
568
- "sum"
569
- ],
559
+ "aggregations": ["sum"],
570
560
  "operation": "aggregate"
571
561
  },
572
562
  "Timestamp": {
@@ -574,15 +564,11 @@
574
564
  "operation": "groupby"
575
565
  },
576
566
  "Total Expenses": {
577
- "aggregations": [
578
- "sum"
579
- ],
567
+ "aggregations": ["sum"],
580
568
  "operation": "aggregate"
581
569
  },
582
570
  "Total Revenue": {
583
- "aggregations": [
584
- "sum"
585
- ],
571
+ "aggregations": ["sum"],
586
572
  "operation": "aggregate"
587
573
  },
588
574
  "timestamp": {
@@ -596,9 +582,10 @@
596
582
  "type": "timeseries"
597
583
  }
598
584
  ],
585
+ "preload": false,
599
586
  "refresh": "",
600
- "schemaVersion": 38,
601
- "tags": [],
587
+ "schemaVersion": 41,
588
+ "tags": ["cashflow"],
602
589
  "templating": {
603
590
  "list": []
604
591
  },
@@ -609,7 +596,7 @@
609
596
  "timepicker": {},
610
597
  "timezone": "",
611
598
  "title": "Total Cashflow Summary",
599
+ "description": "Shows all sorted cashflows, including Revenue, Cost of Revenue, Expenses, Other Income, and Other Expense, but omits transactions pending categorization. Useful for analyzing the DAO's complete sorted financial flows.",
612
600
  "uid": "7e2b1c8a-4e2d-4b7a-9c1a-2f8e6b7d9c3f",
613
- "version": 1,
614
- "weekStart": ""
601
+ "version": 7
615
602
  }