The Manager doesn't need to know that it was called from the CLI, so it now is initialized with the database and performs an action, based on the operation it receives and its parameters. The work isn't finished, some Manager actions are still based on the CLI arguments. The CLI logic and creation of parameters to pass to the manager have been moved to the __main__.py file, which brings it to line to the program being called as a package from the command line.
12 lines
380 B
Python
12 lines
380 B
Python
__all__ = ["argparser", "Manager", "parse_data", "categorize_data"]
|
|
__author__ = "Luís Murta"
|
|
__version__ = "0.1"
|
|
|
|
from pfbudget.common.types import Operation
|
|
from pfbudget.core.categories import categorize_data
|
|
from pfbudget.core.manager import Manager
|
|
from pfbudget.cli.runnable import argparser
|
|
from pfbudget.input.parsers import parse_data
|
|
|
|
import pfbudget.db.model as types
|