Skip to content

Commit

Permalink
Merge branch 'base'
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnelson-nist committed Jun 17, 2024
2 parents a07d28c + 18f92be commit 718a375
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 35 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*.jar
*.swp
.*.done.log
.check-*.ttl
.venv-pre-commit
__pycache__
venv
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ repos:
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
rev: 7.1.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/casework/rdf-toolkit-action
rev: 2.0.3
hooks:
- id: rdf-toolkit-normalizer
args:
- --autofix
33 changes: 0 additions & 33 deletions ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,11 @@ top_srcdir := $(shell cd .. ; pwd)

uco_srcdir := $(top_srcdir)/dependencies/CDO-Shapes-BFO/dependencies/UCO

RDF_TOOLKIT_JAR := $(uco_srcdir)/lib/rdf-toolkit.jar

ttl_basenames := $(wildcard uco-*.ttl)

check_ttl_targets := $(foreach ttl_basename,$(ttl_basenames),check-$(ttl_basename))

all: \
catalog-v001.xml

.PHONY: \
check-%.ttl

.PRECIOUS: \
.check-%.ttl

$(RDF_TOOLKIT_JAR):
@echo "DEBUG:ontology/Makefile:top_srcdir=$(top_srcdir)" >&2
@echo "ERROR:ontology/Makefile:rdf-toolkit.jar not found. Did you run `make` from the top source directory?" >&2
@test -r $@

.check-%.ttl: \
%.ttl \
$(RDF_TOOLKIT_JAR)
java -jar $(RDF_TOOLKIT_JAR) \
--inline-blank-nodes \
--source $< \
--source-format turtle \
--target _$@ \
--target-format turtle
mv _$@ $@

catalog-v001.xml: \
$(top_srcdir)/.venv.done.log \
$(top_srcdir)/etc/domain_directories.tsv \
Expand All @@ -69,15 +43,8 @@ catalog-v001.xml: \
mv _$@ $@

check: \
$(check_ttl_targets) \
catalog-v001.xml

check-%.ttl: \
%.ttl \
.check-%.ttl
diff $^ \
|| (echo "ERROR:ontology/Makefile:The local $< does not match the normalized version. If the above reported changes look fine, run 'cp .check-$< $<' while in the sub-folder ontology/ to get a file ready to commit to Git." >&2 ; exit 1)

clean:
@rm -f \
_* \
Expand Down

0 comments on commit 718a375

Please sign in to comment.