How nicohaider/sampling-tool works
BDO Audit Sampling Tool is a desktop application for reproducible, documented ISAE-3402 audit sampling. The main workflow is project setup/open, spreadsheet import, sample configuration and draw, review, then report export. SQLite projects hold datasets, samples, engagement state and audit events; the README also describes undo/redo, presets, dashboard and audit-trail views. The sampled excerpts show controller ownership, worker tasks, persistence and exports; other capabilities are included where supported by the README, with uncertain internal wiring omitted.
Main entry points: workspace_controller.py Workspace operations · repositories.py Project repositories · tasks.py Import and export tasks · main_window.py Main window
Components 25
Desktop workflow
- Main window
src/sampling_tool/ui/main_window.py - Main controller
src/sampling_tool/ui/controllers/main_controller.py - Project lifecycle
src/sampling_tool/ui/controllers/engagement_controller.py - Workspace operations
src/sampling_tool/ui/controllers/workspace_controller.py - Dataset and sample selection
src/sampling_tool/ui/controllers/selection_controller.py - Table, sidebar, dashboard, audit view
src/sampling_tool/ui/widgets/dashboard_view.py - Background task runner
src/sampling_tool/ui/workers/task_worker.py - Import and export tasks
src/sampling_tool/ui/workers/tasks.py
Import and sampling
- Excel / CSV importer
src/sampling_tool/io/importer.py - Import preview and options
src/sampling_tool/io/import_preflight.py - Sampling algorithms
src/sampling_tool/core/sampling.py - Sampling configuration and models
src/sampling_tool/core/models.py
Project data
- Project SQLite database
src/sampling_tool/persistence/database.py - Project repositories
src/sampling_tool/persistence/repositories.py - Audit event logger
src/sampling_tool/audit/logger.py - Project snapshots
src/sampling_tool/persistence/version_manager.py
Review and reporting
- Export controller
src/sampling_tool/ui/controllers/export_controller.py - Sample and Excel exports
src/sampling_tool/io/exporter.py - PDF and HTML reports
src/sampling_tool/io/pdf_report.py - Multi-sheet project report
src/sampling_tool/io/multi_report_exporter.py
App preferences
- Sampling presets
src/sampling_tool/ui/preset_store.py - Application settings
src/sampling_tool/ui/settings_store.py
Other components
- Auditor
- Excel / CSV files
- Report recipient
Connections 36
- Auditor → Main window: uses
- Main window → Main controller: dispatches signals
- Main controller → Project lifecycle: routes lifecycle
- Main controller → Workspace operations: routes operations
- Main controller → Dataset and sample selection: routes selection
- Project lifecycle → Project SQLite database: opens project
- Project lifecycle → Project snapshots: creates snapshots
- Project lifecycle → Project repositories: loads engagement
- Workspace operations → Import preview and options: requests import options
- Excel / CSV files → Import preview and options: previews source
- Import preview and options → Workspace operations: returns import choices
- Workspace operations → Background task runner: starts tasks
- Background task runner → Import and export tasks: runs task
- Import and export tasks → Excel / CSV importer: reads source
- Excel / CSV importer → Excel / CSV files: reads rows
- Import and export tasks → Project repositories: stores dataset
- Workspace operations → Sampling algorithms: performs draw
- Sampling algorithms → Sampling configuration and models: uses configuration
- Workspace operations → Project repositories: reads and saves samples
- Workspace operations → Audit event logger: records actions
- Audit event logger → Project repositories: appends events
- Project repositories → Project SQLite database: reads and writes
- Dataset and sample selection → Project repositories: loads selections
- Dataset and sample selection → Table, sidebar, dashboard, audit view: updates display
- Project SQLite database → Table, sidebar, dashboard, audit view: supplies project data
- Export controller → Project repositories: reads export data
- Export controller → Background task runner: starts export tasks
- Import and export tasks → Sample and Excel exports: writes sample Excel
- Import and export tasks → PDF and HTML reports: renders PDF or HTML
- Import and export tasks → Multi-sheet project report: writes Excel report
- Export controller → Audit event logger: records exports
- PDF and HTML reports → Report recipient: produces reports
- Sample and Excel exports → Report recipient: produces workbook
- Main window → Sampling presets: manages presets
- Main window → Application settings: saves settings
- Workspace operations → Sampling presets: loads sampling presets