Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ To create a new profile repository for the ontology with short name `Foo`, we su

1. Clone the upstream example repository: `git clone https://github.com/ucoProject/UCO-Profile-Example.git UCO-Profile-Foo`.
1. Substitute all references to the "example" ontology with the desired ontology. Generally, this is handled by:
1. Update the [README](README.md) to change the name of the repository. (Minimally, the title line should be revised.)
1. Addressing the "TODOs" in [`dependencies/Makefile`](dependencies/Makefile)
1. Updating the [README](README.md) to change the name of the repository. (Minimally, the title line should be revised.)
1. Addressing the "TODOs" in [`dependencies/Makefile`](dependencies/Makefile). Note the `check-supply-chain` recipes will typically apply to repositories that have a similarly named recipe and are linked as submodules.
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.
1. Renaming the [ontology file under `/ontology`](ontology/uco-example.ttl), and updating its contents.
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.
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ all: \
check-shapes \
check-supply-chain \
check-supply-chain-cdo-profile \
check-supply-chain-dependencies \
check-supply-chain-pre-commit \
check-supply-chain-submodules \
check-tests \
Expand Down Expand Up @@ -157,6 +158,8 @@ check-shapes: \

# This target's dependencies potentially modify the working directory's
# Git state, so it is intentionally not a dependency of check.
# To recurse this recipe, include check-supply-chain-dependencies as a
# target in the Make call.
check-supply-chain: \
check-supply-chain-cdo-profile \
check-mypy \
Expand All @@ -180,6 +183,18 @@ check-supply-chain-cdo-profile:
"x$$(git rev-parse _CHECK_SUPPLY_CHAIN_upstream/base)" \
|| (echo "ERROR:Makefile:The current branch is behind the upstream 'base' branch. Please merge the upstream 'base' commit into the current branch." >&2 ; exit 1)

# This recursive Make recipe intentionally deactivates parallel job
# execution due to interactions with $(top_srcdir)/.git/ while reviewing
# submodules.
# This target is intentionally not a dependency of check-supply-chain,
# considering recursive review an opt-in action.
check-supply-chain-dependencies: \
check-supply-chain-submodules
$(MAKE) \
--directory dependencies \
--jobs 1 \
check-supply-chain

# Update pre-commit configuration and use the updated config file to
# review code. Only have Make exit if 'pre-commit run' modifies files.
check-supply-chain-pre-commit: \
Expand Down
2 changes: 1 addition & 1 deletion dependencies/CDO-Shapes-Example
19 changes: 19 additions & 0 deletions dependencies/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ uco_srcdir := UCO
all: \
$(uco_srcdir)/tests/uco_monolithic.ttl

# TODO: The check-supply-chain recipes should be written to descend into
# each submodule tracking a CDO (/UCO, etc.) repository and run its
# supply chain rule. This recursive check is expected to be called most
# typically by the top_srcdir recipe check-supply-chain-dependencies.
.PHONY: \
check-supply-chain \
check-supply-chain-CDO-Shapes-Example

$(uco_srcdir)/.venv.done.log:
$(MAKE) \
PYTHON3=$(PYTHON3) \
Expand All @@ -39,4 +47,15 @@ $(uco_srcdir)/tests/uco_monolithic.ttl: \
check: \
all

check-supply-chain: \
check-supply-chain-CDO-Shapes-Example

check-supply-chain-CDO-Shapes-Example:
$(MAKE) \
--directory CDO-Shapes-Example \
check-supply-chain-dependencies
$(MAKE) \
--directory CDO-Shapes-Example \
check-supply-chain

clean: