Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#643 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, python
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
24
Fork
5
Merge medio
10h 12m
PR unite (30g)
598

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Open-MBEE/OpenSysML

Tutte le issue di Open-MBEE/OpenSysML

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.