You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parameter dependency text replaces every letter 'a' and only understands dependencies keyed 'a' #365
str.replace('a', ...) replaces every letter a, not just the variable a. For example, max(a, 0) with a → Instrument scale becomes mInstrument scalex(Instrument scale, 0).
Only a key named exactly a is handled. Constraints made in the app key dependency_map by alias (Sample._extract_dependency_map in sample.py), and the library uses other keys too: rho_m in Layer, t0 … tn for Model.total_thickness. Those rows skip the branch and get = <current value>, so a dynamic constraint is described as a static one.
Impact today: latent. The dependency field is shown only in the Fittables.qml tooltips for derived and inactive rows, and those get their text elsewhere (_DERIVED_DESCRIPTIONS, the inactive notes). The wrong text will appear as soon as dependent rows' dependency is shown in the UI.
Fix: substitute every key of dependency_map with a word-boundary regex (re.sub(rf'\b{re.escape(key)}\b', ...)), as sample.py already does for constraint expressions. Reusing Sample._pretty_expression directly would be even better. Add a test with an expression that contains other a characters, and one with a key other than a.
Activity
Address parameter display bug #365
Fixes before 1.6 (#381)
changes required for core 3.0 to work (#367)
Release 1.6.0 (#383)
Release 1.6.0 (#383) (#384)