Skip to content

Upstream: adopt v1 arithmetic convention (PyPSA/linopy#591) #8

@FBumann

Description

@FBumann

Why

Without a predictable arithmetic contract from linopy, linopy_yaml cannot guarantee consistent behavior. A YAML expression like sum(p * cost, over=generator) compiles differently depending on operand order, coordinate alignment, and NaN handling:

We park stability on the upstream v1 convention refactor rather than working around these in our parser/builder.

Upstream tracking

Action for linopy_yaml once v1 is released

  1. Opt into v1 globally: linopy.options["arithmetic_convention"] = "v1" in from_yaml() (or at module import).
  2. Un-xfail the dispatch tests and verify they pass.
  3. Document in SPEC.md that linopy_yaml requires the v1 convention.
  4. Drop any workarounds that exist to paper over legacy-convention quirks.

Sub-issues that directly affect linopy_yaml today

Close when

linopy ships the v1 convention as a released version, linopy_yaml has migrated, and the dispatch xfail markers are removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream-blockerBlocked on upstream linopy change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions