Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions converters/snowflake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ Converts Ossie YAML semantic models to [Snowflake Cortex Analyst](https://docs.s
## Setup

```bash
pip3 install -r requirements.txt
uv sync
```

## Usage

```bash
python3 src/osi_to_snowflake_yaml_converter.py -i input.yaml -o output.yaml
uv run ossie-snowflake -i input.yaml -o output.yaml
```

## Tests

```bash
python3 -m pytest tests/
uv run pytest
```

## Limitations
Expand Down
62 changes: 62 additions & 0 deletions converters/snowflake/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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"

[dependency-groups]
dev = [
"pytest>=8.0",
]

[project]
name = "apache-ossie-snowflake"
version = "0.2.0.dev0"
description = "Snowflake Cortex Analyst <> Apache Ossie converter"
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",
"Open Semantic Interchange",
"Snowflake"
]
dependencies = [
"PyYAML>=5.0",
]

[project.scripts]
ossie-snowflake = "ossie_snowflake.converter:main"

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

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

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

[tool.uv]
required-version = ">=0.9.0"
default-groups = [
"dev"
]
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

PyYAML>=5.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
connection required.

Usage:
python3 osi_to_snowflake_yaml_converter.py -i input.yaml -o output.yaml
python3 converter.py -i input.yaml -o output.yaml
"""

import argparse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@

"""Tests for the Ossie to Snowflake YAML converter."""

import sys
import warnings
from pathlib import Path

import pytest
import yaml

# Make src/ importable
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "src"))
from osi_to_snowflake_yaml_converter import (
from ossie_snowflake.converter import (
OsiConversionError,
convert_osi_to_snowflake,
_classify_field,
Expand Down
Loading