Skip to content

Rewrite README, write CHANGELOG.md v1.0 entry, update example.py for full v1.0 surface #44

@JakeMG-INL

Description

@JakeMG-INL

Parent

#8

What to build

Final docs pass once every code-shaping slice has landed. Three deliverables:

README.md rewrite. Replace the current DIN-centric README with full v1.0 coverage:

  • Overview of all eight Namespaces (SAP, DIN, ISO2, ISO20_COMMON, ISO20_AC, ISO20_DC, ISO20_WPT, ISO20_ACDP) and what each one is for.
  • The EVerest JSON shape — byte fields as {"bytes": [...], "bytesLen": N}, character fields as {"characters": [...], "charactersLen": N}, optional sub-elements signaled by key presence.
  • The six-method Python EXIProcessor API where supported (Document encode/decode on all eight; Fragment and XmldsigFragment encode/decode on ISO-2 and the five ISO-20 Namespaces). Make the feature gating explicit and document hasattr as the supported feature-detection idiom.
  • The CLI surface — all eight binaries, six modes each on capable Namespaces, two modes on SAP/DIN. Show one example per mode family (Document, Fragment, XmldsigFragment).
  • The V2Gjson constructor surface, with naming-conventions caveat: identifiers mirror libcbv2g verbatim, including non-PEP-8 casing (costKindType, RelativeTimeIntervalType, EVSE_NotReady). Recommend per-file ruff N801,N802,N806 suppressions for consumers running strict linters. Never recommend wildcard imports — cross-namespace collisions like MessageHeaderType exist.
  • Top-level message envelope split: DIN and ISO-2 use <ns>.V2G_Message(Header=..., Body=...) constructors; SAP and ISO-20 hand-build raw dicts at the top level (no V2G_Message exists in those schemas).
  • Error contract: EncodeError and DecodeError carry typed .rc: int, .namespace: str, .root: Literal[...] attributes. The str(e) format is informational, not part of the contract — consumers discriminating on failure mode use the attributes.
  • Installation instructions covering both pip install git+...@v1.0 and a from-source build (pip install .).

CHANGELOG.md. New file at repo root with a ## v1.0.0 entry enumerating the public surface as it ships: eight Namespaces, six-method Python API (feature-gated), eight CLI binaries with six modes (feature-gated), V2Gjson public constructor + enum surface, typed exception attributes, pip-installable distribution, EVerest JSON shape stable.

example.py update. Rewrite imports for the packaged layout (from expy import EXIProcessor, Namespace / from expy.v2gjson import din, iso20_common, sap). Expand the existing module docstring to explain why DIN uses din.V2G_Message(...) while SAP and ISO-20 hand-build top-level dicts. Add at least one Fragment or XmldsigFragment example so consumers see the six-method API exercised, not just Document encode/decode.

Acceptance criteria

  • README.md covers all eight Namespaces, the six-method API with feature gating, all eight CLI binaries, the V2Gjson surface with naming-conventions note, the envelope-shape split, the typed exception attributes, and pip-install instructions
  • CHANGELOG.md exists with a v1.0.0 entry
  • example.py uses from expy ... imports, demonstrates both DIN's V2G_Message envelope and one SAP / ISO-20 raw-dict envelope, and includes one Fragment or XmldsigFragment encode example
  • README example snippets are copy-pasteable against a fresh pip install . checkout
  • Star imports are nowhere recommended in README or example.py

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions