mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
docs: fix remaining stale semantica[shacl] references in Part 6
This commit is contained in:
@@ -968,7 +968,7 @@
|
||||
"\n",
|
||||
"SHACL (Shapes Constraint Language) is the W3C standard for defining constraints on graph data and validating records against them: the graph-data equivalent of a JSON Schema. A patient record whose diagnosis or prescription field holds free text instead of a real link to a `Disease` or `Drug` node should be caught by that validation layer rather than reaching a downstream consumer silently. `OntologyEngine.to_shacl` generates shapes directly from the `ontology` object built in Part 3, so the shapes below only ever constrain classes and properties that ontology actually contains (`Disease`, `Drug`, `Patient`, and the `diagnosedWith`/`prescribed`/`treats`/`comorbidWith` relationships); we pass `base_uri=BASE_URI` explicitly so the shapes are minted in our own namespace rather than Semantica's internal default.\n",
|
||||
"\n",
|
||||
"Live validation needs `pyshacl` (`pip install semantica[shacl]`); without it, we still see exactly what the generated shapes would enforce."
|
||||
"Live validation needs `pyshacl` (`pip install pyshacl` — see issue #736); without it, we still see exactly what the generated shapes would enforce."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1028,9 +1028,9 @@
|
||||
" for v in report.violations:\n",
|
||||
" print(\" -\", getattr(v, \"explanation\", v))\n",
|
||||
" except ImportError as e:\n",
|
||||
" print(f\"pyshacl not installed: {e}. Install with `pip install semantica[shacl]`.\")\n",
|
||||
" print(f\"pyshacl not installed: {e}. Install with `pip install pyshacl` (see issue #736 for the missing semantica[shacl] extra).\")\n",
|
||||
"else:\n",
|
||||
" print(\"Skipping live SHACL validation (set USE_PYSHACL=true and install semantica[shacl] to enable).\")\n",
|
||||
" print(\"Skipping live SHACL validation (set USE_PYSHACL=true and install pyshacl to enable).\")\n",
|
||||
" print(\"The generated shapes above already show what would be enforced: free-text values where a\")\n",
|
||||
" print(\"real entity reference belongs, and datatype violations on required properties.\")"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user