Skip to content

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

Open
lord-haffi wants to merge 4 commits into
mainfrom
feat/bo-produkt-tarif-com
Open

feat: add BO Produkt and degrade BO Tarif to COM Tarif (draft for AG)#1086
lord-haffi wants to merge 4 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
@lord-haffi lord-haffi marked this pull request as ready for review July 13, 2026 09:54
@lord-haffi

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 13, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 4b47838. The only conflict was in src/bo4e/__init__.py — the __all__ list, where the isort-sorted format from main conflicted with the old partial BO sub-list from this branch. Resolution: removed the redundant partial list and inserted "Produkt" alphabetically (between "Preistyp" and "Produkttyp") in the fully sorted __all__.

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.

2 participants