pyiron_ontology.example.constructor module

A constructor for building a minimal ontology, both for a pedagogical example and for tests.

class pyiron_ontology.example.constructor.ExampleOntology(name: str = 'example', closed: bool = True, strict: bool = True)[source]

Bases: Constructor

The ontology represents simple three layer diagrams input->middle->output, with different choices available at each layer. The final output layer has four options, which have restrictions on all combinations in the (generic, requirements) square, allowing for progressively fewer possible three-layer graphs.

In the middle layer there’s a bit of extra unused input and output, just so we can test to make sure we count everything correctly in non-trivial ways.

At the domain knowledge level (i.e. the Generic things we define) we show how to achieve mutual exclusion by use of disjoint classes and instantiating individuals.

Terminology goes: I:Input:InpMid:Middle:MidOut:Output:O, with letters and numbers to distinguish siblings/inheritance.