Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check-external-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
uses: actions/checkout@v7

- name: Set up Python 3.
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
with:
python-version: "3.12"

- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:

# Pin uv to a known-good, recent release.
- name: Install uv and setup uv caching
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
id: setup-python
with:
python-version: 3.13
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
git fetch upstream --tags

- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
id: setup-python
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v4.6.0
uses: docker/login-action@v4.7.0
with:
username: cjmungall
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
git fetch upstream --tags

- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
id: setup-python
with:
python-version: ${{ matrix.python-version }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}

- uses: actions/setup-python@v7.0.0
- uses: actions/setup-python@v7.1.0
with:
python-version: 3.13
- name: Check pyproject.toml and uv.lock
Expand Down Expand Up @@ -76,13 +76,13 @@ jobs:
git fetch upstream --tags

- name: Install uv and setup uv caching
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
id: setup-python
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -139,13 +139,13 @@ jobs:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
id: setup-python
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -189,13 +189,13 @@ jobs:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
id: setup-python
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -227,12 +227,12 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
with:
python-version: 3.13

- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
- name: Build source and wheel archives
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/metamodel-compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
with:
python-version: "3.12"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
with:
python-version: 3.13

- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}

Expand All @@ -40,7 +40,7 @@ jobs:
uv build --all-packages

- name: Store built distribution
uses: actions/upload-artifact@v7.0.1
uses: actions/upload-artifact@v7.0.2
with:
name: distribution-files
path: dist/
Expand All @@ -57,7 +57,7 @@ jobs:
id-token: write # This permission is mandatory for trusted publishing.
steps:
- name: Download built distribution
uses: actions/download-artifact@v8.0.1
uses: actions/download-artifact@v8.0.2
with:
name: distribution-files
path: dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rustgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
git fetch upstream --tags

- name: Install uv and setup uv caching
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
with:
python-version: '3.12'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typedb-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
--health-start-period 30s
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.2.0
- uses: actions/setup-python@v7.0.0
- uses: astral-sh/setup-uv@v10.3.2
- uses: actions/setup-python@v7.1.0
with:
python-version: "3.12"
- run: uv sync --group typedb --group tests-extra
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-feature-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ jobs:
git fetch upstream --tags

- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
uses: astral-sh/setup-uv@v10.3.2
with:
version: ${{ env.UV_VERSION }}
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v7.0.0
uses: actions/setup-python@v7.1.0
with:
python-version: "3.12"

Expand Down
26 changes: 26 additions & 0 deletions docs/examples/owl-dcmi-agent-annotations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
id: https://example.org/model
name: model
prefixes:
ex: https://example.org/
linkml: https://w3id.org/linkml/
dcterms: http://purl.org/dc/terms/
orcid: https://orcid.org/
owl: http://www.w3.org/2002/07/owl#
imports: [linkml:types]
default_prefix: ex
instantiates: [ex:AgentMetadata]
annotations:
creator: orcid:0000-0002-1825-0097
rights: Copyright 2026 The Example Team
classes:
AgentMetadata:
description: Declares the agent metadata that a schema may carry as annotations.
attributes:
creator:
slot_uri: dcterms:creator
range: nodeidentifier
implements: [owl:AnnotationProperty]
rights:
slot_uri: dcterms:rights
range: string
implements: [owl:AnnotationProperty]
13 changes: 13 additions & 0 deletions docs/generators/jsonld-context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ derived from ``string`` with ``uri: xsd:anyURI`` keeps URI references as
``xsd:anyURI`` literals (see
:ref:`links-and-uri-references`).

JSON-LD version
^^^^^^^^^^^^^^^

A generated context that uses a JSON-LD 1.1 construct starts with
``"@version": 1.1``. The generator emits three: scoped contexts for enum slots
and for class-level range overrides, and ``@prefix`` (see below). A JSON-LD 1.0
processor would silently ignore them; the number ``1.1`` makes it stop instead
(`JSON-LD 1.1 §1.7 <https://www.w3.org/TR/json-ld11/#syntax-tokens-and-keywords>`__),
and selects JSON-LD 1.1 processing in processors that support both. A context
without such a construct, for example one generated with ``--no-model`` or for a
schema without enums and overrides, has no version line and stays loadable by a
JSON-LD 1.0 processor.

CURIE usage
^^^^^^^^^^^

Expand Down
19 changes: 19 additions & 0 deletions docs/generators/owl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ Mapping

.. note:: The current default settings for ``metaclasses`` and ``type-objects`` may change in the future

Annotation values
^^^^^^^^^^^^^^^^^

Native metadata takes the RDF term of its metamodel range: ``see_also`` and ``source``
values are IRIs, ``license`` and ``description`` values are strings, and ``created_on``
is an ``xsd:dateTime`` literal. A link value that is neither an IRI nor a CURIE, such as
a bare element name in ``see_also``, is written as a plain literal, with a warning. An annotation
whose tag a metaclass declares through ``instantiates`` takes the term of that slot's
range in the same way (see :ref:`annotations-in-rdf`); any other annotation value is a
string.

.. literalinclude:: ../examples/owl-dcmi-agent-annotations.yaml
:language: yaml

The ontology header then carries ``dcterms:creator <https://orcid.org/0000-0002-1825-0097>``
and ``dcterms:rights "Copyright 2026 The Example Team"``. ``implements: [owl:AnnotationProperty]``
declares the two predicates as annotation properties; the restrictions that the metaclass's
own slots produce are a matter of the property role, not of the value.

Enums and PermissibleValues
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
32 changes: 32 additions & 0 deletions docs/schemas/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,38 @@ first-class slots, and instantiates value was a mixin.
However, this is not yet supported in the current LinkML validator, so using `instantiates` indicates your
intent, but does not yet enforce validation.

(annotations-in-rdf)=
## Annotation values in RDF

The declared range also decides how gen-owl and gen-shacl (with `--include-annotations`) write an
annotation value, by the rule that applies to slot values (see {ref}`links-and-uri-references`): a
`nodeidentifier` or `uri` value becomes an IRI, or a blank node for a `_:` label; a `string` value stays
text and carries the language of `--default-language`; a `curie` value stays a string; and the value of
an enum-ranged slot is written as the permissible value's text.

```yaml
classes:
Reviewable:
class_uri: mymetamodel:Reviewable
attributes:
review:
range: string
reviewer:
range: nodeidentifier
Person:
instantiates:
- mymetamodel:Reviewable
annotations:
review: A very useful class that is well defined
reviewer: orcid:0000-0002-1825-0097
```

gen-owl then writes `mymetamodel:review "A very useful class that is well defined"` and
`mymetamodel:reviewer <https://orcid.org/0000-0002-1825-0097>` on the class. A value that cannot be a
term of the declared kind, such as a relative reference for a `uri` slot, is an error. Without a
declaration the generators keep their earlier behaviour: gen-owl writes every annotation value as a
string, and gen-shacl writes a value containing a colon as an IRI.

## Other uses of instantiates

The `instantiates` slot can also be used constrain rather than extend.
Expand Down
Loading
Loading