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.2.tar.gz (79.9 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.2-py3-none-any.whl (95.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: odk_core-0.1.2.tar.gz
  • Upload date:
  • Size: 79.9 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.2.tar.gz
Algorithm Hash digest
SHA256 bf382f4a37106915eedfbdbadf8bee7adc01a501ef3fb5949cf321ea71f3ec2b
MD5 38588840b754cbd1f86dc17818422667
BLAKE2b-256 07f7dadbae343592a24262b47bddedb0d89f976aed901b97784f312204111ddb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: odk_core-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 95.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca114e30a57e7f71b0bdba7819aea8754bb29f931cd1a0b113427ca6d842c576
MD5 b513a67af7759045516865633efa33e7
BLAKE2b-256 0a60c4aad6ce539171fb2696320e46610cb43cdf23fdf6d34df560df476b5593

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