Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 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
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
63 changes: 63 additions & 0 deletions .github/workflows/converter-cube-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
# 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
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
413 changes: 413 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