release: v7.8.1 — project BUML file import without section headers#546
Merged
Conversation
The v7.8.0 release merged the agent-editor frontend work (develop -> main) but the parent repo's submodule gitlink was left at the pre-agent-editor commit 077afbdf. Point it at the released frontend (main) so a fresh checkout of v7.8.0 + 'git submodule update' gets the deployed editor.
Project files exported with a flat layout (classes, relationships, generalizations, domain_model + a trailing Project(...) wrapper, no '# STRUCTURAL MODEL #' headers) failed to load via /get-json-model: * class_diagram_converter.parse_buml_content crashed on the project tail with NameError: name 'Project' is not defined, because the exec sandbox strips imports but never provided a Project symbol. * project_to_json only scans for '# STRUCTURAL MODEL #' headers; when none exist it returned a project with every diagram empty. * /get-json-model's project branch still read the legacy flat shape (parsed_project["ClassDiagram"]) instead of the schemaVersion=3 nested shape (parsed_project["diagrams"]["ClassDiagram"][i]). Fixes: * Add a no-op Project stub to the class_diagram_converter sandbox. * In project_to_json, fall back to _build_project_from_single_diagram when models=[...] is declared but no section headers exist, and restore the project name/description/owner from the wrapper. * Rework the /get-json-model project branch to read the v3 diagrams map, honoring currentDiagramType / currentDiagramIndices and falling back through the priority order if the active diagram is empty. Adds test_project_to_json_handles_missing_section_headers as a regression guard.
- Bump setup.cfg 7.8.0 -> 7.8.1, CITATION.cff to 7.8.1 / 2026-06-01, and add docs/source/releases/v7/v7.8.1.rst (registered in v7.rst). - Backend: editor's /get-json-model project branch now reads the schemaVersion=3 nested diagrams map; project_to_json falls back to single-diagram detection when no '# STRUCTURAL MODEL #' headers exist; class_diagram_converter sandbox tolerates trailing Project(...) wrappers. Fix commit: 823d5f3. - Frontend submodule pointer unchanged — no frontend changes ship in this patch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Patch release that restores project-exported BUML import in the Web Modeling Editor. v7.8.0 left three compounding bugs on the
/get-json-modelpath that causedmodel.pyfiles wrapping aDomainModelin aProject(...)block to fail to load (or load empty).parse_buml_contentsandbox lacked aProjectsymbol, so any project tail crashed withNameError: name 'Project' is not defined. Added a no-opProjectstub.project_to_jsonrequired# STRUCTURAL MODEL #section headers; flat project exports (just# Classes/# Relationships/# Generalizations/# Domain Model+ project tail) returned all-empty diagrams. Now falls back to_build_project_from_single_diagramand restores name/description/owner from the wrapper./get-json-modelproject branch still read the legacy flat shape (parsed_project["ClassDiagram"]). Reworked to read theschemaVersion=3shape (parsed_project["diagrams"][type][index]), honouringcurrentDiagramType/currentDiagramIndices.No metamodel, generator, or API contract changes — backend-only patch. Frontend submodule pointer unchanged.
Test plan
python -m pytest tests/utilities/web_modeling_editor/backend/services/converters/— 234 passedpython -m pytest tests/utilities/web_modeling_editor/backend/test_api_integration.py— 69 passedtest_project_to_json_handles_missing_section_headerspassescd docs && make html— new v7.8.1 page rendersmodel.pyvia the Project Import flow on editor.besser-pearl.org