Skip to content

Fix Microsoft converter for flat documents - #407

Merged
jbonofre merged 3 commits into
apache:mainfrom
eisber:dev/marcozo/restore-microsoft-converter-after-flat-d-tlh39z
Sep 17, 2026
Merged

jbonofre merged 3 commits into
apache:mainfrom
eisber:dev/marcozo/restore-microsoft-converter-after-flat-d-tlh39z

Conversation

@eisber

@eisber eisber commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update converters/microsoft to read and emit the flat one-model-per-document Ossie shape introduced by Define one semantic model per document without a wrapper #383
  • reject legacy semantic_model wrappers and removed root metadata instead of ambiguously converting them
  • preserve Power BI/TOM round-trip behavior for stash data, AI context, relationships, measures, and the installed CLI
  • expand Microsoft CI path coverage to all core-spec and example changes

Reproduction

On current main before this change:

  • test_all_tpcds_example_metrics_translate_to_dax failed because the converter rejected the flat TPC-DS example as missing semantic_model
  • test_output_validates_against_core_spec_schema failed because converter output still used the removed wrapper shape
  • result: 2 failed, 381 passed, 1 skipped

Validation

  • Microsoft suite with coverage: 399 passed, 0 skipped, 96.00% coverage
  • TOM unit and integration tests: 16 passed
  • wheel-installed ossie-microsoft import/export round trip: passed
  • generated YAML validation against core-spec/ossie-schema.json: passed
  • ruff check converters/microsoft: passed
  • git diff --check: passed

ruff format --check reports 16 pre-existing unformatted files, so this PR does not introduce a repository-wide formatting rewrite.

Overlap

The Microsoft-scoped implementation matches the corresponding changes in #396. This PR is intentionally self-contained and limited to restoring the Microsoft converter CI path.

Read and emit the flat one-model-per-document Ossie shape, reject removed wrappers and metadata, and preserve the existing Power BI round-trip contracts through updated tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 16, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Export can produce schema-invalid documents when all datasets are excluded or malformed.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Migrates the Microsoft converter to flat, one-model-per-document Ossie format and updates related tests, documentation, and CI coverage.

Changes:

  • Supports flat document import/export and rejects legacy shapes.
  • Updates round-trip and edge-case coverage.
  • Expands CI path triggers.

A critical schema-validity issue remains when no exportable datasets exist.

File Description
converters/​microsoft/​tests/​test_tom_integration.py Updates TOM integration coverage.
converters/​microsoft/​tests/​test_semantic_model_to_ossie.py Tests flat export behavior.
converters/​microsoft/​tests/​test_ossie_to_semantic_model.py Tests flat import and rejection behavior.
converters/​microsoft/​tests/​test_edge_cases.py Covers converter edge cases.
converters/​microsoft/​tests/​conftest.py Updates shared test fixtures.
converters/​microsoft/​src/​ossie_microsoft/​semantic_model_to_ossie.py Emits flat Ossie documents.
converters/​microsoft/​src/​ossie_microsoft/​ossie_to_semantic_model.py Reads flat documents and rejects legacy shapes.
converters/​microsoft/​README.md Documents the flat format.
.github/​workflows/​converter-microsoft-ci.yml Expands CI path coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread converters/microsoft/src/ossie_microsoft/semantic_model_to_ossie.py
Prevent flat Ossie output with an empty datasets collection and cover the library and CLI failure paths requested in review.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jbonofre
jbonofre self-requested a review September 16, 2026 21:35
Comment thread converters/microsoft/src/ossie_microsoft/ossie_to_semantic_model.py Outdated
Comment thread converters/microsoft/src/ossie_microsoft/semantic_model_to_ossie.py Outdated
Comment thread converters/microsoft/README.md
Comment thread converters/microsoft/tests/conftest.py Outdated
Validate flat dataset roots before conversion, reject all-excluded models before warnings, and keep document metadata separate in shared fixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jbonofre

Copy link
Copy Markdown
Member

@eisber thank you so much! I'm doing another pass.

@jbonofre
jbonofre merged commit bc7b2c0 into apache:main Sep 17, 2026
6 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.

3 participants