Skip to content

Commit a8ed5b8

Browse files
committed
Clarify optional-shape practices
No effects were observed on Make-managed files. Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent bd1580b commit a8ed5b8

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

CONTRIBUTE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To create a new profile repository for the ontology with short name `Foo`, we su
2020
1. Addressing the "TODOs" in [`dependencies/Makefile`](dependencies/Makefile)
2121
1. Updating the TSV files under [`etc/`](etc/). This is to support local-file editing with some ontology tooling (developed for [UCO Issue 449](https://github.com/ucoProject/UCO/issues/449)). [These lines](https://github.com/ucoProject/UCO/blob/1.2.0/src/create-catalog-v001.xml.py#L68-L77) describe the file formats.
2222
1. Renaming the [ontology file under `/ontology`](ontology/uco-example.ttl), and updating its contents.
23-
1. Renaming the [shapes file under `/shapes`](shapes/sh-uco-example.ttl), and updating its contents.
23+
1. Renaming the [shapes file under `/shapes`](shapes/sh-uco-example.ttl), and updating its contents. If the profile does not require shapes, the directory `shapes` can be removed.
2424
1. Updating the [exemplars file under `/tests`](tests/exemplars.ttl) to use all classes mapped in the profile ontology.
2525
1. After all of the above edits are completed, running `make check` from the top source directory should confirm Turtle files are normalized and unit tests pass.
2626
1. Push the updated profile to a new repository.

Makefile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,15 @@ all-ontology: \
104104
$(MAKE) \
105105
--directory ontology
106106

107+
# NOTE: For profiles that don't include shapes, the $(top_srcdir)/shapes
108+
# directory might be missing. Checking for its existence first relieves
109+
# each profile of needing to modify the top Makefile when removing
110+
# shapes.
107111
all-shapes: \
108112
all-dependencies
109-
$(MAKE) \
110-
--directory shapes
113+
test ! -d shapes \
114+
|| $(MAKE) \
115+
--directory shapes
111116

112117
check: \
113118
.venv-pre-commit/var/.pre-commit-built.log \
@@ -140,11 +145,16 @@ check-ontology: \
140145
--directory ontology \
141146
check
142147

148+
# NOTE: For profiles that don't include shapes, the $(top_srcdir)/shapes
149+
# directory might be missing. Checking for its existence first relieves
150+
# each profile of needing to modify the top Makefile when removing
151+
# shapes.
143152
check-shapes: \
144153
all-shapes
145-
$(MAKE) \
146-
--directory shapes \
147-
check
154+
test ! -d shapes \
155+
|| $(MAKE) \
156+
--directory shapes \
157+
check
148158

149159
# This target's dependencies potentially modify the working directory's
150160
# Git state, so it is intentionally not a dependency of check.

0 commit comments

Comments
 (0)