Skip to content

Bump CASE submodule to 0.6.0 #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "dependencies/CASE"]
path = dependencies/CASE
url = https://github.com/casework/CASE.git
[submodule "dependencies/CASE-Examples-QC"]
path = dependencies/CASE-Examples-QC
url = https://github.com/ajnelson-nist/CASE-Examples-QC.git
9 changes: 5 additions & 4 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
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`.
2. Update the CASE submodule pointer to the new tagged release.
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`.
4. From the top source directory, run `make clean`. This guarantees a clean state of this repository as well as the ontology submodules.
5. Still from the top source directory, run `make`.
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.)
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`.
5. From the top source directory, run `make clean`. This guarantees a clean state of this repository as well as the ontology submodules.
6. Still from the top source directory, run `make`.
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.)

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

Expand All @@ -29,6 +30,6 @@ pushd case_utils/ontology
popd
make check
# Assuming `make check` passes:
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
git commit -m "Update CASE ontology pointer to version 0.6.0" dependencies/CASE case_utils/ontology/version_info.py
git commit -m "Build CASE 0.6.0.ttl" case_utils/ontology/case-0.6.0.ttl
```
14 changes: 0 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ all: \
cd dependencies \
&& git diff . \
| cat
git submodule init dependencies/CASE-Examples-QC
git submodule update dependencies/CASE-Examples-QC
# Build an ontology terms list, which has a side effect of initiating further submodules.
$(MAKE) \
--directory dependencies/CASE-Examples-QC \
.git_submodule_init.done.log \
.venv.done.log
$(MAKE) \
--directory dependencies/CASE-Examples-QC/tests \
ontology_vocabulary.txt
test -r dependencies/CASE/ontology/master/case.ttl \
|| (git submodule init dependencies/CASE && git submodule update dependencies/CASE)
test -r dependencies/CASE/ontology/master/case.ttl
Expand Down Expand Up @@ -91,10 +81,6 @@ clean:
tests/examples \
|| true \
)
@#Remove flag files that are normally set after deeper submodules and rdf-toolkit are downloaded.
@rm -f \
dependencies/CASE-Examples-QC/.git_submodule_init.done.log \
dependencies/CASE-Examples-QC/.lib.done.log

# This recipe guarantees timestamp update order, and is otherwise intended to be a no-op.
dependencies/CASE/ontology/master/case.ttl: \
Expand Down
8 changes: 4 additions & 4 deletions case_utils/case_file/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
DEFAULT_PREFIX = "http://example.org/kb/"

NS_RDF = rdflib.RDF
NS_UCO_CORE = rdflib.Namespace("https://unifiedcyberontology.org/ontology/uco/core#")
NS_UCO_CORE = rdflib.Namespace("https://ontology.unifiedcyberontology.org/uco/core/")
NS_UCO_OBSERVABLE = rdflib.Namespace(
"https://unifiedcyberontology.org/ontology/uco/observable#"
"https://ontology.unifiedcyberontology.org/uco/observable/"
)
NS_UCO_TYPES = rdflib.Namespace("https://unifiedcyberontology.org/ontology/uco/types#")
NS_UCO_TYPES = rdflib.Namespace("https://ontology.unifiedcyberontology.org/uco/types/")
NS_UCO_VOCABULARY = rdflib.Namespace(
"https://unifiedcyberontology.org/ontology/uco/vocabulary#"
"https://ontology.unifiedcyberontology.org/uco/vocabulary/"
)
NS_XSD = rdflib.XSD

Expand Down
2 changes: 0 additions & 2 deletions case_utils/case_sparql_construct/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ def main() -> None:
else logging.INFO
)

built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]

parser.add_argument("-d", "--debug", action="store_true")
parser.add_argument(
"--built-version",
Expand Down
2 changes: 0 additions & 2 deletions case_utils/case_sparql_select/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ def main() -> None:
else logging.INFO
)

built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]

parser.add_argument("-d", "--debug", action="store_true")
parser.add_argument(
"--built-version",
Expand Down
2 changes: 0 additions & 2 deletions case_utils/case_validate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def main() -> None:
else logging.INFO
)

built_version_choices_list = ["none", "case-" + CURRENT_CASE_VERSION]

# Add arguments specific to case_validate.
parser.add_argument(
"-d", "--debug", action="store_true", help="Output additional runtime messages."
Expand Down
Loading