Skip to content

Commit efc880c

Browse files
authored
Merge pull request #131 from casework/release-1.2.0
Release 1.2.0
2 parents 0d0f0dd + 74aed3b commit efc880c

File tree

20 files changed

+256
-80
lines changed

20 files changed

+256
-80
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# Unit testing files
55
.*.done.log
66
.*.ttl
7+
venv
78

89
# Pycharm files
910
.idea
1011

1112
# Protege files
12-
catalog-v001.xml
1313
.project

CONTRIBUTE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,14 @@
44
## Testing prerelease states
55

66
Practices for users interested in testing prerelease states are documented on the [Cyber Domain Ontology website](https://cyberdomainontology.org/ontology/development/#testing-prereleases).
7+
8+
9+
## Using Protégé catalog files
10+
11+
Interested users of `catalog-v001.xml` files, e.g. users of [Protégé](https://protege.stanford.edu/), can use these XML files to interact with CASE as local files. To do so, CASE must be `git-clone`'d with Git submodules also cloned. This can be done with the following commands:
12+
13+
* `git clone --recursive https://github.com/casework/CASE.git` (all users)
14+
* `git clone https://github.com/casework/CASE.git ; cd CASE ; make` (macOS or Linux users)
15+
- The narrowest setup operation strictly for purposes of supporting the `catalog-v001.xml` files is to run `make .git_submodule_init.done.log` instead of the default `make all`.
16+
17+
Protégé should not require network connectivity to load imported ontologies after the above commands are run.

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2023-03-28
2+
* (0cb7b85) UCO Issue 449: Enable generating Protégé catalog files
3+
14
2022-11-22
25
* ONT-491: Release CASE 1.1.0, with release notes at https://caseontology.org/releases/1.1.0/
36

Makefile

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313

1414
SHELL := /bin/bash
1515

16-
PYTHON3 ?= $(shell which python3.9 2>/dev/null || which python3.8 2>/dev/null || which python3.7 2>/dev/null || which python3.6 2>/dev/null || which python3)
16+
PYTHON3 ?= $(shell which python3)
1717

18-
all:
18+
all: \
19+
.venv.done.log
20+
$(MAKE) \
21+
--directory ontology
1922

2023
# This recipe guarantees that 'git submodule init' and 'git submodule update' have run at least once.
2124
# The recipe avoids running 'git submodule update' more than once, in case a user is testing with the submodule at a different commit than what CASE tracks.
@@ -38,8 +41,32 @@ all:
3841
.lib.done.log
3942
touch $@
4043

44+
# The two CASE-Utility... files are to trigger rebuilds based on command-line interface changes or version increments.
45+
.venv.done.log: \
46+
.git_submodule_init.done.log \
47+
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py \
48+
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg \
49+
dependencies/UCO/requirements.txt
50+
rm -rf venv
51+
$(PYTHON3) -m venv \
52+
venv
53+
source venv/bin/activate \
54+
&& pip install \
55+
--upgrade \
56+
pip \
57+
setuptools \
58+
wheel
59+
source venv/bin/activate \
60+
&& pip install \
61+
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer
62+
source venv/bin/activate \
63+
&& pip install \
64+
--requirement dependencies/UCO/requirements.txt
65+
touch $@
66+
4167
check: \
42-
.lib.done.log
68+
.lib.done.log \
69+
.venv.done.log
4370
$(MAKE) \
4471
--directory ontology \
4572
check
@@ -70,3 +97,17 @@ clean:
7097
)
7198
@rm -f \
7299
.*.done.log
100+
@rm -rf \
101+
venv
102+
103+
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py: \
104+
.git_submodule_init.done.log
105+
$(MAKE) \
106+
--directory dependencies/UCO \
107+
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/case_shacl_inheritance_reviewer/__init__.py
108+
109+
dependencies/UCO/dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg: \
110+
.git_submodule_init.done.log
111+
$(MAKE) \
112+
--directory dependencies/UCO \
113+
dependencies/CASE-Utility-SHACL-Inheritance-Reviewer/setup.cfg

dependencies/UCO

Submodule UCO updated 62 files

etc/dependency_files.tsv

Whitespace-only changes.

etc/domain_directories.tsv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
https://ontology.caseontology.org/ ${top_srcdir}/ontology/
2+
https://ontology.unifiedcyberontology.org/ ${top_srcdir}/dependencies/UCO/ontology/

ontology/Makefile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,38 @@
1111
#
1212
# We would appreciate acknowledgement if the software is used.
1313

14-
all:
14+
SHELL := /bin/bash
1515

1616
top_srcdir := ..
1717

18+
all: \
19+
all-investigation \
20+
all-master \
21+
all-vocabulary
22+
1823
.PHONY: \
24+
all-investigation \
25+
all-master \
26+
all-vocabulary \
1927
check-investigation \
2028
check-master \
2129
check-vocabulary \
2230
clean-investigation \
2331
clean-master \
2432
clean-vocabulary
2533

34+
all-investigation:
35+
$(MAKE) \
36+
--directory investigation
37+
38+
all-master:
39+
$(MAKE) \
40+
--directory master
41+
42+
all-vocabulary:
43+
$(MAKE) \
44+
--directory vocabulary
45+
2646
check: \
2747
check-master \
2848
check-investigation \

ontology/investigation/Makefile

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@
1111
#
1212
# We would appreciate acknowledgement if the software is used.
1313

14+
SHELL := /bin/bash
15+
1416
top_srcdir := ../..
1517

16-
all:
18+
uco_srcdir := $(top_srcdir)/dependencies/UCO
19+
20+
ttl_basenames := investigation.ttl
21+
22+
all: \
23+
catalog-v001.xml
1724

1825
.check-investigation.ttl: \
1926
$(top_srcdir)/.lib.done.log \
@@ -26,11 +33,32 @@ all:
2633
--target-format turtle
2734
mv _$@ $@
2835

36+
catalog-v001.xml: \
37+
$(top_srcdir)/.venv.done.log \
38+
$(top_srcdir)/etc/domain_directories.tsv \
39+
$(top_srcdir)/etc/dependency_files.tsv \
40+
$(uco_srcdir)/ontology/uco/action/catalog-v001.xml \
41+
$(uco_srcdir)/ontology/uco/role/catalog-v001.xml \
42+
$(uco_srcdir)/src/create-catalog-v001.xml.py
43+
rm -f _$@
44+
source $(top_srcdir)/venv/bin/activate \
45+
&& python3 $(uco_srcdir)/src/create-catalog-v001.xml.py \
46+
--catalog-xml $(uco_srcdir)/ontology/uco/action/catalog-v001.xml \
47+
--catalog-xml $(uco_srcdir)/ontology/uco/role/catalog-v001.xml \
48+
_$@ \
49+
$(top_srcdir)/etc/domain_directories.tsv \
50+
$(top_srcdir)/etc/dependency_files.tsv \
51+
"$(top_srcdir)" \
52+
$(ttl_basenames)
53+
mv _$@ $@
54+
2955
check: \
30-
.check-investigation.ttl
56+
.check-investigation.ttl \
57+
catalog-v001.xml
3158
diff investigation.ttl .check-investigation.ttl
3259

3360
clean:
3461
@rm -f \
3562
.check-*.ttl \
36-
_*
63+
_* \
64+
catalog-v001.xml
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
3+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/dependencies/collections-ontology/collections.owl" name="http://purl.org/co"/>
4+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/dependencies/error/docs/current/error.ttl" name="http://purl.org/spar/error"/>
5+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/co/co.ttl" name="https://ontology.unifiedcyberontology.org/co/1.2.0"/>
6+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/action/action.ttl" name="https://ontology.unifiedcyberontology.org/uco/action/1.2.0"/>
7+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/core/core.ttl" name="https://ontology.unifiedcyberontology.org/uco/core/1.2.0"/>
8+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/location/location.ttl" name="https://ontology.unifiedcyberontology.org/uco/location/1.2.0"/>
9+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/pattern/pattern.ttl" name="https://ontology.unifiedcyberontology.org/uco/pattern/1.2.0"/>
10+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/role/role.ttl" name="https://ontology.unifiedcyberontology.org/uco/role/1.2.0"/>
11+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/types/types.ttl" name="https://ontology.unifiedcyberontology.org/uco/types/1.2.0"/>
12+
<uri id="User Entered Import Resolution" uri="../../dependencies/UCO/ontology/uco/vocabulary/vocabulary.ttl" name="https://ontology.unifiedcyberontology.org/uco/vocabulary/1.2.0"/>
13+
<uri id="User Entered Import Resolution" uri="../vocabulary/vocabulary.ttl" name="https://ontology.caseontology.org/case/vocabulary/1.2.0"/>
14+
<uri id="User Entered Import Resolution" uri="investigation.ttl" name="https://ontology.caseontology.org/case/investigation"/>
15+
</catalog>

0 commit comments

Comments
 (0)