feat: Add Processing Opex functionality

- Introduced OpexValidationError for handling validation errors in processing opex calculations.
- Implemented ProjectProcessingOpexRepository and ScenarioProcessingOpexRepository for managing project and scenario-level processing opex snapshots.
- Enhanced UnitOfWork to include repositories for processing opex.
- Updated sidebar navigation and scenario detail templates to include links to the new Processing Opex Planner.
- Created a new template for the Processing Opex Planner with form handling for input components and parameters.
- Developed integration tests for processing opex calculations, covering HTML and JSON flows, including validation for currency mismatches and unsupported frequencies.
- Added unit tests for the calculation logic, ensuring correct handling of various scenarios and edge cases.
This commit is contained in:
2025-11-13 09:26:57 +01:00
parent 1240b08740
commit 1feae7ff85
16 changed files with 1931 additions and 11 deletions

View File

@@ -29,6 +29,10 @@ from .simulation_parameter import SimulationParameter
from .user import Role, User, UserRole, password_context
from .profitability_snapshot import ProjectProfitability, ScenarioProfitability
from .capex_snapshot import ProjectCapexSnapshot, ScenarioCapexSnapshot
from .processing_opex_snapshot import (
ProjectProcessingOpexSnapshot,
ScenarioProcessingOpexSnapshot,
)
__all__ = [
"FinancialCategory",
@@ -37,12 +41,14 @@ __all__ = [
"Project",
"ProjectProfitability",
"ProjectCapexSnapshot",
"ProjectProcessingOpexSnapshot",
"PricingSettings",
"PricingMetalSettings",
"PricingImpuritySettings",
"Scenario",
"ScenarioProfitability",
"ScenarioCapexSnapshot",
"ScenarioProcessingOpexSnapshot",
"ScenarioStatus",
"DistributionType",
"SimulationParameter",