You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ossie.apache.org by jb...@apache.org on 2026/09/10 04:41:45 UTC

(ossie) branch main updated: Rename the Honeydew converter package to ossie_honeydew, keep legacy "osi" metadata readable (#313)

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ossie.git


The following commit(s) were added to refs/heads/main by this push:
     new 69ecc5e  Rename the Honeydew converter package to ossie_honeydew, keep legacy "osi" metadata readable (#313)
69ecc5e is described below

commit 69ecc5e91fa676e796c28998387d90799f336a9f
Author: Baruch Oxman <ba...@honeydew.ai>
AuthorDate: Thu Sep 10 07:41:38 2026 +0300

    Rename the Honeydew converter package to ossie_honeydew, keep legacy "osi" metadata readable (#313)
    
    * Rename the Honeydew converter package to ossie_honeydew
    
    Every other converter in the repo names its package ossie_<vendor>
    (ossie_databricks, ossie_dbt, ossie_sigma, ossie_snowflake, ...). The
    Honeydew converter was the lone exception at honeydew_ossie, so bring it
    in line:
    
      src/honeydew_ossie              -> src/ossie_honeydew
      tests/test_honeydew_ossie_*.py  -> tests/test_ossie_honeydew_*.py
      honeydew-ossie (dist + script)  -> apache-ossie-honeydew / ossie-honeydew
    
    The module docstring advertised `python converter.py` rather than the
    installed entry point; it now names the `ossie-honeydew` console script
    the packaging actually provides.
    
    CI targets converters/honeydew by path, so it is unaffected.
    
    Signed-off-by: Baruch Oxman <ba...@honeydew.ai>
    
    * Keep reading the legacy "osi" metadata section, link Honeydew's Ossie docs
    
    The converter stores Ossie-only fields the Honeydew schema has no home for
    in a Honeydew metadata section, and the rebrand renamed that section from
    "osi" to "ossie". That name is a persisted key, not just an identifier:
    workspaces written by an earlier version still carry an "osi" section, and
    reading only "ossie" would silently drop every preserved ai_context, label,
    unique_keys and custom_extensions entry on the way back out.
    
    _read_ossie_metadata now accepts either name, so round-tripping a workspace
    produced before the rebrand no longer loses data. Writes still use "ossie".
    Covered by test_read_legacy_osi_metadata_section.
    
    Also points the README at Honeydew's current documentation: the workspace
    YAML schema page, and the Apache Ossie (OSI) page that documents this
    integration from the Honeydew side.
    
    Signed-off-by: Baruch Oxman <ba...@honeydew.ai>
    
    ---------
    
    Signed-off-by: Baruch Oxman <ba...@honeydew.ai>
---
 converters/honeydew/README.md                       | 12 ++++++++----
 converters/honeydew/pyproject.toml                  |  8 ++++----
 .../{honeydew_ossie => ossie_honeydew}/__init__.py  |  2 +-
 .../{honeydew_ossie => ossie_honeydew}/converter.py | 15 +++++++++++----
 ...onverter.py => test_ossie_honeydew_converter.py} | 21 +++++++++++++++++----
 converters/honeydew/uv.lock                         | 20 ++++++++++----------
 6 files changed, 51 insertions(+), 27 deletions(-)

diff --git a/converters/honeydew/README.md b/converters/honeydew/README.md
index 644961c..4419862 100644
--- a/converters/honeydew/README.md
+++ b/converters/honeydew/README.md
@@ -17,9 +17,13 @@
   under the License.
 -->
 
-# Ossie ↔ Honeydew Converter
+# Apache Ossie ↔ Honeydew Converter
 
-Bidirectional converter between [Ossie](../../core-spec/spec.md) semantic models and [Honeydew](https://honeydew.ai/docs) workspace YAML.
+Bidirectional converter between [Apache Ossie](../../core-spec/spec.md) semantic models
+and [Honeydew](https://honeydew.ai/docs) [workspace YAML](https://honeydew.ai/docs/yaml-schema).
+
+Honeydew documents this integration from its own side under
+[Apache Ossie (OSI)](https://honeydew.ai/docs/integration/apache-ossie-osi).
 
 ## Overview
 
@@ -70,10 +74,10 @@ uv sync
 
 ```bash
 # Ossie YAML → Honeydew workspace directory
-uv run honeydew-ossie ossie-to-honeydew -i input.yaml -o output_dir/
+uv run ossie-honeydew ossie-to-honeydew -i input.yaml -o output_dir/
 
 # Honeydew workspace directory → Ossie YAML
-uv run honeydew-ossie honeydew-to-ossie -i workspace_dir/ -o output.yaml
+uv run ossie-honeydew honeydew-to-ossie -i workspace_dir/ -o output.yaml
 ```
 
 ## Tests
diff --git a/converters/honeydew/pyproject.toml b/converters/honeydew/pyproject.toml
index 1a2584a..7585ec7 100644
--- a/converters/honeydew/pyproject.toml
+++ b/converters/honeydew/pyproject.toml
@@ -26,9 +26,9 @@ dev = [
 ]
 
 [project]
-name = "honeydew-ossie"
+name = "apache-ossie-honeydew"
 version = "0.2.0.dev0"
-description = "Bidirectional converter between Honeydew workspace YAML and Ossie semantic model"
+description = "Honeydew workspace YAML <> Apache Ossie converter"
 authors = [{ name = "Apache Software Foundation", email = "dev@ossie.apache.org" }]
 requires-python = ">=3.12"
 readme = "README.md"
@@ -43,14 +43,14 @@ dependencies = [
 ]
 
 [project.scripts]
-honeydew-ossie = "honeydew_ossie.converter:main"
+ossie-honeydew = "ossie_honeydew.converter:main"
 
 [project.urls]
 homepage = "https://ossie.apache.org/"
 repository = "https://github.com/apache/ossie/"
 
 [tool.hatch.build.targets.wheel]
-packages = ["src/honeydew_ossie"]
+packages = ["src/ossie_honeydew"]
 
 [tool.pytest.ini_options]
 testpaths = ["tests"]
diff --git a/converters/honeydew/src/honeydew_ossie/__init__.py b/converters/honeydew/src/ossie_honeydew/__init__.py
similarity index 97%
rename from converters/honeydew/src/honeydew_ossie/__init__.py
rename to converters/honeydew/src/ossie_honeydew/__init__.py
index d216be4..13a8339 100644
--- a/converters/honeydew/src/honeydew_ossie/__init__.py
+++ b/converters/honeydew/src/ossie_honeydew/__init__.py
@@ -13,4 +13,4 @@
 # "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.
\ No newline at end of file
+# under the License.
diff --git a/converters/honeydew/src/honeydew_ossie/converter.py b/converters/honeydew/src/ossie_honeydew/converter.py
similarity index 98%
rename from converters/honeydew/src/honeydew_ossie/converter.py
rename to converters/honeydew/src/ossie_honeydew/converter.py
index ee6c092..33793e7 100644
--- a/converters/honeydew/src/honeydew_ossie/converter.py
+++ b/converters/honeydew/src/ossie_honeydew/converter.py
@@ -24,8 +24,8 @@ Ossie → Honeydew: Converts a single Ossie YAML file into a Honeydew workspace
 Honeydew → Ossie: Reads a Honeydew workspace directory and produces an Ossie YAML.
 
 Usage:
-    python converter.py ossie-to-honeydew -i input.yaml -o output_dir/
-    python converter.py honeydew-to-ossie -i workspace_dir/ -o output.yaml
+    ossie-honeydew ossie-to-honeydew -i input.yaml -o output_dir/
+    ossie-honeydew honeydew-to-ossie -i workspace_dir/ -o output.yaml
 """
 
 import argparse
@@ -41,6 +41,10 @@ import yaml
 SUPPORTED_OSSIE_VERSION = "0.2.0.dev0"
 HONEYDEW_VENDOR = "HONEYDEW"
 _OSSIE_METADATA_SECTION = "ossie"
+# Workspaces written before the Ossie rebrand named the section "osi". Still
+# read it, so exporting such a workspace does not silently drop the fields it
+# preserves (ai_context, label, unique_keys, custom_extensions, vendors).
+_LEGACY_OSSIE_METADATA_SECTION = "osi"
 _HD_ATTR_KEYS = ("display_name", "hidden", "folder", "format_string", "timegrain")
 
 
@@ -955,7 +959,10 @@ def _build_ossie_metadata(
 def _read_ossie_metadata(obj: dict[str, Any]) -> dict[str, Any]:
     """Read Ossie-preserved fields from a Honeydew object's 'ossie' metadata section."""
     for section in (obj.get("metadata") or []):
-        if (section.get("name") or "") != _OSSIE_METADATA_SECTION:
+        if (section.get("name") or "") not in (
+            _OSSIE_METADATA_SECTION,
+            _LEGACY_OSSIE_METADATA_SECTION,
+        ):
             continue
         result: dict[str, Any] = {}
         for item in (section.get("metadata") or []):
@@ -1065,4 +1072,4 @@ def main() -> None:
 
 
 if __name__ == "__main__":
-    main()
\ No newline at end of file
+    main()
diff --git a/converters/honeydew/tests/test_honeydew_ossie_converter.py b/converters/honeydew/tests/test_ossie_honeydew_converter.py
similarity index 99%
rename from converters/honeydew/tests/test_honeydew_ossie_converter.py
rename to converters/honeydew/tests/test_ossie_honeydew_converter.py
index 4f8a0a5..d83523b 100644
--- a/converters/honeydew/tests/test_honeydew_ossie_converter.py
+++ b/converters/honeydew/tests/test_ossie_honeydew_converter.py
@@ -26,7 +26,7 @@ from pathlib import Path
 import pytest
 import yaml
 
-from honeydew_ossie.converter import (
+from ossie_honeydew.converter import (
     HoneydewConversionError,
     _assign_metrics_to_entities,
     _build_ossie_metadata,
@@ -278,6 +278,19 @@ def test_read_ossie_metadata_no_ossie_section():
     assert _read_ossie_metadata({"metadata": [{"name": "other", "metadata": []}]}) == {}
 
 
+def test_read_legacy_osi_metadata_section():
+    """Workspaces written before the rebrand named the section 'osi'; still read it."""
+    section = _build_ossie_metadata(
+        ai_context={"synonyms": ["orders"]},
+        unique_keys=[["col1"]],
+        custom_extensions=[{"vendor_name": "SNOWFLAKE", "data": "{}"}],
+    )
+    legacy = {**section, "name": "osi"}
+    assert _read_ossie_metadata({"metadata": [legacy]}) == _read_ossie_metadata(
+        {"metadata": [section]}
+    )
+
+
 def test_read_ossie_metadata_no_metadata():
     assert _read_ossie_metadata({}) == {}
 
@@ -1444,7 +1457,7 @@ def test_main_ossie_to_honeydew(tmp_path):
     }))
     output_dir = tmp_path / "out"
     result = subprocess.run(
-        [sys.executable, "-m", "honeydew_ossie.converter",
+        [sys.executable, "-m", "ossie_honeydew.converter",
          "ossie-to-honeydew", "-i", str(input_file), "-o", str(output_dir)],
         capture_output=True, text=True,
     )
@@ -1462,7 +1475,7 @@ def test_main_honeydew_to_ossie(tmp_path):
     }])
     output_file = tmp_path / "output.yaml"
     result = subprocess.run(
-        [sys.executable, "-m", "honeydew_ossie.converter",
+        [sys.executable, "-m", "ossie_honeydew.converter",
          "honeydew-to-ossie", "-i", str(tmp_path), "-o", str(output_file)],
         capture_output=True, text=True,
     )
@@ -1487,7 +1500,7 @@ def test_main_path_traversal_rejected(tmp_path):
     )
     output_dir = tmp_path / "out"
     result = subprocess.run(
-        [sys.executable, "-m", "honeydew_ossie.converter",
+        [sys.executable, "-m", "ossie_honeydew.converter",
          "ossie-to-honeydew", "-i", str(input_file), "-o", str(output_dir)],
         capture_output=True, text=True,
     )
diff --git a/converters/honeydew/uv.lock b/converters/honeydew/uv.lock
index a71e79e..19f7006 100644
--- a/converters/honeydew/uv.lock
+++ b/converters/honeydew/uv.lock
@@ -3,16 +3,7 @@ revision = 3
 requires-python = ">=3.12"
 
 [[package]]
-name = "colorama"
-version = "0.4.6"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
-wheels = [
-    { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
-]
-
-[[package]]
-name = "honeydew-ossie"
+name = "apache-ossie-honeydew"
 version = "0.2.0.dev0"
 source = { editable = "." }
 dependencies = [
@@ -30,6 +21,15 @@ requires-dist = [{ name = "pyyaml", specifier = ">=6.0" }]
 [package.metadata.requires-dev]
 dev = [{ name = "pytest", specifier = ">=8.0" }]
 
+[[package]]
+name = "colorama"
+version = "0.4.6"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
+]
+
 [[package]]
 name = "iniconfig"
 version = "2.3.0"