Giter VIP home page Giter VIP logo

plow's Introduction

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

plow's People

Contributors

alisomay avatar bdart avatar hobofan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

stet

plow's Issues

Add visualization or list of ontology classes and properties

The ontology registry seems like a great idea. It would be nice if I could read a bit about what types of entities and relationships the ontology describes directly on the site rather than looking up the ontology elsewhere (or following the Github link). Also, you could embed WebVOWL on a tab in the page so users could explore it visually.

Allow field retrieval if not logged in

When trying to set up integration tests for plow protege/plow update, I ran into the problem that apparently on the /v1/artifact/signed-url/<cksum> route, requests without a valid token are not authorized, even for public fields.

Things to do here:

  • Adjust backend so that requests for fields without an Authorization header are permitted
  • Adjust the logic in plow_cli/src/resolve.rs to not send an Authorization header if the field to be retrieved is public

Wrong mention of Field33 in lockfile

The Plow.lock currently contains "generated by Field33" in the auto-generated warning:

let mut lock_file_contents = "# This file is automatically generated by Field33.\n# It is not intended for manual editing.\n\n".to_owned();

It should reference Plow and not Field33.

My suggestion would be generated by Field33 -> generated by the Plow package manager.

Add Support for "open in Protégé" via CLI

Description

The goal is to extend the CLI tooling towards opening an ontology with its dependencies in a GUI-driven Editor such as Protégé. By that, we want to increase accessibility beyond editing ontologies and their dependencies in a Code Editor only.

Set up tests for macOS in CI

Would be great to have tests covering macOS (both aarch64 and amd64) in CI.

More or less a blocker for providing prebuilt binaries for macOS in #1.

This may be simplified by removing the dependency on OpenSSL (maybe switching to rustls where possible).

Plow init should generate varying metadata in a way that they are commented out

plow init currently generates an ontology document with all the required values prefilled to default values.

While this certainly provides a low-friction way towards submitting the ontology, this will likely result in all those metadata fields not being changed by most ontologies, and all those packages being published by "John Doe", etc..

Provide a better experience for using resolved fiels in (third party) tools

Right now we have two main ways that a set of field dependencies are usable:

  • Via the CLI via the plow protege command (downside: format specific to Protege)
  • Via the libraries (downside: not usable via the CLI)

To be better usable across a wide variety of tools it would be good to make the output of the dependency resolution and retrieval process accessible in an easy to digest way, which any other tools could integrate with.

E.g. we could have a plow install command, which places (or symlinks) the retrieved fields into a directory inside the workspace (e.g. plow_fields as an analogue to node_modules), together with metadata that would make it easy to load those fields.

Set up shields.io badges

Badges in READMEs can be a really good way to improve the developer experience for an ecosystem, as they can provide a consistently recognizable link to a website with more information (like the registry) in an otherwise unstructured (= of always varying structure) block of text.

Shields.io provides the commonly used service for that (with integrations to all the popular package managers): https://shields.io/category/version

Examples for what the badge could look like:


This is a twin issue to bazel-contrib/bcr-ui#29 which I want to tackle at some point. Depending on where I get around to implementing it first, I think we can benefit from the experience.

Only request private index if necessary

Description

We want to support consuming public ontologies without the need to login. However currently the private index (which requires a login) is retrieved on every plow command.

Instead the private index should only be retrieved if a package name is encountered that cannot be found in the public index.

Support field pages without version specified in URL

This URL works:

https://registry.field33.com/field/@foaf_mirror/foaf/0.99.0

This one doesn't:

https://registry.field33.com/field/@foaf_mirror/foaf

It should be possible to link to a field without having to specify an explicit version. This will make it a lot easier to allow for external sources to link to a field (e.g. also to support #20).

Set up asdf plugin

With asdf, which has a plugin system, we could "easily" get a version manager for the plow CLI itself.

Most likely blocked by #1

Plow init generates `fieldFormatVersion`

Plow init currently generates a registry:fieldFormatVersion, which deviates from the registry:ontologyFormatVersion, which we assume at every other location in the tooling.

Add namespace pages; e.g. `/namespace/@fld33`

It would be great to have pages like /namepsace/@fld33 which list all packages from the @fld33 namespace. For projects that maintain multiple packages rather than a few individual ones, this would provide them with a better link.

Plow registry: downloadable files should be named using ontology name plus (selected) version

I am not sure, if this repository is the right place for my request. Please move, if it isnt.

When opening an ontology in Plow Registry (like https://registry.field33.com/field/@fld33/people/0.1.5), the file given under Download has a name which consists of random letters and numbers.

Is it possible to use the name of the ontology plus the version I selected? For the mentioned link it would be people-0.1.5.ttl. That would make it easier in case someone starts to download and check a couple of your ontologies.

Add "browse all fields" page

Right now the way to browse all fields is done via listing all fields on the index page under the "recently updated" section, which won't be tractable in the long-term as the amount of fields in the registry grows.

Instead, there should be a dedicated page that allows for browsing all packages in a paginated manner (and restricting the "recently updated" section to the ~20 latest)

Provide prebuilt binaries for CLI

To provide a better onboarding experience, as well as faster setup in CI settings, we are looking to provide pre-built binaries for the Plow CLI.

Update:

  • We now provide prebuilt binaries (under the "Releases" tab) for Linux
  • Prebuilt binaries for macOS (and Windows) are blocked on getting them building in CI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.