Publish your first ontology
Publish the bundled demo as release 0.1.0 of your own layer, watch the registry validate it, and open its release page.
The examples use https://registry.example as an illustrative test origin. Use https://registry.erden.sh for the hosted service.
Who needs this, and when
Who: publishers, administrators, and owners of an organization with a namespace. When: whenever you want to share a new version of an ontology. Status: always available.
You will publish examples/erden-demo from the Erden source as the layer @<your-namespace>/erden-demo. The
screenshots use the namespace demo, so the layer is @demo/erden-demo.
Before you start: install the CLI, claim your namespace, and have the registry's address at hand.
Copy the demo to a folder of its own
Publishing uses the project folder you are in, so work on a copy. From the erden folder you downloaded in
Check an ontology locally:
cp -r examples/erden-demo ~/ontologies/erden-demo
cd ~/ontologies/erden-demoEdit the manifest
Open erden.config.json in a text editor and make two changes:
- Set
aliasto your namespace followed by/erden-demo, for example"@demo/erden-demo". - Add a
registryline with the registry's address.erden publishneeds it.
What you should see when you print the file:
{
"schemaVersion": 1,
"canonicalIri": "https://example.invalid/erden/demo",
"alias": "@demo/erden-demo",
"ownedIriPrefixes": ["https://example.invalid/erden/demo#"],
"title": "Erden inference and validation demo",
"description": "A dependency-free local project checked by the shared Erden application operation.",
"sources": {
"ontology": ["ontology.ttl"],
"shapes": ["shapes.ttl"],
"competencyQuestions": ["artifact.rq"]
},
"citationRoots": {
"default": "."
},
"registry": "https://registry.example"
}The canonicalIri is the layer's permanent identity. For a first try, keep the demo's. For a real ontology, use an
address you control.
Refresh the lockfile and check
The lockfile records the alias, so update it, then run the checks:
erden install --offline
erden check --offlineWhat you should see:
$ erden install --offline
Installed @demo/erden-demo (https://example.invalid/erden/demo)
Lock: written 4a1c34fbfc58c6892c69cbef6f20e0d747cd58ed1f6518921ebf9a5682d33f35 (clean)
Packages: 0 total, 0 reused, 0 fetched, 0 repaired
Materialization: materialized (clean; clone 0, hardlink 0, copy 0)$ erden check --offline
Erden check @demo/erden-demo: PASSED
Manifest: erden.config.json
Ontology: https://example.invalid/erden/demo
Reasoner: erden-reasoner@0.3.0+purrdf.0.12.0.dfb1df7 (decided, consistent)
Completeness: checked at qualification, not on this run
Sources: passed
Reasoning: passed
Core ontology: passed
SHACL: passed
Competency questions: passed
Citations: passed
Warnings:
- [citations/not-in-git] https://example.invalid/erden/demo#readmeObservation could not be fully checked: not-in-gitSign the CLI in
If you haven't yet, run erden login in this folder and approve the code in your browser. See
Connect the CLI.
Publish release 0.1.0
erden publish 0.1.0 --create --visibility public --yes0.1.0is the version. Erden uses semantic versioning:MAJOR.MINOR.PATCH, with optional prereleases such as0.2.0-beta.1.--createsays "this is a new layer". Erden never creates a layer by accident.--visibility publiclets everyone read it. Leave it out, or useprivate, to keep it to your organization.--yesskips the confirmation. Without it, the CLI shows the alias, canonical IRI, and visibility and asks first.
What you should see:
$ erden publish 0.1.0 --create --visibility public --yes
Publication attempt:uvI-plIBQUxzOwqUtrb_uD-oq2RGXm0uu0mXGR2qo-D: queued
Project: @demo/erden-demo@0.1.0 (https://example.invalid/erden/demo)
Visibility: public
Report page: https://registry.example/publications/attempt%3AuvI-plIBQUxzOwqUtrb_uD-oq2RGXm0uu0mXGR2qo-D/reportThe command returns as soon as the upload is queued. Copy the attempt ID, the part starting with attempt:. The
report page is ready once validation finishes.
Wait for validation
The registry now repeats all six validation stages. Follow it with the attempt ID:
erden publication attempt:uvI-plIBQUxzOwqUtrb_uD-oq2RGXm0uu0mXGR2qo-D --wait --reportWhat you should see, usually within seconds:
Publication attempt:uvI-plIBQUxzOwqUtrb_uD-oq2RGXm0uu0mXGR2qo-D: succeeded
Project: @demo/erden-demo@0.1.0 (https://example.invalid/erden/demo)
Visibility: public
Report: succeeded
Validation: passed
Stages: citations=passed, competencyQuestions=passed, core=passed, reasoning=passed, shacl=passed, sources=passed
Warnings: 1
SHACL: violation=0, warning=0, info=0
Competency questions: executed=1, dormant=0
Report page: https://registry.example/publications/attempt%3AuvI-plIBQUxzOwqUtrb_uD-oq2RGXm0uu0mXGR2qo-D/reportRead the publication report
Members of the organization can open the full report in the browser: open the Report page link that
erden publish and erden publication print. For the attempt above, that is
https://registry.example/publications/attempt%3AuvI-plIBQUxzOwqUtrb_uD-oq2RGXm0uu0mXGR2qo-D/report.
The link writes the : in the attempt ID as %3A. If you type the address yourself with a plain :, the registry
sends you on to the same page. If you are not signed in, it asks you to sign in first, and anyone who is not a member
of the organization gets a page-not-found answer.
Open your release
Go to /@demo/erden-demo/v/0.1.0 (with your namespace), or click the layer on the registry home page.
Scroll down to see the README, rendered from the release's files:
What you should see
Your layer's title, its alias under your namespace, Current release 0.1.0, Validation: Passed, and an
Install box with erden add @demo/erden-demo@0.1.0.
Publish a new release
A release never changes. To change your layer, edit the files and publish a higher version. Later releases of an existing layer need no flags.
For example, add a class to the end of ontology.ttl:
demo:ReviewedArtifact a owl:Class ;
rdfs:subClassOf demo:PublishedArtifact ;
rdfs:label "Reviewed artifact" ;
rdfs:comment "A published artifact that a second person has reviewed." .Then check and publish a prerelease:
erden check --offline
erden publish 0.2.0-beta.1$ erden publish 0.2.0-beta.1
Publication attempt:Z_ENjUFunAcNSYZc74aVcNl_yowXi8U55U8iXwoy_lN: queued
Project: @demo/erden-demo@0.2.0-beta.1 (https://example.invalid/erden/demo)
Visibility: public
Report page: https://registry.example/publications/attempt%3AZ_ENjUFunAcNSYZc74aVcNl_yowXi8U55U8iXwoy_lN/reportFollow it with erden publication <attempt-id> --wait --report as before. The layer page now lists both versions,
and you can compare them.
If it looks different
erden publish says the manifest has no registry
Add "registry": "https://registry.erden.sh" to erden.config.json. erden init writes it for new projects.
Publishing is refused because you may not publish there
Check three things on your account page: you are a member of the organization, your role is publisher or higher,
and the alias's scope (the part after @) is exactly your organization's namespace.
Publishing is refused because the identity is taken
Someone on this registry already published a layer with the demo's canonical IRI. Change canonicalIri in the
manifest to a new address, for example https://example.invalid/erden/demo-yourname, run erden install --offline
again, and publish.
The attempt ends as failed
Run erden publication <attempt-id> --report and read the stage that failed, or open the report page. Fix the
problem, check locally, and publish again.
The version already exists
Each version can be published once. Pick the next version number.