9 Commits

Author SHA1 Message Date
471331ffc9
Categories rules for rule-based categorization
This patch extends the categories_rules with a rule for each field of a
transaction.

It also changes the ORM classes to behave as dataclasses again.
2022-12-09 19:38:12 +00:00
63d6a2aab7
Finishes category schedule implementation 2022-12-08 20:15:48 +00:00
72974c90aa
Operations refactor
Unify the manager operations under one enum.
Start cleaning up the argparser structure to easily add new operations.
2022-12-08 16:15:53 +00:00
9d33df78a8
Adds command line option to add/remove categories
Implements the argument parser, the manager logic and the DB client
methods.
Encapsulates the DbClient connection under the _db attribute on the
manager.

Adds verbose option to enable ORM increased logging.
2022-12-08 00:25:56 +00:00
882a77d24c
[Refactor] CLI argparser passes options to Manager
Move all BL to the manager. The ArgParser now only parses the CLI
arguments and creates a command which contains which command was run. In
turn, this information is passed to the manager, which will run the
appropriate business logic.

This will make it easier to add new options, separating the parsing of
the CLI options from the implementation of the logic. It also simplifies
any future effort in adding a different input (e.g. GUI).

Warning: some function were commented out, this is only a tracer bullet.
2022-12-04 17:48:28 +00:00
647db5e86f
Fixes convertion to decimal of transactions amount 2022-11-22 22:07:47 +00:00
c41bfb4bdf
Add offset option to bank
A bank had an offset on the date of the transactions...
It also passes the interal Bank type to the converter, to access it's
additional options before converting.
2022-11-22 22:07:04 +00:00
cfcc182f35
Fix converters
Python's single dispatch can´t use type aliases and lists of classes.
All converters now work on a class, and lists need to be generated
inplace and call the converter for each item.

Adds the bank class both to the DB schema and the common types.
2022-10-09 22:44:53 +01:00
e2f731a961
Moves input dir up a level
Also imports utils in correspondent __init__.py file.
2022-10-09 22:17:33 +01:00