Skip to content

Commit 1defde6

Browse files
committed
Update README.
Remove the bit about ODK Core being "experimental", and the rationale for the experiment. Instead, add more explanations on how to use the project. Also update the repository URL to reflect the new home of the project.
1 parent ec1bc19 commit 1defde6

File tree

2 files changed

+86
-43
lines changed

2 files changed

+86
-43
lines changed

README.md

Lines changed: 84 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,43 @@
11
Ontology Development Kit Core
22
=============================
33

4-
This is an _experimental_ project aiming at isolating the core features
5-
of the [Ontology Development
6-
Kit](https://github.com/INCATools/ontology-development-kit) (ODK) and
7-
providing them as a single Python package, independently of the ODK
8-
Docker images.
9-
10-
Rationale
11-
---------
12-
The “Ontology Development Kit” is currently three different things at
13-
once:
14-
15-
* it is a set of executable workflows to manage the lifecycle of an
16-
ontology;
17-
* it is a tool to create (“seed”, in ODK parlance) and update an
18-
ontology repository that would use said workflows;
19-
* it is a toolbox of ontology engineering tools, provided as a Docker
20-
image.
21-
22-
This project posits that the first two things are in fact largely
23-
independent of the third one, and makes the hypothesis that treating
24-
them as such, and clearly separating them as two entities being
25-
developed on their own, could overall facilitate the development of the
26-
entire project.
27-
28-
Therefore, the aim of this “ODK Core” project is to provide the ODK’s
29-
executable workflows and seeding/updating script, independently of the
30-
ODK Docker image. Once it will have reached maturity (if it does!), the
31-
idea is then that the ODK Core will become merely one of the tools
32-
provided by the ODK Docker image.
33-
34-
A secondary goal is to make it possible to seed, update, and use a
35-
ODK-managed repository _without_ using the Docker image at all.
36-
37-
Setting up a ODK environment
38-
----------------------------
39-
Installing the `odk-core` package (this project) with `pip` (or similar
40-
tool) will automatically install all the Python packages required to run
41-
the `odk` script itself (e.g. to seed or update a ODK project).
4+
This project provides the core functionality of the [Ontology
5+
Development Kit](https://github.com/INCATools/ontology-development-kit)
6+
as a standalone Python package (`odk-core`).
7+
8+
Namely, it provides:
9+
10+
* the `odk` script to seed and update a ODK-managed repository;
11+
* the template files used to seed a ODK-managed repository.
12+
13+
Installation
14+
------------
15+
Unless they wish to use a “native ODK environment” (see below), most
16+
users will not need to manually install this package. Instead, they will
17+
use it through one of the [Docker
18+
images](https://hub.docker.com/u/obolibrary) provided by the ODK project
19+
– those images will include the `odk-core` package and its `odk` script.
20+
21+
The package _can_ definitely be used independently of the Docker images
22+
though. For that, it can be installed as any other Python packages,
23+
either from [PyPI](https://pypi.org/project/odk-core/):
24+
25+
```sh
26+
$ python -m pip install odk-core
27+
```
28+
29+
or from a release tarball
30+
```sh
31+
$ curl -L -O https://github.com/INCATools/odkcore/releases/download/odkcore-X.Y.Z/odk_core-X.Y.Z.tar.gz
32+
$ tar xf odk_core-X.Y.Z.tar.gz
33+
$ python -m pip install ./odk_core-X.Y.Z
34+
```
35+
36+
Setting up a native ODK environment
37+
-----------------------------------
38+
Installing the `odk-core` package as shown above will automatically
39+
install all the Python packages required to run the `odk` script (e.g.
40+
to seed or update a ODK-managed repository).
4241

4342
In addition, installing the package with the `workflows` “extra” (as in
4443
`pip install odk-core[workflows]` will also install all the Python
@@ -51,6 +50,9 @@ the PATH. The various tools used by ODK workflows are:
5150
* [GNU Make](https://www.gnu.org/software/make/) (always required – note
5251
that we do mean specifically **GNU** Make, other flavours of Make may
5352
not work),
53+
* a [Java Runtime
54+
Environment](https://www.oracle.com/java/technologies/downloads/)
55+
(JRE; always required),
5456
* [ROBOT](https://robot.obolibrary.org/) (always required),
5557
* [Dicer-CLI](https://incenp.org/dvlpt/dicer/dicer-cli/index.html)
5658
(always required),
@@ -78,9 +80,36 @@ plugins used by ODK workflows are:
7880
plugin](https://incenp.org/dvlpt/sssom-java/sssom-robot/index.html)
7981
(required for projects using SSSOM mappings).
8082

81-
The easiest way (and, for now, the only really supported way) to get
82-
such an environment is to use the [ODK Docker
83-
image](https://github.com/INCATools/ontology-development-kit).
83+
When using the ODK through one of the Docker images, all those
84+
requirements are automatically met. When _not_ using the Docker images,
85+
it is the user’s responsibility to ensure they are met, before ODK
86+
workflows can be run. The `odk` script provides a command to help with
87+
that:
88+
89+
```sh
90+
$ odk install /path/to/my/env
91+
```
92+
93+
That command will initialise the `/path/to/my/env` directory as a
94+
“native ODK environment”, containing all the tools and ROBOT plugins
95+
mentioned above (except GNU Make and the JRE, which are always expected
96+
to be already available on the system).
97+
98+
To use the newly initialised environment, source the
99+
`bin/activate-odk-environment.sh` script:
100+
101+
```sh
102+
$ . /path/to/my/env/bin/activate-odk-environment.sh
103+
```
104+
105+
The current shell is then ready to run ODK workflows.
106+
107+
Note that ODK native environments are only supported for the following
108+
platforms:
109+
110+
* GNU/Linux x86_64,
111+
* macOS x86_64,
112+
* and macOS arm64.
84113

85114

86115
Developing ODK-Core
@@ -133,6 +162,20 @@ repository with:
133162
odk-dev seed -g -C config.yaml [...]
134163
```
135164

165+
Note the `-g` option in the `seed` commands above: it instructs the
166+
seeding script _not_ to build the ontology in the newly seeded
167+
repository. This is because building the ontology would require a full
168+
ODK environment.
169+
170+
To be able to test building the ontology (or running any kind of ODK
171+
workflows more generally), first create a native ODK environment, then
172+
activate it:
173+
174+
```sh
175+
$ odk-dev install /my/test/env
176+
$ . /my/test/env/bin/activate-odk-environment.sh
177+
```
178+
136179

137180
Copying
138181
-------

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
]
1010
readme = "README.md"
1111
classifiers = [
12-
"Development Status :: 1 - Planning",
12+
"Development Status :: 4 - Beta",
1313
"Environment :: Console",
1414
"Intended Audience :: Science/Research",
1515
"Topic :: Scientific/Engineering",
@@ -27,7 +27,7 @@ dependencies = [
2727

2828
[project.urls]
2929
Homepage = "http://incatools.github.io/ontology-development-kit"
30-
Repository = "https://github.com/gouttegd/odkcore"
30+
Repository = "https://github.com/INCATools/odkcore"
3131

3232
[project.scripts]
3333
odk = "incatools.odk.cli:main"

0 commit comments

Comments
 (0)