Skip to content

Write modifier keys relative to their option - #658

Merged
JayHuLBL merged 16 commits into
mainfrom
ag/656-relative-modifier-keys
Oct 14, 2026
Merged

JayHuLBL merged 16 commits into
mainfrom
ag/656-relative-modifier-keys

Conversation

@AntoineGautier

Copy link
Copy Markdown
Collaborator

Description

This addresses #656 and #657.
Built on top of #655.

Testing

All golden tests pass on client and server.

End-to-end tests have also been performed by creating the SOO document with the following system options.

AHU

  • Separate dampers w/ dp
  • Modulating relief w/o fan
  • No heating coil
  • Freeze stat hardwired to both

Cooling-only box

  • 3 sensors = true

✅ The feature branch produces the same document as the main branch.

The stores map keys to { value?, redeclare?, kindOfClass? }, set from
the
declaration of the element (storedValue). A configuration only stores
the
keys of its template: the project settings are stored with the project.
The client sends the schemaVersion 1 payload, which the mogrifier
gathers
per project; the endpoint rejects a payload without exactly one project.
The class of a replaceable component is read through its typ parameter.
The parser gives class definitions their kind of class, and
templates.json
the version of the Buildings library.

A record bound to another record has no value: a replaceable one reports
the class of its declaration or redeclaration (#642).
names.py, keys.py and the schema version check of the payload move to
server/scripts/ctrlflow (import ctrlflow, install ctrl-flow), for the
future consumers of the payload. The aggregation of the values of a
project stays with the sequence document (sequence_payload.py).
The Python dependencies are installed in a virtual environment, as the
system Python is externally managed (PEP 668). With pip 25, the ctrlflow
package needs no setup.cfg for an editable install.
The stores (#649, #650) and the payload (#650) changed incompatibly. The
build no longer runs npm version patch, which was never committed: a
deployment built the committed version + 1, so the local storage key
did not change between deployments.
read

- Split the [UNITS [..] [..]] toggles around equations and pictures into
  [EQUALS UNITS SI] and [EQUALS UNITS IP] paragraphs; the equations were
  IP first, and in the Toggle style
- [EQUALS OA NONE] -> [EQUALS OA MAPSPD]
- Add the short ID MULT_RELIEF to the mappings
Section 5.6 (VAV terminal unit with reheat) reads TERM_HT_RH, keyed at
VAVBoxReheat only, instead of the TERM_HT pattern over both VAV boxes.
A test checks that a system-type section reads no key of another
template of the same system type. Document how mappings scope toggles.
constrainingModifiers takes undefined entries like choiceModifiers.
A modifier expression is a literal or an expression, and is undefined
without a binding.
document

Every toggle has a valid format and uses short IDs of the mappings.
Sections toggled by several templates (ANY) are scoped, and the expected
sections are listed per version.
The full stop after a UNITS annotation was removed with it. The editor
notes of the instruction boxes are not annotations.
The keys of modifiers, constrainingModifiers and choiceModifiers in
templates.json repeated the path of their option, which the client
stripped again, falling back to the last identifier for choice
modifiers. Keys are now the paths of the modified elements relative to
the option, as written in Modelica (MLS 7.2), and the fallback is
removed.

The workaround of #416 is removed: the final modifications of a final
redeclaration in a choice are kept, and a modification written nested
in a choice is rejected instead of dropped.
modelica-json <2.0.0 writes the output of its Java parser in the
encoding
of the locale, so without a UTF-8 locale every non-ASCII character of a
string became "?" (Modelica files are UTF-8, MLS 3.7 §13.4). The image
sets a UTF-8 locale until modelica-json 2.0.0 can be used
(lbl-srg/modelica-json#327). A failing test converts without a UTF-8
locale and flags when the workaround can be removed. Jest is bumped to
29 for it.failing.
@JayHuLBL
JayHuLBL merged commit 09b96a6 into main Oct 14, 2026
2 checks passed
@AntoineGautier
AntoineGautier deleted the ag/656-relative-modifier-keys branch October 14, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants