Skip to content

release: v7.8.1 — project BUML file import without section headers#546

Merged
ArmenSl merged 3 commits into
masterfrom
development
Jun 1, 2026
Merged

release: v7.8.1 — project BUML file import without section headers#546
ArmenSl merged 3 commits into
masterfrom
development

Conversation

@ArmenSl

@ArmenSl ArmenSl commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

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-model path that caused model.py files wrapping a DomainModel in a Project(...) block to fail to load (or load empty).

  • parse_buml_content sandbox lacked a Project symbol, so any project tail crashed with NameError: name 'Project' is not defined. Added a no-op Project stub.
  • project_to_json required # 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_diagram and restores name/description/owner from the wrapper.
  • /get-json-model project branch still read the legacy flat shape (parsed_project["ClassDiagram"]). Reworked to read the schemaVersion=3 shape (parsed_project["diagrams"][type][index]), honouring currentDiagramType / 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 passed
  • python -m pytest tests/utilities/web_modeling_editor/backend/test_api_integration.py — 69 passed
  • New regression test_project_to_json_handles_missing_section_headers passes
  • End-to-end smoke: the failing project file that surfaced this bug now imports as a populated ClassDiagram (55 classes, 1 enum, 62 relationships)
  • Full docs build: cd docs && make html — new v7.8.1 page renders
  • Editor smoke after deploy: upload a project-shaped model.py via the Project Import flow on editor.besser-pearl.org

ArmenSl added 3 commits May 20, 2026 16:23
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.
@ArmenSl ArmenSl merged commit 4dec780 into master Jun 1, 2026
5 checks passed
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.

1 participant