@@ -6,48 +6,20 @@ SPDX-FileContributor: David Pape
66
77# Software CaRD Policies
88
9- This repository contains example policies developed as part of the Software CaRD project, as well as a validator tool.
10-
11- ## Conventions
12-
13- All examples in this repository use the following namespace prefix bindings:
14-
15- ``` turtle
16- @prefix codemeta: <https://doi.org/10.5063/schema/codemeta-2.0#> .
17- @prefix owl: <http://www.w3.org/2002/07/owl#> .
18- @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
19- @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
20- @prefix sc: <https://schema.software-metadata.pub/software-card/2025-01-01/#> .
21- @prefix scex: <https://schema.software-metadata.pub/software-card/2025-01-01/examples/#> .
22- @prefix scimpl: <https://schema.software-metadata.pub/software-card/2025-01-01/implementation/#> .
23- @prefix schema: <https://schema.org/> .
24- @prefix sh: <http://www.w3.org/ns/shacl#> .
25- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
26- ```
27-
28- For Software CaRD, the prefixes
29- [ ` sc: ` ] ( https://schema.software-metadata.pub/software-card/2025-01-01/# ) ,
30- [ ` scex: ` ] ( https://schema.software-metadata.pub/software-card/2025-01-01/examples/# ) , and
31- [ ` scimpl: ` ] ( https://schema.software-metadata.pub/software-card/2025-01-01/implementation/# )
32- were established and are used for the following purposes:
33-
34- - ` sc: ` contains terms exposed to users
35- - ` scex: ` contains example uses of ` sc: ` and ` sh: ` terms
36- - ` scimpl: ` contains internal implementation details
37-
38- The associated IRIs currently don't exist.
39- A [ search on prefix.cc] ( https://prefix.cc/sc ) reveals prior usage of the prefix ` sc: ` by projects which seem to be
40- defunct.
9+ This repository contains the ` software_card_policies ` Python library as well as the associated command line program
10+ ` sc-validate ` and example policies.
11+ The software was written as part of the [ Software CaRD] ( https://helmholtz-metadaten.de/en/inf-projects/softwarecard )
12+ project.
4113
4214## ` sc-validate `
4315
44- A program that validates a given metadata file using a set of configurable policies.
16+ A command line program that validates a given metadata file using a set of configurable policies.
4517
46- The selection of policies to use can be configured via [ ` config.toml ` ] ( config.toml ) .
18+ The selection of policies can be configured via [ ` config.toml ` ] ( config.toml ) .
4719Policies can be loaded using any of the protocols supported by
4820[ RDFlib's ` Graph.parse ` method] ( https://rdflib.readthedocs.io/en/stable/apidocs/rdflib.html#rdflib.graph.Graph.parse )
4921(e.g. local files, http, ...).
50- All of the given policies are loaded and merged into one RDF graph (union of all triples of the parts) .
22+ All of the given policies are loaded and unioned into one RDF graph.
5123
5224Policies can be implemented in a configurable fashion by defining an ` sc:Parameter ` and using it in place of a literal
5325or list.
@@ -66,7 +38,7 @@ python -m pip install -e .
6638
6739### Run
6840
69- Start a webserver hosting the policy files (run it in the background or use a separate terminal window):
41+ Start a webserver hosting the example policy files (run it in the background or use a separate terminal window):
7042
7143``` bash
7244python -m http.server -b 127.0.0.1 -d examples/
@@ -79,13 +51,45 @@ sc-validate examples/data/hermes.ttl
7951```
8052
8153This will validate [ ` hermes.ttl ` ] ( examples/data/hermes.ttl ) using the policies defined in [ ` config.toml ` ] ( config.toml )
82- and print the result to the screen.
83- If run in debug mode (with ` --debug ` ), the following files are written to the current working directory:
54+ and print a validation report to the screen.
55+ If run in debug mode (with ` --debug ` ), the report is more verbose, and the following files are written to the current
56+ working directory:
8457
8558- ` debug-input-data.ttl ` : the input data
8659- ` debug-shapes-processed.ttl ` : the parameterized and combined policies
8760- ` debug-validation-report.ttl ` : the detailed SHACL validation report (` sh:ValidationReport ` )
8861
62+ ## Conventions
63+
64+ All examples in this repository use the following namespace prefix bindings:
65+
66+ ``` turtle
67+ @prefix codemeta: <https://doi.org/10.5063/schema/codemeta-2.0#> .
68+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
69+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
70+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
71+ @prefix sc: <https://schema.software-metadata.pub/software-card/2025-01-01/#> .
72+ @prefix scex: <https://schema.software-metadata.pub/software-card/2025-01-01/examples/#> .
73+ @prefix scimpl: <https://schema.software-metadata.pub/software-card/2025-01-01/implementation/#> .
74+ @prefix schema: <https://schema.org/> .
75+ @prefix sh: <http://www.w3.org/ns/shacl#> .
76+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
77+ ```
78+
79+ For Software CaRD, the prefixes
80+ [ ` sc: ` ] ( https://schema.software-metadata.pub/software-card/2025-01-01/# ) ,
81+ [ ` scex: ` ] ( https://schema.software-metadata.pub/software-card/2025-01-01/examples/# ) , and
82+ [ ` scimpl: ` ] ( https://schema.software-metadata.pub/software-card/2025-01-01/implementation/# )
83+ were established and are used for the following purposes:
84+
85+ - ` sc: ` contains terms exposed to users
86+ - ` scex: ` contains example uses of ` sc: ` and ` sh: ` terms
87+ - ` scimpl: ` contains internal implementation details
88+
89+ The associated IRIs currently don't exist.
90+ A [ search on prefix.cc] ( https://prefix.cc/sc ) reveals prior usage of the prefix ` sc: ` by projects which seem to be
91+ defunct.
92+
8993## Acknowledgments
9094
9195[ Software CaRD] ( https://helmholtz-metadaten.de/en/inf-projects/softwarecard ) (` ZT-I-PF-3-080 ` ) is funded by the
0 commit comments