Skip to content

Commit e0ca0ce

Browse files
committed
Add multi-data-graph handling to case_validate
References: * [AC-210] Add validation command to CASE-Utilities-Python Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent adff60e commit e0ca0ce

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This repository provides `case_validate` as an adaptation of the `pyshacl` comma
2727
To see a human-readable validation report of an instance-data file:
2828

2929
```bash
30-
case_validate input.json
30+
case_validate input.json [input-2.json ...]
3131
```
3232

3333
If `input.json` is not conformant, a report will be emitted, and `case_validate` will exit with status `1`. (This is a `pyshacl` behavior, where `0` and `1` report validation success. Status of >`1` is for other errors.)

case_utils/case_validate/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,14 @@ def main() -> None:
119119
default=sys.stdout,
120120
)
121121

122-
parser.add_argument("in_graph")
122+
parser.add_argument("in_graph", nargs="+")
123123

124124
args = parser.parse_args()
125125

126126
data_graph = rdflib.Graph()
127-
data_graph.parse(args.in_graph)
127+
for in_graph in args.in_graph:
128+
_logger.debug("in_graph = %r.", in_graph)
129+
data_graph.parse(in_graph)
128130

129131
ontology_graph = rdflib.Graph()
130132
if args.built_version != "none":

0 commit comments

Comments
 (0)