Skip to content

Commit 4fec174

Browse files
committed
Fix code blocks (md → rst)
1 parent ce1302f commit 4fec174

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/reference-implementation/library.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ Library
77

88
The reference implementation can also be used as a Python library for integration into
99
other tools.
10-
E.g., to "parameterize" a graph which contains `sc:Parameter` objects, you can use the
10+
E.g., to "parameterize" a graph which contains ``sc:Parameter`` objects, you can use the
1111
following snippet:
1212

13-
```python
14-
from rdflib import Graph
15-
from software_card_policies.data_model import parameterize_graph
13+
.. code:: python
14+
:caption: Graph parameterization using the library.
1615
17-
policy_graph = Graph() # the graph containing policies with parameter placeholders
18-
config_parameters = {} # the values to override the placeholders
16+
from rdflib import Graph
17+
from software_card_policies.data_model import parameterize_graph
1918
20-
parameterized_graph = parameterize_graph(policy_graph, config_parameters)
21-
```
19+
policy_graph = Graph() # the graph containing policies with parameter placeholders
20+
config_parameters = {} # the values to override the placeholders
21+
22+
parameterized_graph = parameterize_graph(policy_graph, config_parameters)
2223
2324
The full validator implementation based on the library can be found in
2425
``software_card_policies.__main__``.

docs/reference-implementation/validator.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ Validator
88
The validator can be run using the ``software-card-validate`` command which is
99
equivalent to ``python -m software_card_policies``.
1010

11-
Basic usage:
11+
.. code:: bash
12+
:caption: Basic usage.
1213
13-
```bash
14-
software-card-validate --config config.toml metadata.ttl
15-
```
14+
software-card-validate --config config.toml metadata.ttl
1615
17-
This will:
16+
This example will:
1817

19-
1. Load policies specified in `config.toml`
18+
1. Load policies specified in ``config.toml``
2019
2. Resolve any parameters from the configuration
21-
3. Validate the metadata in `metadata.ttl` using the given policies
20+
3. Validate the metadata in ``metadata.ttl`` using the given policies
2221
4. Print a validation report

0 commit comments

Comments
 (0)