Rename input -> extract
Trying to follow the common ETL pattern naming.
This commit is contained in:
parent
88a29bdf83
commit
d7bdafa62a
@ -25,8 +25,8 @@ from pfbudget.db.model import (
|
||||
Transaction,
|
||||
TransactionCategory,
|
||||
)
|
||||
from pfbudget.input.nordigen import NordigenInput
|
||||
from pfbudget.input.parsers import parse_data
|
||||
from pfbudget.extract.nordigen import NordigenInput
|
||||
from pfbudget.extract.parsers import parse_data
|
||||
|
||||
|
||||
class Manager:
|
||||
|
||||
@ -3,7 +3,7 @@ from abc import ABC, abstractmethod
|
||||
from pfbudget.db.model import Transaction
|
||||
|
||||
|
||||
class Input(ABC):
|
||||
class Extract(ABC):
|
||||
@abstractmethod
|
||||
def parse(self) -> list[Transaction]:
|
||||
return NotImplementedError
|
||||
@ -10,12 +10,12 @@ import uuid
|
||||
import pfbudget.db.model as t
|
||||
from pfbudget.utils.converters import convert
|
||||
|
||||
from .input import Input
|
||||
from .extract import Extract
|
||||
|
||||
dotenv.load_dotenv()
|
||||
|
||||
|
||||
class NordigenInput(Input):
|
||||
class NordigenInput(Extract):
|
||||
redirect_url = "https://murta.dev"
|
||||
|
||||
def __init__(self):
|
||||
@ -77,7 +77,7 @@ def parse_data(filename: Path, args: dict) -> list[Transaction]:
|
||||
options["category"] = args["category"][0]
|
||||
|
||||
if options.get("additional_parser"):
|
||||
parser = getattr(import_module("pfbudget.input.parsers"), bank)
|
||||
parser = getattr(import_module("pfbudget.extract.parsers"), bank)
|
||||
transactions = parser(filename, bank, options).parse()
|
||||
else:
|
||||
transactions = Parser(filename, bank, options).parse()
|
||||
Loading…
x
Reference in New Issue
Block a user