148 Commits

Author SHA1 Message Date
14131f50f9
[Refactor] Rename the PostgreSQL file 2023-04-23 00:00:45 +01:00
b1de4d519a
[Refactor] Categorizer now implements Transform
Test adapted for new interface.
Exchanged manual input functionality for throwing an exception.
Removed timer at transformer level.
2023-04-22 22:21:00 +01:00
2c7c527ea9
[Refactor] Creates Tagger transformer
Move the tag rules based transformer to its own class.
Verified with unit tests.
2023-04-22 22:21:00 +01:00
2843c66453
[Refactor] Creates nullifier transformer
Removes nullifier code from Categorizer.
Fixes bug in nullifier rules assertion.
2023-04-22 22:21:00 +01:00
d3c36e30d5
[Refactor] Creates Transform interface
Moves categorizer into transform module.
Puts the categorizer under unit tests.
2023-04-22 22:21:00 +01:00
d6cbb10c47
[Refactor] Move NordigenCredentials to nordigen
Create manager that for now only has the default values from the .env
file.
2023-04-22 22:20:56 +01:00
8710722eb2
[Refactor] Split extractor from Nordigen Client 2023-04-22 22:20:53 +01:00
a3d2d8215e
[Fix] Authentication token missing
Forgot to add the token to the NordigenClient.
Made a test failing, and fixed it.
2023-04-15 15:54:31 +01:00
eb5c1781f0
Get the PSD2 client under testing
Having a comprehension unit testing allows for peace of mind
refactoring.
Changed the PSD2Client constructor and extract method to accept
credentials and banks, respectively.

Create Exception tree for the Extract module.
Adds mocks to the NordigenClient requests' methods.
2023-04-15 13:57:46 +01:00
184628dcfc
Rename Nordigen to PSD2 2023-04-13 18:55:33 +01:00
26cf921a6f
Fix flake8 warnings 2023-04-13 18:38:07 +01:00
d7bdafa62a
Rename input -> extract
Trying to follow the common ETL pattern naming.
2023-04-12 19:51:10 +01:00
5af05c2fa4
Print the transaction ID 2023-04-12 18:23:24 +01:00
2cbf00a939
CLI now allow --no-nulls flag on categorize
Null categorization, which is a major time slog, may now be disabled.
2023-04-12 18:20:57 +01:00
6b26651d22
Option eua now takes id instead of bank name 2023-04-12 18:19:24 +01:00
ed2dda63e9
Allows using rules for the nullying step 2023-02-23 23:24:01 +00:00
1a774e3769
Adds get all transactions operation 2023-02-23 23:23:19 +00:00
dd724b6c28
Export in .csv
Importing is not supported, since there's no way to represent a Null
field in .csv
2023-02-23 23:21:54 +00:00
6f68d971ee
Clear up forge/dismantle logic 2023-02-11 22:48:04 +00:00
f7df033d58
Add start date rule
Rename date to end.
2023-02-11 22:46:41 +00:00
23eb2c80bd
[Interactive] Defines an Interactive class
Affords a cleaner coding over the function.
Renames the runnable.py into what it actually is, the argparser.py.
2023-01-30 22:24:23 +00:00
7453ffbd3a
[Interactive] Adds new format for tags
Now tags can be defined along side categories by starting with :.
E.g. eating out:work:today will classify the transaction with the eating
out category and work and today tags.
2023-01-29 23:48:48 +00:00
da348c4ffb
[Fix] Splitted categories were not being commited 2023-01-29 23:48:27 +00:00
2da721d53c
[Interactive] Adds skip command 2023-01-29 23:48:22 +00:00
f943374ade
[Fix] Splitted transactions do not have category
Adds uncategorized method to the DB client to retrieve transactions w/o
a category AND not splitted.
2023-01-29 23:39:46 +00:00
abff76ad4e
[Interactive] Finish split command 2023-01-29 21:26:22 +00:00
e0fc310ef6
[Fix] Add split default 2023-01-29 21:16:05 +00:00
13709b7a04
[Interactive] Adds new tag 2023-01-29 21:14:49 +00:00
fd24ac3318
Remove unnecessary __init__.pys
and import using submodules in __main__.py
2023-01-23 23:52:20 +00:00
36e7f84bd9
Interactive categorization moved to __main__.py
It didn't make sense to have it inside the manager, it should only be
used to process commands and its paramaters.
2023-01-23 23:31:38 +00:00
5235fcdfc3
Adds business logic for split transaction
Moves split member to be part of parent class and removes it from the
init.
2023-01-23 23:03:42 +00:00
ace5195164
Move selector table back to transactions schema
Change table name originals to transactions and tags to tagged.
2023-01-23 19:36:24 +00:00
ae0a195069
Split tables per different schemas 2023-01-23 19:36:07 +00:00
8760f5a0a4
Export/Import categories and groups 2023-01-23 00:06:36 +00:00
dd0aaa01b8
Export/import for banks 2023-01-22 23:42:32 +00:00
fd6793b4f4
Turned on type checking
and as a result, had to fix a LOT of minor potential future issue.
It also reorders and clears unused imports.

