Skip to content

Convert ontology converter to UV based - #368

Merged
jbonofre merged 2 commits into
apache:mainfrom
MonkeyCanCode:uv_ontology
Sep 9, 2026
Merged

Convert ontology converter to UV based#368
jbonofre merged 2 commits into
apache:mainfrom
MonkeyCanCode:uv_ontology

Conversation

@MonkeyCanCode

Copy link
Copy Markdown
Contributor

Summary

This PR converted ontology converter to UV based and aligned with rest of the python based converters/tooling in this repo.

Related Issues

Checklist

Specification

  • Spec changes are included in core-spec/ and follow the existing structure
  • Spec changes have been discussed on the mailing list or in a linked issue
  • Breaking changes to the spec are clearly called out in the summary

Ontology

  • Ontology changes in ontology/ are consistent with spec changes
  • New or modified terms are defined and documented

Converters

  • Converter logic in converters/ is updated to reflect spec or ontology changes
  • New converters include tests under the converter's test directory

Validation

  • Validation rules in validation/ are updated if the spec changed
  • New validation cases are covered by tests

Documentation

  • docs/ is updated to reflect any user-facing changes
  • New features or behaviors are documented with examples where appropriate
  • CONTRIBUTING.md is updated if the contribution process changed

Examples

  • examples/ are added or updated for any new spec constructs or converter support

Tests

  • All existing tests pass (pytest / CI green)
  • New functionality is covered by tests

Compliance

  • ASF license headers are present on all new source files
  • No third-party dependencies are added without PMC/IPMC approval

@MonkeyCanCode

Copy link
Copy Markdown
Contributor Author

@vmihalovski mind take a look as well?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated README includes incomplete/OS-specific setup guidance and an example that runs python outside the uv environment, and the CI uv installation method is unpinned and should be made deterministic.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR migrates the converters/ontology package from a pip-tools-generated requirements.lock workflow to an uv-managed workflow, aligning the ontology converter with the other Python converters in this repository.

Changes:

  • Replace requirements.lock with a committed uv.lock and update the ontology converter’s dependency metadata.
  • Update the ontology converter README to use uv sync / uv lock and add uv run pytest instructions.
  • Update the ontology converter CI workflow to install uv and run tests via uv.
File summaries
File Description
converters/ontology/uv.lock Adds uv’s lockfile for deterministic dependency resolution.
converters/ontology/requirements.lock Removes the old pip-tools lockfile.
converters/ontology/README.md Updates contributor setup/test instructions to uv-based workflow.
converters/ontology/pyproject.toml Adds uv + hatchling configuration and moves dev deps into dependency groups.
.github/workflows/converter-ontology-ci.yml Switches CI dependency installation and test execution to uv.
Review details
  • Files reviewed: 3/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +50 to +54
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to match to existed GH workflow. I will create a follow up PR for this.

Comment on lines +32 to 36
- [uv](https://docs.astral.sh/uv/) — Python package and dependency manager

Install pyenv if you don't have it:
Install uv if you don't have it:

```bash

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to match to existed converters as well where team agreed to use uv based project management.

Comment on lines 93 to +97
SNOWFLAKE_DATABASE_NAME=MY_DB SNOWFLAKE_SCHEMA_NAME=MY_SCHEMA \
python scripts/palantir_to_ossie.py path/to/palantir_export.zip
```

## Deactivating the environment
## Running the tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected as well.

jbonofre
jbonofre previously approved these changes Sep 8, 2026

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think it would be great to "fix" the examples.

Comment thread converters/ontology/README.md Outdated

@flyrain flyrain left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Thanks @MonkeyCanCode !

@vmihalovski

Copy link
Copy Markdown
Contributor

@vmihalovski mind take a look as well?

@MonkeyCanCode I’m on vacation this week and will be back on Monday. Would you mind postponing the merge of this PR until next week? I’d like to test it with our other repo, which depends on this one, before we merge it.

Thank you in advance.

@jbonofre
jbonofre merged commit 50457d3 into apache:main Sep 9, 2026
4 checks passed
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.

5 participants