Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
This repository was released to implement UCO Story OC-158, supporting
UCO Change Proposal 23.

Some resources were copied from other CASE and/or UCO repositories, and
the copying was not captured in the Git history:
* The Github Actions CI was adapted from CASE-Examples.
* The ontology aggregation script tests/ex_ttl.py was copied and
  simplified from glom_rdf.py in the CASE Python Utilities repository.
* The rdf-toolkit download handler and SHA-512, under lib/, were copied
  from the implementation in UCO.  CASE's ontology repository originated
  this strategy, and holds the timestamp of the first recorded hash
  observation.

References:
* [UCO OC-68] (CP-23) Convert current property restrictions and domain
  assertions to SHACL class shapes
* [UCO OC-158] UCO needs a mechanism to review inherited SHACL
  PropertyShapes

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jul 12, 2021
1 parent 7214f58 commit 1493661
Show file tree
Hide file tree
Showing 61 changed files with 4,956 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This software was developed at the National Institute of Standards
# and Technology by employees of the Federal Government in the course
# of their official duties. Pursuant to title 17 Section 105 of the
# United States Code this software is not subject to copyright
# protection and is in the public domain. NIST assumes no
# responsibility whatsoever for its use by other parties, and makes
# no guarantees, expressed or implied, about its quality,
# reliability, or any other characteristic.
#
# We would appreciate acknowledgement if the software is used.

name: Continuous Integration

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Start from clean state
run: make clean
- name: Run tests
run: make check
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.done.log
*.egg-info
*.jar
*.swp
.generated-*
.pytest_cache
__pycache__
catalog-v001.xml
87 changes: 87 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/usr/bin/make -f

# This software was developed at the National Institute of Standards
# and Technology by employees of the Federal Government in the course
# of their official duties. Pursuant to title 17 Section 105 of the
# United States Code this software is not subject to copyright
# protection and is in the public domain. NIST assumes no
# responsibility whatsoever for its use by other parties, and makes
# no guarantees, expressed or implied, about its quality,
# reliability, or any other characteristic.
#
# We would appreciate acknowledgement if the software is used.

SHELL := /bin/bash

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)

GSED ?= $(shell which gsed 2>/dev/null || which sed)

all: \
README.md

.PHONY: \
download

README.md: \
.generated-README.md
diff \
README.md \
.generated-README.md \
|| (echo "UPDATE:Makefile:The generated README.md does not match the Git-tracked README.md. If the above reported changes look fine, run 'cp .generated-README.md README.md' to get a file ready to commit to Git." >&2 ; exit 1)
test -r $@ && touch $@

.generated-README.md: \
README.md.in \
README.md.sed \
tests/ex-triangle-inheritance.ttl \
tests/ex-triangle-1-1.ttl \
tests/ex-triangle-1-2.ttl \
tests/ex-triangle-2.ttl \
tests/kb-test-1.ttl \
tests/kb-test-2.ttl \
tests/kb-test-3.ttl \
tests/kb-test-4.ttl \
tests/kb-test-5.ttl \
tests/kb-test-6.ttl \
tests/kb-triangle-1.ttl \
tests/kb-triangle-2.ttl \
tests/kb-triangle-3.ttl \
tests/kb-triangle-3-super.ttl
$(GSED) \
-f README.md.sed \
README.md.in \
> $@_
mv $@_ $@

.lib.done.log:
$(MAKE) \
--directory lib
touch $@

# After running unit tests, see if README.md needs to be regenerated.
check: \
.lib.done.log
$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory tests \
check
$(MAKE) \
README.md

clean:
@rm -f \
.lib.done.log
@rm -rf \
*.egg-info \
case_shacl_inheritance_reviewer/__pycache__
@$(MAKE) \
--directory tests \
clean

download: \
.lib.done.log
$(MAKE) \
PYTHON3=$(PYTHON3) \
--directory tests \
download
Loading

0 comments on commit 1493661

Please sign in to comment.