Use Focus Node Filtering and SHACL Shape Selection
masterPySHACL (v0.27.0+) allows highly targeted validation using two features:
- Focus Node Filtering: Pass a list of specific focus nodes to validate only those nodes. The shapes must still target these nodes, but the validator will filter the shapes' targets to match your list.
- SHACL Shape Selection: Pass a list of specific SHACL Shapes to use for validation. This is useful for testing specific shapes within a larger graph.
- Combined Mode: If you provide both a list of Shapes and a list of focus nodes, the validator operates in a highly-targeted mode, feeding the focus nodes directly into the selected shapes. In this mode, the selected shapes do not need to specify their own focus-targeting mechanisms.