How pslmodels/tax-calculator works
Main Components
a. Core Components:
• Calculator Engine (calculator.py)
• Policy Management (policy.py)
• Records Management (records.py)
• Growth Factors (growfactors.py)
• Calculation Functions (calcfunctions.py)
b. Supporting Components:
• Data Management Layer (data.py)
• Input/Output Handler (taxcalcio.py)
• CLI Interface (cli/tc.py)
• Parameters System (parameters.py)
• Utilities (utils.py, utilsprvt.py)
┌─ User Interface Layer ─────────────────┐
• Command Line Interface (tc.py) │
• Python API Interface │
• ┬───────────────────┘
• ↓
┌─ Processing Layer ──────────────────────┐
• Calculator Engine (calculator.py) │
• ┌────────────────┐ ┌────────────────┐ │
• Policy Manager │ │Records Manager │ │
• (policy.py) │←→│(records.py) │ │
• ┘ └────────────────┘ │
• ↑ ↑ │
• ┌────────────────┐ ┌────────────────┐ │
• Growth Factors │ │Calc Functions │ │
• (growfactors.py)│ │(calcfunctions) │ │
• ┘ └────────────────┘ │
• ┬───────────────────┘
• ↓
┌─ Data Layer ────────────────────────────┐
• Data Management (data.py) │
• Input/Output Processing (taxcalcio.py)│
• Configuration Files (.json) │
• ┘
Key Relationships to Highlight
• Calculator class as the central orchestrator
• Policy and Records objects as primary data containers
• Growth factors influencing calculations
• Data flow from input files through processing to output
• Configuration management through JSON files
Implementation Details
• Modular design for easy maintenance
• Clear separation of concerns
• Data flow pathways
• Configuration management
• Testing and validation processes
Documentation Integration
References to:
• API documentation location
• Configuration file formats
• Input/output specifications
• Reform file structure