Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

model.query() does not return unnamed connectors/allocations/flows, satisfy usages, or metadata usages

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, python
领域
api, backend

调研方向

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, connection or flow usage is returned by model.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 as SatisfyRequirementUsage via model.query(), and neither is a MetadataUsage, named or not.
  • A named perform action x : A usage is returned with type ActionUsage.
  • 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

环境准备

从这里开始

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

Open-MBEE/OpenSysML 的其他 Issue

查看 Open-MBEE/OpenSysML 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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