Skip to content

feat: add BO Produkt and degrade BO Tarif to COM Tarif (draft for AG)#1086

Draft
lord-haffi wants to merge 3 commits into
mainfrom
feat/bo-produkt-tarif-com
Draft

feat: add BO Produkt and degrade BO Tarif to COM Tarif (draft for AG)#1086
lord-haffi wants to merge 3 commits into
mainfrom
feat/bo-produkt-tarif-com

Conversation

@lord-haffi

Copy link
Copy Markdown
Collaborator

Draft — first of two PRs implementing the new BO Produkt / BO Vertrag model from the AG HackMD spec. PR 2 (BO Vertrag rework) is intentionally separate and will reference Produkt.

Changes

  • New BO Produkt (standalone/unreferenced for now) with the tariff's identifying/marketing fields promoted up: bezeichnung, beschreibung, sparte, anbieter, zeitraum_vermarktung, zeitraum_belieferbarkeit, vertragskonditionen, website, kundentypen, plus new produkttyp and tarif.
  • BO TarifCOM Tarif (bo/tarif.pycom/tarif.py, base TarifinfoCOM), keeping only the pricing-specific fields (regionspreise, dynamische_preisposition_quelle, energiemix, tariftyp, tarifmerkmale, registeranzahl, preisgarantie, berechnungsparameter, tarifeinschraenkung).
  • New Produkttyp enum (TARIFPRODUKT); Kundentyp.INDUSTRIE; BoTyp.PRODUKT added, BoTyp.TARIF removed; ComTyp.TARIF added.

Verification

  • pytest: 111 passed
  • pylint src/bo4e: 10.00/10 · mypy: clean (286 files)
  • JSON-schema generate + validate: both pass (adds bo/Produkt.json, com/Tarif.json, enum/Produkttyp.json; removes bo/Tarif.json)

Open questions for the AG

  1. COM Tarif no longer inherits Tarifinfo (which stays a BO alongside Tarifkosten/Tarifpreisblatt). Field duplication was accepted; is the hierarchy split acceptable, or should Tarifinfo be revisited?
  2. Several former BO Tarif fields were required (no default); all moved/new fields are now Optional = None. Please confirm this required→optional relaxation.
  3. BoTyp.TARIF removed outright (vs. keeping a deprecated alias).
  4. COM Tarif.regionspreise docstring references a dynamischePreisposition field that does not exist on the class (pre-existing) — reconcile with dynamic-tariff modelling, likely in a later PR.
  5. vertragskonditionen intentionally duplicated on Produkt (and later Vertrag) — overridable at contract time, per spec.

Out of scope (→ PR 2)

Bündelvertrag removal, Vertragsstatus reduction, COM Unterschrift removal, VertragsteilLokationszuordnung reference, and wiring Produkt into Vertrag.

@lord-haffi lord-haffi self-assigned this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant