Skip to content

Commit 75124cd

Browse files
Merge pull request #82 from casework/document_built_version_flag
Document --built-version flag
2 parents 1afdb53 + f6522a4 commit 75124cd

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,17 @@ To produce the validation report as a machine-readable graph output, the `--form
5555
case_validate --format turtle input.json > result.ttl
5656
```
5757

58-
To use one or more supplementary ontology files, the `--ontology-graph` flag can be used, more than once if desired, to supplement the selected CASE version:
58+
To use one or more supplementary ontology or shape files, the `--ontology-graph` flag can be used, more than once if desired, to supplement the selected CASE version:
5959

6060
```bash
61-
case_validate --ontology-graph internal_ontology.ttl --ontology-graph experimental_shapes.ttl input.json
61+
case_validate \
62+
--ontology-graph internal_ontology.ttl \
63+
--ontology-graph experimental_shapes.ttl \
64+
input.json
6265
```
6366

67+
This tool uses the `--built-version` flag, described [below](#built-versions).
68+
6469
Other flags are reviewable with `case_validate --help`.
6570

6671

@@ -87,6 +92,8 @@ These commands can be used with any RDF files to run arbitrary SPARQL queries.
8792

8893
Note that prefixes used in the SPARQL queries do not need to be defined in the SPARQL query. Their mapping will be inherited from their first definition in the input graph files. However, input graphs are not required to agree on prefix mappings, so there is potential for confusion from input argument order mattering if two input graph files disagree on what a prefix maps to. If there is concern of ambiguity from inputs, a `PREFIX` statement should be included in the query, such as is shown in [this test query](tests/case_utils/case_sparql_select/subclass.sparql).
8994

95+
These tools use the `--built-version` flag, described [below](#built-versions).
96+
9097

9198
#### `case_sparql_construct`
9299

@@ -116,6 +123,15 @@ case_sparql_select output.md input.sparql input.json [input-2.json ...]
116123
This [module](case_utils/local_uuid.py) provides a wrapper UUID generator, `local_uuid()`. Its main purpose is making example data generate consistent identifiers, and intentionally includes mechanisms to make it difficult to activate this mode without awareness of the caller.
117124

118125

126+
### Built versions
127+
128+
Several tools in this package include a flag `--built-version`. This flag tailors the tool's behavior to a certain CASE ontology version; typically, this involves mixing the ontology graph into the data graph for certain necessary knowledge expansion for pattern matching (such as making queries aware of the OWL subclass hierarchy).
129+
130+
If not provided, the tool will assume a default value of the latest ontology version.
131+
132+
If the special value `none` is provided, none of the ontology builds this package ships will be included in the data graph. The `none` value supports use cases that are wholly independent of CASE, such as running a test in a specialized vocabulary; and also suports use cases where a non-released CASE version is meant to be used, such as a locally revised version of CASE where some concept revisions are being reviewed.
133+
134+
119135
## Development status
120136

121137
This repository follows [CASE community guidance on describing development status](https://caseontology.org/resources/software.html#development_status), by adherence to noted support requirements.

case_utils/case_sparql_construct/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def main() -> None:
4949
"--built-version",
5050
choices=tuple(built_version_choices_list),
5151
default="case-" + CURRENT_CASE_VERSION,
52-
help="Ontology version to use to supplement query, such as for subclass querying. Does not require networking to use. Default is most recent CASE release.",
52+
help="Ontology version to use to supplement query, such as for subclass querying. Does not require networking to use. Default is most recent CASE release. Passing 'none' will mean no pre-built CASE ontology versions accompanying this tool will be included in the analysis.",
5353
)
5454
parser.add_argument(
5555
"--disallow-empty-results",

case_utils/case_sparql_select/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def main() -> None:
6363
"--built-version",
6464
choices=tuple(built_version_choices_list),
6565
default="case-" + CURRENT_CASE_VERSION,
66-
help="Ontology version to use to supplement query, such as for subclass querying. Does not require networking to use. Default is most recent CASE release.",
66+
help="Ontology version to use to supplement query, such as for subclass querying. Does not require networking to use. Default is most recent CASE release. Passing 'none' will mean no pre-built CASE ontology versions accompanying this tool will be included in the analysis.",
6767
)
6868
parser.add_argument(
6969
"--disallow-empty-results",

case_utils/case_validate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def main() -> None:
9292
"--built-version",
9393
choices=tuple(built_version_choices_list),
9494
default="case-" + CURRENT_CASE_VERSION,
95-
help="Monolithic aggregation of CASE ontology files at certain versions. Does not require networking to use. Default is most recent CASE release.",
95+
help="Monolithic aggregation of CASE ontology files at certain versions. Does not require networking to use. Default is most recent CASE release. Passing 'none' will mean no pre-built CASE ontology versions accompanying this tool will be included in the analysis.",
9696
)
9797
parser.add_argument(
9898
"--ontology-graph",

0 commit comments

Comments
 (0)