Skip to content

Commit 55b7be4

Browse files
Merge pull request #41 from casework/ONT-463
Bump CASE submodule to 0.6.0
2 parents f174764 + ecc5d60 commit 55b7be4

32 files changed

+19190
-113
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "dependencies/CASE"]
22
path = dependencies/CASE
33
url = https://github.com/casework/CASE.git
4-
[submodule "dependencies/CASE-Examples-QC"]
5-
path = dependencies/CASE-Examples-QC
6-
url = https://github.com/ajnelson-nist/CASE-Examples-QC.git

CONTRIBUTE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
1. After cloning this repository, ensure the CASE submodule is checked out. This can be done with either `git submodule init && git submodule update`, `make .git_submodule_init.done.log`, or `make check`.
77
2. Update the CASE submodule pointer to the new tagged release.
88
3. The version of CASE is also hard-coded in [`case_utils/ontology/version_info.py`](case_utils/ontology/version_info.py). Edit the variable `CURRENT_CASE_VERSION`.
9-
4. From the top source directory, run `make clean`. This guarantees a clean state of this repository as well as the ontology submodules.
10-
5. Still from the top source directory, run `make`.
11-
6. Any new `.ttl` files will be created under [`case_utils/ontology/`](case_utils/ontology/). Use `git add` to add each of them. (The patch-weight of these files could overshadow manual revisions, so it is fine to commit the built files after the manual changes are committed.)
9+
4. A list of built versions of CASE is also hard-coded in [`case_utils/ontology/version_info.py`](case_utils/ontology/version_info.py). Edit the variable `built_version_choices_list`.
10+
5. From the top source directory, run `make clean`. This guarantees a clean state of this repository as well as the ontology submodules.
11+
6. Still from the top source directory, run `make`.
12+
7. Any new `.ttl` files will be created under [`case_utils/ontology/`](case_utils/ontology/). Use `git add` to add each of them. (The patch-weight of these files could overshadow manual revisions, so it is fine to commit the built files separately from the manual changes being committed. Preferably, commit the built files *before* manual changes - this prevents later issues with a `git bisect` that relies on CI passing.)
1213

1314
Here is a sample sequence of shell commands to run the build:
1415

@@ -29,6 +30,6 @@ pushd case_utils/ontology
2930
popd
3031
make check
3132
# Assuming `make check` passes:
33+
git commit -m "Build CASE 0.6.0 monolithic .ttl files" case_utils/ontology/case-0.6.0-subclasses.ttl case_utils/ontology/case-0.6.0.ttl
3234
git commit -m "Update CASE ontology pointer to version 0.6.0" dependencies/CASE case_utils/ontology/version_info.py
33-
git commit -m "Build CASE 0.6.0.ttl" case_utils/ontology/case-0.6.0.ttl
3435
```

Makefile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@ all: \
3232
cd dependencies \
3333
&& git diff . \
3434
| cat
35-
git submodule init dependencies/CASE-Examples-QC
36-
git submodule update dependencies/CASE-Examples-QC
37-
# Build an ontology terms list, which has a side effect of initiating further submodules.
38-
$(MAKE) \
39-
--directory dependencies/CASE-Examples-QC \
40-
.git_submodule_init.done.log \
41-
.venv.done.log
42-
$(MAKE) \
43-
--directory dependencies/CASE-Examples-QC/tests \
44-
ontology_vocabulary.txt
4535
test -r dependencies/CASE/ontology/master/case.ttl \
4636
|| (git submodule init dependencies/CASE && git submodule update dependencies/CASE)
4737
test -r dependencies/CASE/ontology/master/case.ttl
@@ -91,10 +81,6 @@ clean:
9181
tests/examples \
9282
|| true \
9383
)
94-
@#Remove flag files that are normally set after deeper submodules and rdf-toolkit are downloaded.
95-
@rm -f \
96-
dependencies/CASE-Examples-QC/.git_submodule_init.done.log \
97-
dependencies/CASE-Examples-QC/.lib.done.log
9884

9985
# This recipe guarantees timestamp update order, and is otherwise intended to be a no-op.
10086
dependencies/CASE/ontology/master/case.ttl: \

case_utils/case_file/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
DEFAULT_PREFIX = "http://example.org/kb/"
3131

3232
NS_RDF = rdflib.RDF
33-
NS_UCO_CORE = rdflib.Namespace("https://unifiedcyberontology.org/ontology/uco/core#")
33+
NS_UCO_CORE = rdflib.Namespace("https://ontology.unifiedcyberontology.org/uco/core/")
3434
NS_UCO_OBSERVABLE = rdflib.Namespace(
35-
"https://unifiedcyberontology.org/ontology/uco/observable#"
35+
"https://ontology.unifiedcyberontology.org/uco/observable/"
3636
)
37-
NS_UCO_TYPES = rdflib.Namespace("https://unifiedcyberontology.org/ontology/uco/types#")
37+
NS_UCO_TYPES = rdflib.Namespace("https://ontology.unifiedcyberontology.org/uco/types/")
3838
NS_UCO_VOCABULARY = rdflib.Namespace(
39-
"https://unifiedcyberontology.org/ontology/uco/vocabulary#"
39+
"https://ontology.unifiedcyberontology.org/uco/vocabulary/"
4040
)
4141
NS_XSD = rdflib.XSD
4242

case_utils/case_sparql_construct/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ def main() -> None:
4242
else logging.INFO
4343
)
4444

45-
built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]
46-
4745
parser.add_argument("-d", "--debug", action="store_true")
4846
parser.add_argument(
4947
"--built-version",

case_utils/case_sparql_select/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def main() -> None:
5757
else logging.INFO
5858
)
5959

60-
built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]
61-
6260
parser.add_argument("-d", "--debug", action="store_true")
6361
parser.add_argument(
6462
"--built-version",

case_utils/case_validate/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ def main() -> None:
6363
else logging.INFO
6464
)
6565

66-
built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]
67-
6866
# Add arguments specific to case_validate.
6967
parser.add_argument(
7068
"-d", "--debug", action="store_true", help="Output additional runtime messages."

0 commit comments

Comments
 (0)