feat(taskflow): add core task API, storage persistence, csv export, stats page, and test coverage
This commit is contained in:
16
app/storage/factory.py
Normal file
16
app/storage/factory.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from app.storage.repository import JsonFileTaskRepository
|
||||
|
||||
|
||||
DEFAULT_DATA_DIR = Path("data")
|
||||
DEFAULT_TASKS_FILE = DEFAULT_DATA_DIR / "tasks.json"
|
||||
|
||||
|
||||
def create_task_repository(
|
||||
file_path: str | Path = DEFAULT_TASKS_FILE,
|
||||
) -> JsonFileTaskRepository:
|
||||
return JsonFileTaskRepository(file_path=file_path)
|
||||
|
||||
Reference in New Issue
Block a user