openbench-privacy-preservin.../openbench_privacy_preservin.../adapters/erp.py

30 lines
821 B
Python

from __future__ import annotations
from typing import List
from .base import Adapter
from openbench_privacy_preserving_benchmarkin.core import KPIRecord
from openbench_privacy_preserving_benchmarkin.contracts import DataContract
class ERPAdapter(Adapter):
"""A toy ERP adapter that yields KPIRecords."""
def __init__(self, name: str, contract: DataContract):
super().__init__(name, contract)
def collect(self) -> List[KPIRecord]:
k1 = KPIRecord(
revenue=800.0,
cogs=500.0,
inventory_turns=1.8,
lead_time=4.0,
cac=40.0,
ltv=900.0,
region="default",
industry="Manufacturing",
anon_id=f"{self.name}-erp1",
timestamp="2020-01-03T00:00:00Z",
)
return [k1]