Skip to content

Command line reference

stuckyb edited this page Jun 30, 2017 · 11 revisions

OntoPilot command-line reference

  1. Overview
  2. OntoPilot tasks
    1. initialize
    2. make
    3. errorcheck
    4. update_base
  3. General options

Overview

The basic format of all OntoPilot commands is

ontopilot [options] TASK_NAME [TASK_ARGUMENT] [options]

where TASK_NAME is one of error_check, initialize, make, update_base, or inference_pipeline. Some tasks require a value for TASK_ARGUMENT, and some tasks accept one or more options. Options can be specified either before or after TASK_NAME and TASK_ARGUMENT.

OntoPilot tasks

initialize

Turns the current directory into a new OntoPilot ontology project. The name of the compiled ontology file for the new project must be provided as the value of TASK_ARGUMENT. For example:

$ ontopilot initialize demo.owl

Or, equivalently (task names may be abbreviated):

$ ontopilot init demo.owl

For more information about the results of running the initialize command, see creating a new ontology project.

make

make is the workhorse OntoPilot command; it is used to build ontologies, import modules, ontology releases, and ontology documentation. The make command is called as follows:

$ ontopilot [options] make TARGET

where TARGET is one of imports, ontology, release, or documentation. Each of these is summarized in the following table, including any relevant options that modify the behavior of the command.

Target Purpose Options Examples
imports Builds the imports modules. None. $ ontopilot make imports
ontology Compiles an OWL ontology document. -m or --merge_imports: Merge import axioms and entities into the target ontology.
-r or --reason: Add inferred axioms to the ontology.
$ ontopilot make ontology
$ ontopilot make ontology -m -r
release Makes an ontology release. -d or --release_date: Set a custom date for the release. The date must be in the format YYYY-MM-DD. $ ontopilot make release
$ ontopilot make release --release_date 2017-02-24
documentation Builds the ontology documentation files. None. $ ontopilot make documentation
$ ontopilot make doc

For more information about the imports and ontology targets, see building the ontology. For more information about the release target, see making a release version of the ontology. For more information about the documentation target, see creating documentation for the ontology.

error_check (or errorcheck)

Runs a consistency check on the compiled ontology and inspects the ontology for unsatisfiable classes. Example:

$ ontopilot errorcheck

update_base (or updatebase)

Adds OWL import statements to the base ontology for each import module. Ordinarily, import statements are only added to compiled ontologies. However, for some ontology development workflows, it might be useful to add the imports directly to the base ontology. For example, if the base ontology is directly edited as part of the development process, it might be necessary for imported entities to be available within the base ontology. Example:

$ ontopilot update_base

General options

A few options are not specific to any particular task. These include:

  • -h or --help: Print usage information to the console.
  • -c or --config_file: Use a custom project configuration file.
  • -f or --force: Rebuild all components (ontology, imports, or both, depending on the build task), even if they appear to be up to date.

For example, to show help information:

$ ontopilot -h

To specify a custom project configuration file for compiling an ontology:

$ ontopilot -c /path/to/config_file.conf make ontology

To force the compiled ontology to be (re)built, even if it appears to be up to date:

$ ontopilot make ontology --force