Skip to content

Land ADR-0013 (packaging) and ADR-0014 (v1.0 public-surface refinements) #36

@JakeMG-INL

Description

@JakeMG-INL

Parent

#8

What to build

Two new ADRs capturing the v1.0 public-surface decisions agreed in the pre-tag grilling session. Both are immutable, prose-only deliverables — no code.

ADR-0013: v1.0 packaging — installable expy Python package. Documents the move from the current source-tree-vendored layout (EXIProcessor.py and V2Gjson/ at repo root, .so files in ./build/, from _version import __version__ requiring repo root on sys.path) to a pip install-able package: expy/processor.py, expy/v2gjson/, expy/_version.py, with .so files shipped as package data and a pyproject.toml build backend that drives the C make step. Lists the rejected alternatives (declare current layout as v1.0 contract; sdist-only; pure-Python wrapper around system .so). Records consequences for consumers (semver-bumpable via pip; vendoring no longer required; layout change is not a MAJOR break since current layout was never declared part of the surface).

ADR-0014: v1.0 public-surface refinements. Captures the rename, feature-gating, CLI parity, typed-exception-attribute, and envelope-split decisions. Supersedes ADR-0006 on the exception-error contract (the NotImplementedError-for-unsupported-roots clause is replaced by feature-gating; typed .rc/.namespace/.root attributes are now part of the contract while the str(e) format is marked informational). Supersedes ADR-0012 on the MAJOR-bump list (additions: exception attribute contract changes, Namespace enum member rename or removal). Explicitly documents:

  • Rename ProtocolEnumNamespace (matches CONTEXT.md glossary).
  • Six-method Python EXIProcessor API where the underlying schema defines the root; methods absent (not raise NotImplementedError) on Namespaces that don't.
  • CLI binaries gain --encode-fragment / --decode-fragment / --encode-xmldsig / --decode-xmldsig with the same feature-gating — flags absent from --help on SAP/DIN.
  • Typed exception attributes EncodeError.rc: int, .namespace: str, .root: Literal["exiDocument","exiFragment","xmldsigFragment"]; same for DecodeError.
  • V2Gjson identifier naming continues to mirror libcbv2g (non-PEP-8) and is not part of the MAJOR-bump-on-rename rule for casing only; the README documents the convention and recommends per-file lint suppressions.
  • Top-level message envelope shape varies per Namespace: DIN and ISO-2 wrap in V2G_Message, SAP and ISO-20 use raw {"<MessageName>": ...} or {"Body": {"<MessageName>": ...}}. Documented as a known property of the surface.

Acceptance criteria

  • docs/adr/0013-v1.0-packaging.md exists with status, considered options, and consequences sections per docs/adr/ style
  • docs/adr/0014-v1.0-public-surface-refinements.md exists with the same structure
  • ADR-0014 explicitly states which clauses of ADR-0006 and ADR-0012 it supersedes
  • Human review and approval received before merge

Blocked by

None — can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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