#plow #package-management #pubgrub

plow_package_management

Plow: A package manager for ontologies

13 releases

0.3.4 Apr 27, 2023
0.3.3 Mar 27, 2023
0.3.1 Jan 6, 2023
0.3.0 Sep 8, 2022
0.1.0 Jul 11, 2022

#645 in Web programming

Download history 24/week @ 2023-10-25 30/week @ 2023-11-01 24/week @ 2023-11-08 35/week @ 2023-11-15 31/week @ 2023-11-22 64/week @ 2023-11-29 27/week @ 2023-12-06 30/week @ 2023-12-13 30/week @ 2023-12-20 24/week @ 2023-12-27 25/week @ 2024-01-03 17/week @ 2024-01-10 17/week @ 2024-01-17 23/week @ 2024-01-24 24/week @ 2024-01-31 22/week @ 2024-02-07

90 downloads per month
Used in 4 crates (3 directly)

MIT/Apache

135KB
2.5K SLoC

Plow logo

Plow - Ontology package manager

Plow is package management solution for OWL ontologies, with support for specifying dependencies between packages via SemVer ranges.

Getting started - Installation

CLI

The CLI supports basic commands related to consuming and producing ontologies. It is suitable for both manual and automated workflows (e.g. metadata linting in CI)

To install our prebuilt binaries (available for Linux and macOS), run:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/field33/plow/releases/download/plow_cli-v0.5.2/plow_cli-installer.sh | sh

You can also install from source via:

cargo install plow_cli

Prebuilt binaries are coming soon!

GUI

The plow_gui crate is obsolete and usage of it is discouraged.

A new ontology editor is in the works, and will be released as a separate project.

Basic usage

Login with Plow

The tooling currently expects you to be authenticated with the public plow registry (open issue). Please sign in, creating an account here and create a new api token in your account settings.

plow login <api-token>

Initialize workspace

Create the directory you want to organize your fields (= ontologies) in.

# Create workspace directory
mkdir example_workspace && cd example_workspace

# Crate your first field (.ttl file), or copy existing fields into the workspace
plow init --field @example_namespace/example_name

# To initialize a workspace run
plow init

Initialize a new field (= ontology)

Example 1

To create a new field with all the necessary metadata run:

plow init --field @example_namespace/example_name

Example 2

When run under an initialized workspace, this will create the relevant folder structure in the fields directory:

├── Plow.toml
└── fields
    └── @example_namespace
        └── example_fieldname.ttl

Example 3

If run outside of a workspace, it will create a new .ttl file in the current directory.

├── example_fieldname.ttl

Running plow init without the --field flag initializes a new workspace and if run after this, results would look like Example 1.

Open a field in protege

If you'd like to open an edit a field in protege, you may use the following command:

# Continuing with the upper example
plow protege example_fieldname.ttl

If you have protege installed in your system and if your field does not have parsing errors, this command will,

  • Resolve the dependencies in your field if any dependencies are present.
  • Inject them to your original field as owl:imports annotations.
  • Make a protege_workspaces directory in ~/Documents/plow, copy your dependencies and hard link your field there.
  • The changes to your field in protege will reflect to your original field permanently.

Submit a field to the registry

To prepare for submitting a new field run the following command:

# Public submission
plow submit <path-to-your-field> --dry-run

# Private submission
plow submit --private <path-to-your-field> --dry-run

The --dry-run flag will indicate our backend to go through the submission pipeline and pre-submission checks but not finalize the submission. If all checks pass you can omit the --dry-run flag and submit your field by running:

# Public submission
plow submit <path-to-your-field>

# Private submission
plow submit --private <path-to-your-field>

Repository contents

Reference implementation and registry.field33.com

We provide a reference implementation of the registry service under plow_backend_reference. The implementation documents and showcases all the REST API endpoints required for package management, but some of the functionality is only implemented in a limited fashio. E.g. it does not persist any data between process restarts, and doesn't include any authentication/authorization, making it unfit for production usage.

For production usage, we provide a hosted registry with a web UI at registry.field33.com. As the underlying codebase is strongly connected to other parts of our products, it is currently not viable for us to maintain the registry publicly, but that may change in the future.

Citing

If you use Plow in the context of a published academic piece of work, please consider citing:

@incollection{Plow,
  title = {Plow: A Novel Approach to Interlinking Modular Ontologies Based on Software Package Management},
  doi = {10.3233/ssw220015},
  url = {https://doi.org/10.3233/ssw220015},
  year = {2022},
  month = sep,
  publisher = {{IOS} Press},
  author = {Maximilian Goisser and Daniel Fiebig and Sebastian Wohlrapp and Georg Rehm},
  booktitle = {Towards a Knowledge-Aware {AI}}
}

Contributing

We are happy about any contributions!

To get started you can take a look at our Github issues.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

License

Licensed under either of

Dependencies

~25MB
~526K SLoC