Skip to content

Conversation

@naltatis
Copy link
Member

@naltatis naltatis commented Jun 6, 2025

Add unique product identifier based on brand and description. Basis for upcoming product detail pages in docs evcc-io/docs#814 and icon referencing from https://github.com/evcc-io/icons.

🏷️ introduce product identifier "Skoda iV Charger Connect+" > skoda-iv-charger-connectplus
👯 test product name uniqueness, fix collisions (OCPP dups) \cc @premultiply
⚙️ use identifier for generated doc filenames (instead of index)
🔗 add template name for back reference (edit this page)
🍱 add params & modbus data structure to show as table on docs detail pages

Note: Product identifiers are not stable since product names are adjusted from time to time. We might replace this with a more permanent solution or introduce a compatibility feature (like covers in templates) in the future. For now this is a pragmatic approach.

relates to evcc-io/docs#814

@naltatis naltatis requested a review from andig June 6, 2025 07:42
@naltatis naltatis added the infrastructure Basic functionality label Jun 6, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @naltatis - I've reviewed your changes - here's some feedback:

  • Instead of relying on os.Stat on each filename, aggregate and validate all product.Identifier() values upfront to catch duplicates in memory and provide clearer error messages.
  • Avoid mutating slug.CustomSub as a global; create and configure a local slug instance (or reset the global) to prevent unintended side‐effects during identifier generation.
  • Wrap the "params:" section in a conditional in documentation.tpl to skip emitting an empty header when no non-deprecated params are present.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@naltatis naltatis mentioned this pull request Jun 6, 2025
10 tasks
@naltatis naltatis added the devices Specific device support label Jun 6, 2025
}

var modbusRender string
modbusData := make(map[string]interface{})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warum brauchts das?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plan ist auf der Produkt-Seite in der Doku die einzelnen Parameter tabellarisch zu erklären. Bei den Modbus-Geräten haben wir ja implizite Parameter erzeugt, die durch die Modbus Eigenschaft erzeugt werden. Dafür braucht es die Modbus Infos (Defaults, ...) des Geräts. Quasi das Äquivalent zur documentation_modbus.tpl.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Die werden doch aber- falls modbus- weiter unten eh angelegt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was meinst du damit? Modbus ist ja immer eine Sonderbehandlung in der Darstellung. Unterschiedliche Optionen/Spielarten aus denen der Nutzer auswählen muss und so.

Wenns um die konkrete Zeile geht. Die hab ich nur weiter nach vorne geschoben, damit die Daten nicht nur in documentation_modbus.tpl verwendet werden können, sondern auch als strukturierte Daten mit in die Doku-Yaml Datei aufgenommen werden.

Bildschirmfoto 2025-06-06 um 23 14 31

@andig andig merged commit a04a0cd into master Jun 7, 2025
6 checks passed
@andig andig deleted the docs/product_ident branch June 7, 2025 11:38
andig pushed a commit that referenced this pull request Aug 11, 2025
StarF666 pushed a commit to StarF666/evcc that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devices Specific device support infrastructure Basic functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants