Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bca1500
Add Apache Ossie <-> Cube converter (import direction)
MikeNitsenko Jul 29, 2026
2fc45bc
Add the Ossie -> Cube export direction, completing the converter
MikeNitsenko Jul 29, 2026
aa011ed
Close the test gaps coverage exposed; drop two dead code paths
MikeNitsenko Jul 29, 2026
42c561f
Explain a view-only input, accept a single file, and test the CLI
MikeNitsenko Jul 29, 2026
f39803e
tests: add more edge cases
MikeNitsenko Jul 29, 2026
c1e778e
Accept several input paths on import, not just one root
MikeNitsenko Jul 29, 2026
c24f7bf
Register CUBE in the converters supported-vendors table
MikeNitsenko Jul 29, 2026
dd00190
Add Ossie-side test fixtures and snapshot both directions
MikeNitsenko Jul 30, 2026
5d7dc5f
Resolve dimension names once; make the Hypothesis driver honour p
MikeNitsenko Jul 30, 2026
d676e76
Inline a split geo dimension's SQL where its halves are referenced
MikeNitsenko Jul 30, 2026
210f6da
Use a deque for the generated view's BFS; fix a licence/license typo
MikeNitsenko Jul 30, 2026
d9c853d
Refuse rather than drop unparkable extensions; separate drops from parks
MikeNitsenko Jul 30, 2026
0499913
Assemble geo dimensions by name, not by a mid-loop list index
MikeNitsenko Jul 30, 2026
07e8186
Correct every mislabelled issue type, not just the flagged one
MikeNitsenko Jul 30, 2026
c272df2
Fix five round-trip bugs found in review
MikeNitsenko Jul 30, 2026
d42c6f8
Keep every view when several share one YAML file
MikeNitsenko Jul 30, 2026
a377cab
Mark a Cube primary key only on a dimension that actually is that column
MikeNitsenko Jul 30, 2026
2793807
Stop stashing what is not Cube-specific (first pass)
MikeNitsenko Aug 3, 2026
a397e85
Map datatypes natively and narrow member references
MikeNitsenko Aug 3, 2026
1de9e11
Report a source that other Ossie converters will reject
MikeNitsenko Aug 3, 2026
de748f1
Split a composite metric into one measure per aggregate
MikeNitsenko Aug 3, 2026
8e71318
Convert a fan-out-unsafe metric and report it, rather than refusing
MikeNitsenko Aug 3, 2026
a103b0c
Add the interop matrix the README's claims are measured with
MikeNitsenko Aug 3, 2026
410abb9
Fix two expression-handling defects found in review
MikeNitsenko Aug 3, 2026
a3a5fbb
Clean up the review findings that were not behaviour
MikeNitsenko Aug 3, 2026
19f3c49
Fix eleven defects found in review, four of them silent
MikeNitsenko Aug 4, 2026
e721da5
Add a Cube-compiles-it gate, spec validation everywhere, and a featur…
MikeNitsenko Aug 4, 2026
b35cc88
Fix five more review findings; the sixth was not a defect
MikeNitsenko Aug 4, 2026
454b676
Fix five more review findings, two of them silently wrong SQL
MikeNitsenko Aug 4, 2026
9e9c8c7
Fix five more review findings, one of them a real fan-out hole
MikeNitsenko Aug 4, 2026
e169d09
Generate from both ends; the new direction found a defect immediately
MikeNitsenko Aug 4, 2026
4e71673
Fix seven more review findings, plus two found while verifying them
MikeNitsenko Aug 4, 2026
404c12a
Fix six more review findings; two were regressions in last round's fixes
MikeNitsenko Aug 4, 2026
5eb67db
Refactor: delete dead code, collapse the seven per-cube fact maps int…
MikeNitsenko Aug 4, 2026
a7db53b
Refactor: one notion of identifier matching, tables prepared once
MikeNitsenko Aug 4, 2026
e90f60c
Fix four more review findings in aggregate analysis and geo references
MikeNitsenko Aug 4, 2026
c000c5a
Compare metric names case-insensitively; DISTINCT in unmodelled calls
MikeNitsenko Aug 4, 2026
77943d6
Make another converter's output usable: dialect fallback and unique_k…
MikeNitsenko Aug 4, 2026
942d3f6
Emit the dimension role block on every dimension
MikeNitsenko Aug 4, 2026
bf3fe58
Record provenance for the three Cube-shaped choices export has to make
MikeNitsenko Aug 4, 2026
2f427d1
Generate the shapes the last three blockers lived in
MikeNitsenko Aug 4, 2026
e602ac3
Preserve key columns and every dialect of an expression
MikeNitsenko Aug 4, 2026
e34d56c
Keep the second export cycle identical to the first
MikeNitsenko Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/converter-cube-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: Converters Cube CI

