Metadata-Version: 2.5
Name: katalyst-core
Version: 0.3.2a26
Summary: katalyst-core — the LinkML module every Katalyst schema module imports
Author: eSimplicity
License: Proprietary
Requires-Python: <3.14,>=3.13
Requires-Dist: linkml-runtime<2,>=1.12
Requires-Dist: pyoxigraph>=0.5.12
Requires-Dist: pyshacl>=0.30
Requires-Dist: pyyaml>=6
Requires-Dist: rdflib>=7
Provides-Extra: generators
Requires-Dist: linkml-map<0.6,>=0.5.4; extra == 'generators'
Requires-Dist: linkml<2,>=1.12; extra == 'generators'
Requires-Dist: pint<0.26,>=0.25; extra == 'generators'
Description-Content-Type: text/markdown

# katalyst-core

The LinkML module every Katalyst schema module imports
(`src/katalyst_core/schema/katalyst_core.yaml`):

- `Node`: the base node. Identity (`id`, a URI under a declared prefix; core itself is `https://w3id.org/katalyst/core/`, prefix `kc:`), `kind`, `name`, `description`.
- Lifecycle: `lifecycle_state`, one lifecycle for every node of every kind (draft, proposed,
  active, deprecated, rejected, retired). The `LifecycleState` enum declares it with
  annotations on its values (`transitions_to`, `initial`, `default`, `hidden`, `gate`); a kind
  inherits it, cannot change it, and may declare `lifecycle_gates` for entering a state. A
  record that does not say is active. See `docs/user-guide/concepts/lifecycle.md`.
- Provenance: `source`, `activity`, `derived_from`, and `forced_moves` (a lifecycle move made
  against the rules, with who and why).
- Two times: valid time (`valid_from`/`valid_to`) and recorded time (`recorded_from`/`recorded_to`).
- `Relation`: a reified relationship (`subject`, `predicate`, `object`) with a `confidence`
  and its own provenance and times.
- The extension bag (`extensions`): data no loaded module defines, kept and never deleted.
- `DeletePolicy` (block, cascade, detach, redirect): every relationship slot carries one
  as its `delete_policy` annotation.
- `parent`: the structural parent edge (`child_of`). A class lists it under `slots:` and
  names its parent kinds under `slot_usage: parent:`. No module defines `parent` again;
  one that does is refused when it loads.

A module imports it as `katalyst_core`:

```yaml
imports:
  - linkml:types
  - katalyst_core
```

The Python package defines no schema. It opens modules (`open_module`), holds them to the
core contract (`contract.check_contract`, `kata core check`), and moves records between
YAML and RDF (`graph.to_graph` / `graph.from_graph`, `kata core save` / `kata core load`).

Lint the schema with the LinkML linter: `just core-lint`. The runtime depends on `linkml-runtime` (schema views, loaders, dumpers), not on the full `linkml` toolchain: the local shapes of every write and of the data linter are written from the module by `katalyst_core.shacl`, to the graph LinkML's SHACL generator writes. The toolchain is the `generators` extra: `pip install 'katalyst-core[generators]'`. It is for `kata core migrate` (LinkML-Map), the LinkML linter, and the shapes of a module that uses what `katalyst_core.shacl` does not write (`rules`, `subproperty_of`, `in_language`, an `ifabsent` of a date or time); a command that needs it, without it, says so.
