[DEFERRED] Use Editor API for attribute default value once upstream ships

Aperta
#16 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
jupyter-notebook, python
Ambito
documentation

Direzione di ricerca

Start by checking whether editor.add_attribute() or editor.add_member() supports the default modifier, then compare their output with the POWER_ATTR workaround and the parser behavior described in the issue. Once upstream support exists, replace each attribute string fragment with the corresponding API call and verify that the tutorial still demonstrates an overridable default value.

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

Descrizione

Context

The opensysml v0.9.0 parser accepts this construct:

```sysml
package P {
private import ISQ::;
private import SI::
;
part def Heater {
attribute power : ISQ::PowerValue default = 800.0 [SI::W];
}
}
```

The default = modifier makes the attribute value overridable in specializations and
usages (e.g., attribute :>> power = 1200.0 [SI::W]). This is a key teaching point in
the tutorial.

Probing (2026-09-25): editor.add_attribute(owner, name, type='ISQ::PowerValue', value='800.0 [SI::W]')
produces attribute power : ISQ::PowerValue = 800.0 [SI::W] — a fixed binding (not overridable).
The default keyword modifier is not accessible via the API.

Spec reference

KerML Language Specification formal/2026-03-02, §8.4.1 (FeatureValue — the default keyword
modifier that distinguishes a default value from a fixed feature value binding)

The grammar distinction: 'default'? ('=' | ':=') OwnedExpression where the presence of
default permits redefinition at usage sites.

Current workaround

```python

default = modifier not yet supported in Editor API — toaster#16 / OpenSysML#TBD

spec: KerML formal/2026-03-02 §8.4.1 (FeatureValue — default keyword)

POWER_ATTR = " attribute power : ISQ::PowerValue default = 800.0 [SI::W];"
print(POWER_ATTR)
```

Upstream issue

Open-MBEE/OpenSysML#TBD (to be filed)

Resolution

When editor.add_attribute() or editor.add_member() supports the default modifier,
replace each attribute string fragment with the corresponding API call.

Lingua principale
Jupyter Notebook
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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/toaster

Tutte le issue di Open-MBEE/toaster

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.