Skip to content

Adapt PSB to units-aware IS/PSY API#194

Merged
jd-lara merged 6 commits into
psy6from
lk/units-table-driven
May 29, 2026
Merged

Adapt PSB to units-aware IS/PSY API#194
jd-lara merged 6 commits into
psy6from
lk/units-table-driven

Conversation

@luke-kiernan

Copy link
Copy Markdown
Collaborator

Summary

  • Make PSB compatible with the units-aware IS/PSY work on lk/units-domain-agnostic-is4 and lk/units-fold-psu.
  • Getters: pass an explicit units arg (IS.SU default; IS.DU inside make_modified_RTS_GMLC_sys and the PowerSystemTableData parser).
  • Setters: pass attached-units values (val * IS.SU, val * IS.DU).

Test plan

  • Pkg.test() (depends on the corresponding lk/units-fold-psu PSY branch and lk/units-domain-agnostic-is4 IS branch being dev'd in)
  • Verify the 3 remaining test errors are all from upstream PowerFlowFileParser (PARSER_TAP_RATIO_CORRECTION_TOL), not PSB

🤖 Generated with Claude Code

luke-kiernan and others added 5 commits May 21, 2026 16:05
get_base_power now returns unitful MW in PSY. Internal code that needs
raw Float64 for arithmetic switches to PSY._get_base_power.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Default to SU; use DU inside RTS_GMLC and the PowerSystemTableData
parser. `set_X!` calls take attached-units values (`val * IS.SU` etc).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
So CI sees the same versions the local dev setup did.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
set_x! in psid_library; peak_active/reactive on Area+LoadZone in
powerflowdata_data (assumed NU, see FIXME).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@luke-kiernan

Copy link
Copy Markdown
Collaborator Author

The test failure is due to logged errors, not due to actual failure of unit tests. The errors look like parsing stuff, independent of the changes in this PR.

@jd-lara jd-lara merged commit 808b9df into psy6 May 29, 2026
1 of 7 checks passed
@jd-lara jd-lara deleted the lk/units-table-driven branch May 29, 2026 02:12
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