Skip to content

Command line reference

stuckyb edited this page Apr 6, 2017 · 11 revisions

OntoPilot command-line reference

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

Overview

The basic format of all OntoPilot commands is

ontopilot.py [options] TASK_NAME [TASK_ARGUMENT]

where TASK_NAME is one of errorcheck, initialize, make, or update_base. Some tasks require a value for TASK_ARGUMENT, and some tasks accept one or more options.

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.py -h

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

$ ontopilot.py -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.py --force make ontology

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.py initialize demo.owl

Or, equivalently (task names may be abbreviated):

$ ontopilot.py 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, and ontology releases. The make command is called as follows:

$ ontopilot.py [options] make TARGET

where TARGET is one of imports, ontology, or release. Each of these is summarized in the following table.

Target Purpose Options
imports Builds the imports modules. None.
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.
release Makes an ontology release. -d or --release_date: Set a custom date for the release.

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.

errorcheck

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

$ ontopilot.py errorcheck

update_base

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.py update_base
Clone this wiki locally