on:
push:
branches: [ "main" ]
paths:
- 'converters/cube/**'
- '.github/workflows/converter-cube-ci.yml'
pull_request:
branches: [ "main" ]
paths:
- 'converters/cube/**'
- '.github/workflows/converter-cube-ci.yml'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout project
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"

- name: Sync dependencies
working-directory: converters/cube
run: |
uv sync

- name: Unit Tests
working-directory: converters/cube
# The Cube-compiles-it gate needs a built Cube checkout (OSSIE_CUBE_REPO) and
# skips without one, so CI runs everything else. See converters/cube/README.md.
run: |
uv run pytest
1 change: 1 addition & 0 deletions converters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The Ossie specification currently defines extensions for the following vendors:
| `OMNI` | Omni semantic model |
| `WISDOM` | WisdomAI domain |
| `NVIDIA_GSF` | NVIDIA Generative Semantic Fabric standalone YAML |
| `CUBE` | Cube data model |

Each vendor may define custom extensions (via the `custom_extensions` field in the Ossie spec) to carry vendor-specific metadata that does not have an equivalent in the core specification.

Expand Down
545 changes: 545 additions & 0 deletions converters/cube/README.md

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions converters/cube/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "apache-ossie-cube"
version = "0.2.0.dev0"
description = "Bidirectional converter between Apache Ossie semantic models and Cube data models"
authors = [{ name = "Apache Software Foundation", email = "dev@ossie.apache.org" }]
requires-python = ">=3.11"
readme = "README.md"
license = "Apache-2.0"
keywords = [
"Apache Ossie",
"Ossie",
"Cube",
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
]
dependencies = [
"PyYAML>=6.0",
# Expression handling: locating the aggregate calls inside a composite metric so
# each can become its own Cube measure. Already a runtime dependency of the dbt
# and NVIDIA GSF converters, which use it for the same purpose.
"sqlglot>=20.0",
]

[dependency-groups]
dev = [
"pytest>=8.0",
"hypothesis>=6.0",
# So the core-spec schema validation in test_roundtrip.py runs rather than
# skipping; the converter itself needs neither.
"jsonschema>=4.0",
]

[project.scripts]
ossie-cube = "ossie_cube.cli:main"

[project.urls]
homepage = "https://ossie.apache.org/"
repository = "https://github.com/apache/ossie/"

[tool.hatch.build.targets.wheel]
packages = ["src/ossie_cube"]

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]

[tool.uv]
required-version = ">=0.9.0"
default-groups = [
"dev",
]
40 changes: 40 additions & 0 deletions converters/cube/src/ossie_cube/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

"""Bidirectional converter between Apache Ossie semantic models and Cube data
models. Pure offline transforms: Ossie YAML string <-> {relative filename: YAML
string}.

from ossie_cube import convert_cube_to_ossie, convert_ossie_to_cube

ossie_yaml, issues = convert_cube_to_ossie(files)
files, issues = convert_ossie_to_cube(ossie_yaml)
"""

from ._common import ConversionError
from .converter_issues import ConverterIssue, IssueLog, IssueType
from .cube_to_osi import convert_cube_to_ossie
from .osi_to_cube import convert_ossie_to_cube

__all__ = [
"ConversionError",
"ConverterIssue",
"IssueLog",
"IssueType",
"convert_cube_to_ossie",
"convert_ossie_to_cube",
]
Loading