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

Abierto
#16 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
jupyter-notebook, python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Jupyter Notebook
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Open-MBEE/toaster

Todos los issues de Open-MBEE/toaster

Issues similares

Más issues de Documentation

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.