When exporting transactions, it will sort by date.
2023-01-22 20:44:05 +00:00
d4b5f1f11a
Rule inheritance
Both rules, categorries and tags, now derive from the rule base type.
This clears up some type definitions.
2023-01-22 20:22:46 +00:00
6110858d48
Extend export/import to rules
Removes additional bank/all options from the transactions export command
line.
Deletes the brief lived CSV class.
This patch start using pickle for simple export/import, other options
can be added later. An issue with the .csv is the lack of a Null field.
Moves logic to Manager, it is simple enough.
2023-01-15 23:06:20 +00:00
c42a399d3d
Adds the import operation and a timer
to the categorization. We can now import transactions from a csv file,
and later automatically categorize them all.
2023-01-10 23:45:09 +00:00
478bd25190
Subclass the Transaction with multiple children
Each children is essentually a type of transaction. We currently have:
- bank transactions
- money transactions
- split transactions

The table inheritance is implemented as a single table, with a
polymorphic type and Null columns.

Adds a IsSplit interface, which will later be used for the category
views, so as to not repeat transactions.
2023-01-10 23:42:37 +00:00
0d287624c4
Load the default DB from the .env file 2023-01-10 21:35:43 +00:00
c37e7eb37c
Readds manual categorization
Also fixes a categorization bug in the Manager, in the DB client method.
2023-01-10 21:32:08 +00:00
86afa99217
Finish the remaining Nordigen operations
from the Manager POV and the update on the argparses.
Also clears unnecessary methods from the DB client interface.
Better assert information on the __main__.py
2023-01-08 19:41:07 +00:00
9b45ee4817
Update the export operation
to work with the Manager.
Also removes the run method from the runnable.py, since everything is
done in the __main__.py file of the pfbudget module.
2023-01-08 19:41:07 +00:00
9500e808de
Update the parse operation
to coordinate with the manager
2023-01-06 22:05:01 +00:00
55a5b09c45
Fix download, bank, token and renew->eua ops
- Update the download, token and eua cli with the new operations
- Change the bank and nordigen cli to be more in line with the other
  add/modify/remove operations. Also update manager logic.
- Fix some model.py leftovers
- Add __lt__ to Transaction to enable sorting
- Remove universal from child argparsers
2023-01-01 18:46:04 +00:00
071711dbdb
Fix CategoryRule and TagRule initializations
and re-adds the remove option to the modify category rule cli.
2022-12-30 16:09:40 +00:00
7fe5b6bd32
Adds links between transactions
Sometimes transctions are directly related to one another w/o being of
an equal value, e.g. someone pays for the meal w/ the CC, and everyone
pays him/her.

Clear leftover __repr__ methods in the model classes, the dataclass
decorator will create those automatically.
2022-12-19 22:55:04 +00:00
e57859f601
Updates verbosity options
Now it's used by adding -v to the command called. No verbosity=quiet.
2022-12-19 22:02:11 +00:00
e27f2f08cf
Adds rule based tagging of transactions
Tags will work as additional categories to filter/organize by. It makes
sense they can also be rule based.
Since rules are common to both categories and tags, reorganize the
classes in the model. It doesn't affect the DB.
2022-12-19 21:59:41 +00:00