Skip to content

Commit 7751ae3

Browse files
authored
Merge pull request #41 from longieirl/fix/40-recursive-scan-default
fix(#40): enable recursive PDF scanning by default
2 parents f978baa + 589ae43 commit 7751ae3

6 files changed

Lines changed: 7 additions & 6 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ services:
3535
- EXIT_AFTER_PROCESSING=${EXIT_AFTER_PROCESSING:-true}
3636
- ENABLE_DYNAMIC_BOUNDARY=${ENABLE_DYNAMIC_BOUNDARY:-false}
3737
- SORT_BY_DATE=${SORT_BY_DATE:-true}
38+
- RECURSIVE_SCAN=${RECURSIVE_SCAN:-true}
3839
# Output configuration - expense analysis enabled by default (monthly summary requires PAID tier)
3940
- OUTPUT_FORMATS=${OUTPUT_FORMATS:-csv,json}
4041
- GENERATE_MONTHLY_SUMMARY=${GENERATE_MONTHLY_SUMMARY:-false}

packages/parser-core/src/bankstatements_core/builders/processor_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self) -> None:
4343
self._columns: dict[str, tuple[int | float, int | float]] | None = None
4444
self._enable_dynamic_boundary: bool = False
4545
self._sort_by_date: bool = True
46-
self._recursive_scan: bool = False
46+
self._recursive_scan: bool = True
4747
self._totals_columns: list[str] | None = None
4848
self._generate_monthly_summary: bool = True
4949
self._generate_expense_analysis: bool = True

packages/parser-core/src/bankstatements_core/config/app_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class AppConfig:
3838
table_bottom_y: int = 720
3939
enable_dynamic_boundary: bool = False
4040
sort_by_date: bool = True
41-
recursive_scan: bool = False
41+
recursive_scan: bool = True
4242
totals_columns: list[str] = field(default_factory=list)
4343
generate_monthly_summary: bool = True
4444
generate_expense_analysis: bool = True
@@ -128,7 +128,7 @@ def from_env(cls) -> "AppConfig":
128128
"ENABLE_DYNAMIC_BOUNDARY", False
129129
)
130130
sort_by_date = EnvironmentParser.parse_bool("SORT_BY_DATE", True)
131-
recursive_scan = EnvironmentParser.parse_bool("RECURSIVE_SCAN", False)
131+
recursive_scan = EnvironmentParser.parse_bool("RECURSIVE_SCAN", True)
132132
generate_monthly_summary = EnvironmentParser.parse_bool(
133133
"GENERATE_MONTHLY_SUMMARY", True
134134
)

packages/parser-core/src/bankstatements_core/config/processor_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ProcessingConfig:
5353
totals_columns: list[str] | None = None
5454
generate_monthly_summary: bool = True
5555
generate_expense_analysis: bool = True
56-
recursive_scan: bool = False
56+
recursive_scan: bool = True
5757

5858

5959
@dataclass

packages/parser-core/src/bankstatements_core/services/pdf_discovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, entitlements: Entitlements | None = None):
2929
def discover_pdfs(
3030
self,
3131
input_dir: Path,
32-
recursive: bool = False,
32+
recursive: bool = True,
3333
) -> list[Path]:
3434
"""Discover PDF files in input directory.
3535

packages/parser-core/tests/test_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def test_run_with_mock_data(self):
242242
result = processor.run()
243243

244244
# Verify the mock was called with correct arguments
245-
mock_process.assert_called_once_with(self.input_dir, recursive=False)
245+
mock_process.assert_called_once_with(self.input_dir, recursive=True)
246246

247247
# Verify results summary
248248
self.assertIn("pdf_count", result)

0 commit comments

Comments
 (0)