model.query() does not return unnamed connectors/allocations/flows, satisfy usages, or metadata usages
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start at the model.query() and model.to_api_json() entry points, using the reported Python and inline SysML reproduction if available. Compare the elements exposed by the query with those present in json.loads(model.to_api_json().content), including unnamed usages, SatisfyRequirementUsage, and MetadataUsage. Done means the intended API behavior is confirmed and the query surface and documentation consistently describe all supported elements.
由索引模型根据 Issue 内容生成。
描述
Summary
model.query() returns named allocation, connection and flow elements by @type, but omits the same kind of element when it is unnamed, and omits every SatisfyRequirementUsage and MetadataUsage regardless of naming. All of them are present in json.loads(model.to_api_json().content).
Version: OpenSysML v0.9.0.
Observed
For a model that loads with ok=True:
- (a) a named
allocation,connectionorflowusage is returned bymodel.query(where={"@type": ..., ...}). - (b) the same element declared without a name is not returned by the equivalent query.
- (c)
satisfy r by subject;(which cannot take a name) is never returned asSatisfyRequirementUsageviamodel.query(), and neither is aMetadataUsage, named or not. - A named
perform action x : Ausage is returned with typeActionUsage. - The members a part inherits from its supertype are not listed for the subtype via
model.query().
Reference
SysML API and Services v1.0 (formal/2026-03-04), 7.2.2 ElementNavigationService (printed p. 27): getElements(project, commit) is documented as "Get all the elements in a given project at the given commit," and the Query API Model (Figure 7, printed p. 24) does not scope this to named elements.
Request
Please confirm whether model.query() is intended to correspond to the API's element queries over all elements of the commit. If so, unnamed connectors, satisfy usages and metadata usages should be selectable by @type the same way named ones are. If the current behavior (named elements only, no satisfy/metadata usages) is intentional, it would help to say so in the documentation, since right now the JSON export (to_api_json()) and the query surface disagree about what's in the model.
Repro
Happy to provide a minimal reproduction script (Python + inline SysML source) on request.
- 主要语言
- Go
- 星标
- 24
- 派生
- 5
- 平均合并
- 10 小时 11 分钟
- 30 天内合并 PR
- 572
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Open-MBEE/OpenSysML 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 48/100
Open-MBEE/OpenSysML#720 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
维护者通常 1 天内回复
查看 Open-MBEE/OpenSysML 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
gruntwork-io/boilerplate#329 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
prime-radiant-inc/evener#3291 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
Netcracker/qubership-apihub-backend#582 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复