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:
- GNU Make (always required – note that we do mean specifically GNU Make, other flavours of Make may not work),
- ROBOT (always required),
- Dicer-CLI (always required),
- SSSOM-CLI (required for projects using SSSOM mappings),
- DOSDP-Tools (required for projects using DOSDP patterns),
- SQLite3 and Relation-Graph (required for exporting release artefacts to SemSQL format, if desired),
- and GitHub’s command-line tool (required to automatically push releases to GitHub, if desired).
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 ODK plugin (always required),
- and the SSSOM plugin (required for projects using SSSOM mappings).
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odk_core-0.1.0.tar.gz.
File metadata
- Download URL: odk_core-0.1.0.tar.gz
- Upload date:
- Size: 78.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50092a8c5ac2b851ba3eacdf8c9854754f7c6210d2d9ecf239fb7f1824a6a173
|
|
| MD5 |
f0b8be0f61bf9b1d60226e749ce1cf04
|
|
| BLAKE2b-256 |
a25bdd65759e600786e61f999b1647425b09df3b5172863c12055aeec3de76aa
|
File details
Details for the file odk_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: odk_core-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
172f719b11fcc7b13c9b89944cf31af260859cb8f6778457b4438c6e1e5934b4
|
|
| MD5 |
383ffe9dee50f166e8135523addc7426
|
|
| BLAKE2b-256 |
d3f50f5d2c187a4f57a6fa646127bca45a567f21509fcc14595a7119587c82c1
|