Skip to content

Adding ontology converters#147

Open
vmihalovski wants to merge 1 commit into
open-semantic-interchange:mainfrom
vmihalovski:main
Open

Adding ontology converters#147
vmihalovski wants to merge 1 commit into
open-semantic-interchange:mainfrom
vmihalovski:main

Conversation

@vmihalovski
Copy link
Copy Markdown

OSI Ontology Converters — Python Project Setup

This PR introduces the converters/ontology package as a standalone, installable Python project providing bidirectional conversion between ontology formats used across the OSI ecosystem.

What's included

Three converters:

  • Palantir → OSI — parses a Palantir ontology export (ZIP containing ontology and dataset spec JSON files) and converts it into an OSI ontology model, mapping Palantir object types, relations, and datasets to their OSI equivalents
  • OSI → Spec — serialises an OSI ontology model into an OSI-compliant YAML specification
  • Spec → OSI — parses an OSI YAML specification back into an OSI ontology model, enabling round-trip conversion

Project setup:

  • pyproject.toml with runtime dependencies (pydantic, pyyaml) and dev extras (pytest, pip-tools)
  • requirements.lock for fully reproducible installs via pip-tools
  • src/osi/ package layout — the package is importable as osi after installation
  • .gitignore covering Python artifacts, virtual environments, pyenv, VS Code, and JetBrains IDE files
  • README.md with step-by-step setup instructions using pyenv and virtualenv

Script:

  • scripts/palantir_to_osi.py — a ready-to-run CLI script that takes a Palantir export ZIP and outputs an OSI YAML to stdout, with optional Snowflake database and schema configuration via environment variables

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.

1 participant