Skip to content

Commit e2e3342

Browse files
turbomamclaude
andcommitted
Add INCLUDE_OBSOLETE emission toggle for deprecated terms (#378)
Deprecated/obsolete terms enter the build only via ../templates/deprecated.tsv (verified: metpo-edit.owl has zero owl:deprecated). Add an INCLUDE_OBSOLETE make variable that conditionally drops that template: - INCLUDE_OBSOLETE=true (default): obsoletes included; committed artifacts and the artifact-freshness check reproduce unchanged. - INCLUDE_OBSOLETE=false: obsolete-free build. Verified in the odkfull container: false -> 0 owl:deprecated, 291 classes; true -> 1216 owl:deprecated, 1455 classes. Default reproduces committed content. Documented in CLAUDE.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c30481f commit e2e3342

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,16 @@ cd src/ontology
183183
sh run.sh make IMP=false prepare_release
184184
```
185185

186+
**Obsolete-term emission toggle (#378):** deprecated/obsolete terms come only from
187+
`src/templates/deprecated.tsv`. `INCLUDE_OBSOLETE` controls whether they are built
188+
into the release OWL. Default is `true` (current behaviour; the committed artifacts
189+
and the artifact-freshness check reproduce with the default). To produce an
190+
obsolete-free build:
191+
```bash
192+
cd src/ontology
193+
sh run.sh make INCLUDE_OBSOLETE=false prepare_release
194+
```
195+
186196
**Test:**
187197
```bash
188198
cd src/ontology

src/ontology/metpo.Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,19 @@ regenerate-deprecated:
105105
rm -f ../templates/deprecated.tsv
106106
$(MAKE) -f metpo.Makefile ../templates/deprecated.tsv
107107

108+
# Emission control for deprecated/obsolete terms (berkeleybop/metpo#378).
109+
# INCLUDE_OBSOLETE=true (default) merges ../templates/deprecated.tsv into the build,
110+
# so the release OWL carries the obsolete classes (current behaviour; the committed
111+
# artifacts and the artifact-freshness check reproduce with the default).
112+
# INCLUDE_OBSOLETE=false omits that template, producing an obsolete-free build, e.g.
113+
# sh run.sh make INCLUDE_OBSOLETE=false prepare_release
114+
INCLUDE_OBSOLETE ?= true
115+
ifeq ($(INCLUDE_OBSOLETE),true)
116+
DEPRECATED_TEMPLATE_ARG := --template ../templates/deprecated.tsv
117+
else
118+
DEPRECATED_TEMPLATE_ARG :=
119+
endif
120+
108121
components/metpo_sheet.owl: ../templates/stubs.tsv ../templates/metpo-properties.tsv ../templates/metpo_sheet.tsv ../templates/deprecated.tsv
109122
$(ROBOT) template \
110123
--add-prefix 'METPO: https://w3id.org/metpo/' \
@@ -113,7 +126,7 @@ components/metpo_sheet.owl: ../templates/stubs.tsv ../templates/metpo-properties
113126
--template ../templates/stubs.tsv \
114127
--template ../templates/metpo_sheet.tsv \
115128
--template ../templates/metpo-properties.tsv \
116-
--template ../templates/deprecated.tsv \
129+
$(DEPRECATED_TEMPLATE_ARG) \
117130
annotate --ontology-iri $(ONTBASE)/$@ \
118131
annotate -V $(ONTBASE)/releases/$(TODAY)/$@ \
119132
--annotation owl:versionInfo $(TODAY) \

0 commit comments

Comments
 (0)