OTO
reference · oto ontology --help at v0.6.1

oto ontology

the project's vocabulary, and the catalogue of ontologies to start from

oto ontology [-h] [--project PROJECT] [--show SHOW] [--file FILE] [--from FROM_NAME]
                    [--replace] [--strict] [--frequent FREQUENT] [--path PATH] [--ref REF]
                    [--note NOTE] [--registry-name REGISTRY_NAME] [--engine ENGINE] [--name NAME]
                    [--to TO] [--summary SUMMARY] [--from-graph FROM_GRAPH] [--force]
                    [{check,accept,rationale,widen,import,list,show,export,add,update,diff,publish}]
                    [which ...]

Verbs

  • on the project's own vocabulary: check (default) reports changes and conformance
  • accept records it as the baseline
  • rationale reports whether each class has a recorded reason and who confirmed it
  • widen proposes what the data uses
  • import merges a file or a named ontology into it. On the catalogue: list, show <name>, export --name, add <name|name@release|url>, update [<name>], diff against what this project started from, publish --to <registry>

which show: a name; add: a name, name@release or git URL; update: a name

Options

OptionWhat it does
--project PROJECTproject root (default: current directory)
--show SHOWhow many mismatch patterns to list
--file FILEfor import: a vocabulary as .ttl (as Oto emits it), .csv or .json
--from FROM_NAMEfor import: an ontology name, or several comma-separated to merge; for publish: publish this ontology from this machine instead of exporting the project
--replacefor import: overwrite classes and relations already declared
--strictexit non-zero on a breaking change with no version bump
--frequent FREQUENThow often a pattern must occur before `widen` treats it as real usage rather than a mistake in the data (default 5)
--path PATHfor add <url>: the ontology's directory inside the repository
--ref REFfor add <url> and publish: a branch or tag
--note NOTEfor publish: the changelog entry for this release
--registry-name REGISTRY_NAMEfor publish into an empty repository: the registry's name
--engine ENGINEfor publish: the engine repository the registry's check workflow installs
--name NAMEthe ontology's name, for export and publish
--to TOfor export: the directory to write under (default: your ontology directory); for publish: the registry's git URL
--summary SUMMARYone line saying what the vocabulary covers
--from-graph FROM_GRAPHfor export and publish: take up to N real nodes from the graph as the sample instead of inventing one; refused if the privacy scan blocks it
--forcefor export and add: replace an existing ontology of that name

Where to use it

Which ontologies can I start from, and what does one hold?

oto ontology list
oto ontology show auto-claims

the catalog on this machine and in the registries; one ontology composed, with its classes and changelog

You changed ontology.config.json. What does it break?

oto ontology check --project claims --strict

reports conformance and, after a rename, a breaking change with the number of nodes it touches

Record the vocabulary as the baseline, then require a reason and a name for every class.

oto ontology accept --project claims
oto ontology rationale --project claims --strict

writes ontology.lock.json; rationale fails until every class has a reason and a named person

The data uses relations more widely than the vocabulary declares.

oto ontology widen --project claims

proposes honest domain and range widenings rather than silently accepting a violation

You own a vocabulary already, as CSV, JSON or Turtle.

oto ontology import --project claims --file vocabulary.csv

merges it into the project's vocabulary; --replace overwrites what is already declared

One project's vocabulary should start the next.

oto ontology export --project claims --name meridian-claims --summary "Claims as Meridian handles them"

an ontology under ~/.oto/ontologies with an invented sample and every confirmation blanked

A newer release of the ontology you started from exists.

oto ontology diff --project claims-eu
oto ontology update

classifies the change and counts the nodes it touches; update brings the release

Release it to your registry.

oto ontology publish --project claims --to https://github.com/<org>/oto-registry --name meridian-claims --note "first cut"

tags meridian-claims/v1; refused if the publishability scan finds a deny term

As the terminal prints it
usage: oto ontology [-h] [--project PROJECT] [--show SHOW] [--file FILE] [--from FROM_NAME]
                    [--replace] [--strict] [--frequent FREQUENT] [--path PATH] [--ref REF]
                    [--note NOTE] [--registry-name REGISTRY_NAME] [--engine ENGINE] [--name NAME]
                    [--to TO] [--summary SUMMARY] [--from-graph FROM_GRAPH] [--force]
                    [{check,accept,rationale,widen,import,list,show,export,add,update,diff,publish}]
                    [which ...]

positional arguments:
  {check,accept,rationale,widen,import,list,show,export,add,update,diff,publish}
                        on the project's own vocabulary: check (default) reports changes and
                        conformance; accept records it as the baseline; rationale reports whether
                        each class has a recorded reason and who confirmed it; widen proposes what
                        the data uses; import merges a file or a named ontology into it. On the
                        catalogue: list, show <name>, export --name, add <name|name@release|url>,
                        update [<name>], diff against what this project started from, publish --to
                        <registry>
  which                 show: a name; add: a name, name@release or git URL; update: a name

options:
  -h, --help            show this help message and exit
  --project PROJECT     project root (default: current directory)
  --show SHOW           how many mismatch patterns to list
  --file FILE           for import: a vocabulary as .ttl (as Oto emits it), .csv or .json
  --from FROM_NAME      for import: an ontology name, or several comma-separated to merge; for
                        publish: publish this ontology from this machine instead of exporting the
                        project
  --replace             for import: overwrite classes and relations already declared
  --strict              exit non-zero on a breaking change with no version bump
  --frequent FREQUENT   how often a pattern must occur before `widen` treats it as real usage
                        rather than a mistake in the data (default 5)
  --path PATH           for add <url>: the ontology's directory inside the repository
  --ref REF             for add <url> and publish: a branch or tag
  --note NOTE           for publish: the changelog entry for this release
  --registry-name REGISTRY_NAME
                        for publish into an empty repository: the registry's name
  --engine ENGINE       for publish: the engine repository the registry's check workflow installs
  --name NAME           the ontology's name, for export and publish
  --to TO               for export: the directory to write under (default: your ontology
                        directory); for publish: the registry's git URL
  --summary SUMMARY     one line saying what the vocabulary covers
  --from-graph FROM_GRAPH
                        for export and publish: take up to N real nodes from the graph as the
                        sample instead of inventing one; refused if the privacy scan blocks it
  --force               for export and add: replace an existing ontology of that name