forked from OBOFoundry/OBOFoundry.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (42 loc) · 1.81 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# All ontology .md files
ONTS := $(wildcard ontology/*md)
# All principles .md file
PRINCIPLES := $(wildcard principles/*md)
all: _config.yml registry/ontologies.yml
test: validate all
integration-test: test valid-purl-report.txt
t:
echo $(ONTS)
# Create the site-wide config file by combining all metadata on ontologies + principles
# and combining with site-wide metadata.
#
# Note that anything in _config.yml is accessible to any liquid template via the
# `sites` object - think of it like the global database
#
# (this is somewhat hacky, but concatenating these yamls is safe)
_config.yml: _config_header.yml registry/ontologies.yml principles/all.yml
cat $^ > [email protected] && mv [email protected] $@
# Extract metadata from each ontology .md file and combine into single yaml
registry/ontologies.yml: $(ONTS)
./util/extract-metadata.py concat -o [email protected] $^ && mv [email protected] $@
# Extract the metadata from each principle in the principles/ directory, and concatenate
# into a single yaml file in that directory
principles/all.yml: $(PRINCIPLES)
./util/extract-metadata.py concat-principles -o [email protected] $^ && mv [email protected] $@
# TODO: add @context
registry/ontologies.jsonld: registry/ontologies.yml
./util/yaml2json.py $< > [email protected] && mv [email protected] $@
# TODO
registry/ontologies.ttl: registry/ontologies.jsonld
riot registry/context.jsonld $< > [email protected] && mv [email protected] $@
validate: $(ONTS)
./util/extract-metadata.py validate $^
# Note this should *not* be run as part of general travis jobs, it is expensive
# and may be prone to false positives as it is inherently network-based
#
# TODO: Other non-travis CI job. Nightly?
# TODO: Integrate this with some kind of OCLC query check
#
# See: https://github.com/OBOFoundry/OBOFoundry.github.io/issues/18
valid-purl-report.txt: registry/ontologies.yml
./util/processor.py -i $< check-urls > [email protected] && mv [email protected] $@