Skip to content

Build deprecated.tsv only when missing; stop a newer generator script from silently regenerating it - #622

Merged
turbomam merged 1 commit into
mainfrom
fix/621-deprecated-tsv-no-prerequisite
Sep 3, 2026
Merged

Build deprecated.tsv only when missing; stop a newer generator script from silently regenerating it#622
turbomam merged 1 commit into
mainfrom
fix/621-deprecated-tsv-no-prerequisite

Conversation

@turbomam

@turbomam turbomam commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Why

Closes #621. src/templates/deprecated.tsv is hand-maintained, but its Makefile rule listed the generator script as a prerequisite. Make compares timestamps, so a generator script newer than the TSV made the next build regenerate the file from BioPortal history and discard every hand edit, with no diff and no warning. Today the TSV is newer, so nothing has been lost yet; the next edit to the script would have changed that.

What changed

The rule has no prerequisites, matching the sheet-template rules in the same file. make regenerate-deprecated is unchanged and still works, because it removes the target before invoking the rule.

Also fixes docs/ANNOTATOR_COMPARISON_STATUS.md, which called MICRO the "Pathogen Transmission Ontology"; MicrO is the Ontology of Prokaryotic Phenotypic and Metabolic Characters.

Validation

Run from src/ontology with the generator script touched newer than the TSV.

Before:

$ make -n -f metpo.Makefile ../templates/deprecated.tsv
cd ../.. && uv run generate-deprecated-template -o .../src/templates/deprecated.tsv

After:

$ make -n -f metpo.Makefile ../templates/deprecated.tsv
make: `../templates/deprecated.tsv' is up to date.
$ make -n -f metpo.Makefile regenerate-deprecated
rm -f ../templates/deprecated.tsv
/Library/Developer/CommandLineTools/usr/bin/make -f metpo.Makefile ../templates/deprecated.tsv

Documentation impact

The Makefile comment above the rule now states the no-prerequisite intent and names make regenerate-deprecated as the deliberate path.

Scope and complexity

Two files, one Make rule and one doc line. No template content changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FcR9NMbL1o3svKyBqsNKpA

…ator is newer

The rule for the hand-maintained obsoletion file had the generator script as a
prerequisite. Make compares timestamps, so any edit, reformat or fresh checkout
that made the script newer than the TSV would regenerate deprecated.tsv from
BioPortal history on the next build and discard every hand edit, silently. The
comment above the rule already called the file hand-maintained and the rule
recovery-only; the rule now enforces it, the same way the sheet-template rules
do. `make regenerate-deprecated` still works because it removes the target first.

Verified: with the script touched newer than the TSV, `make -n` printed the
regeneration recipe before this change and reports the target up to date after.

Also corrects docs/ANNOTATOR_COMPARISON_STATUS.md, which described MICRO as the
Pathogen Transmission Ontology. MicrO is the Ontology of Prokaryotic Phenotypic
and Metabolic Characters.

Closes #621

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcR9NMbL1o3svKyBqsNKpA
Copilot AI lite review requested due to automatic review settings September 3, 2026 18:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes align with the stated intent (preventing timestamp-driven overwrites) and preserve the deliberate regeneration workflow without introducing functional risk.

Pull request overview

This PR prevents accidental overwriting of the hand-maintained src/templates/deprecated.tsv by removing the generator script prerequisite from the Make rule, so the file is only generated when missing (or when explicitly regenerated). It also corrects a documentation misdescription of the MicrO ontology.

Changes:

  • Updated src/ontology/metpo.Makefile so ../templates/deprecated.tsv has no prerequisites, avoiding timestamp-triggered silent regeneration.
  • Kept make regenerate-deprecated working as the explicit rebuild path (by removing the target first).
  • Fixed docs/ANNOTATOR_COMPARISON_STATUS.md to describe MICRO as MicrO (Blank et al. 2016), not a pathogen transmission ontology.
File summaries
File Description
src/ontology/metpo.Makefile Removes the prerequisite that could trigger unintended regeneration of the hand-maintained deprecated term template; documents the intended regeneration workflow.
docs/ANNOTATOR_COMPARISON_STATUS.md Corrects the description of the MICRO/MicrO ontology in the comparison list.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecated.tsv Makefile rule has a prerequisite that can silently regenerate the hand-maintained file

2 participants