Write unset zero ratings the same way in every parser

未关闭
#94 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
领域
backend

调研方向

Start with src/openapi/branch.jl and read _get_rating, then trace how the line, 2W, 3W and MATPOWER parsers write ratings. Confirm how each represents an unset zero rating and where parser tests cover those cases. Done means one shared helper omits unset rating keys across all four parsers, and _get_rating treats only a missing key as unbounded.

由索引模型根据 Issue 内容生成。

描述

From review on #91. The current behavior is correct, but it's not clean.

A zero rating means "no limit", and the parsers record that differently: some leave the key out and some keep a zero. _get_rating (src/openapi/branch.jl) handles both by treating a missing key and a zero value as unbounded.

Suggestion: never write the key for an unset rating, through one helper used by the line, 2W, 3W and MATPOWER parsers. _get_rating then only has to treat a missing key as unbounded, and its zero-value fallback can go.

🤖 Generated with Claude Code

主要语言
Julia
星标
1
派生
3
平均合并
4 天 8 小时
30 天内合并 PR
11

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Sienna-Platform/PowerFlowFileParser.jl 的其他 Issue

查看 Sienna-Platform/PowerFlowFileParser.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。