Skip to main content

Ontology Development Kit Core

Project description

Ontology Development Kit Core

This is an experimental project aiming at isolating the core features of the Ontology Development Kit (ODK) and providing them as a single Python package, independently of the ODK Docker images.

Rationale

The “Ontology Development Kit” is currently three different things at once:

  • it is a set of executable workflows to manage the lifecycle of an ontology;
  • it is a tool to create (“seed”, in ODK parlance) and update an ontology repository that would use said workflows;
  • it is a toolbox of ontology engineering tools, provided as a Docker image.

This project posits that the first two things are in fact largely independent of the third one, and makes the hypothesis that treating them as such, and clearly separating them as two entities being developed on their own, could overall facilitate the development of the entire project.

Therefore, the aim of this “ODK Core” project is to provide the ODK’s executable workflows and seeding/updating script, independently of the ODK Docker image. Once it will have reached maturity (if it does!), the idea is then that the ODK Core will become merely one of the tools provided by the ODK Docker image.

A secondary goal is to make it possible to seed, update, and use a ODK-managed repository without using the Docker image at all.

Setting up a ODK environment

Installing the odk-core package (this project) with pip (or similar tool) will automatically install all the Python packages required to run the odk script itself (e.g. to seed or update a ODK project).

In addition, installing the package with the workflows “extra” (as in pip install odk-core[workflows] will also install all the Python packages that are required by some of the standard ODK workflows as implemented in the src/ontology/Makefile generated Makefile.

Non-Python tools need to be installed separately and made available in the PATH. The various tools used by ODK workflows are:

Lastly, the environment must also provide some ROBOT plugins. They must be made available in a $ODK_RESOURCES_DIR/robot/plugins directory, where ODK_RESOURCES_DIR is a variable exported into the environment. The plugins used by ODK workflows are:

The easiest way (and, for now, the only really supported way) to get such an environment is to use the ODK Docker image.

Developing ODK-Core

ODK-Core is managed with the UV project manager. Type checking is ensured through Mypy, and linting and formatting through Ruff.

Set up the development environment with:

uv sync --dev --extra workflows

from within the project’s checked out repository. The --extra workflows is optional, but using it will make it easier to use the same environment to also run (and therefore test) the ODK-generated workflows.

To test seeding a ODK repository:

uv run odk seed -C config.yaml -g [other seeding options...]

Note the -g option, which instructs the seeding process not to try building a first release in the newly seeded repository (trying to build a release would likely fail, unless you happen to have the tools mentioned in the previous section already available in your PATH).

The previous command assumed that you are in the directory where ODK-Core was checked out. To run a odk command from anywhere else, use UV’s --project option:

uv --project /path/to/odk-core run odk seed -C config.yaml -g [...]

I’d recommend setting up an alias like:

alias odk-dev="uv --project /path/to/odk-core run odk"

so that you can use odk-dev from anywhere, e.g. try seeding a repository with:

odk-dev seed -g -C config.yaml [...]

Copying

The ODK Core is free software, published under the same 3-clause BSD license as the original ODK. See the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odk_core-0.1.1.tar.gz (78.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odk_core-0.1.1-py3-none-any.whl (94.0 kB view details)

Uploaded Python 3

File details

Details for the file odk_core-0.1.1.tar.gz.

File metadata

  • Download URL: odk_core-0.1.1.tar.gz
  • Upload date:
  • Size: 78.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Slackware","version":"15.0","id":"stable","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for odk_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b32f7c7d7546cb5f6f00e6bd13826c2a9c045d7d9492b7fa029a0b413d15d5ac
MD5 76c9122c871bc5c971f0c3abb902ddda
BLAKE2b-256 fb9e21e361c726eda89c5cfdd356347173c705dcc9e5bbc5869c26ddba2e1c2a

See more details on using hashes here.

File details

Details for the file odk_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: odk_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 94.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Slackware","version":"15.0","id":"stable","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for odk_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bbfd4ff218984c702262209e807e70a55e466a95fa947ca708e21cedf349adb2
MD5 48ba7a69c807b1233a3e792f36f8b48f
BLAKE2b-256 c1b07532e6422cb7bb3ef334622b359a4b1f0a0f0b7c51b876e0898639386477

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page