8000 Support temporary IDs by gouttegd · Pull Request #3567 · obophenotype/uberon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support temporary IDs #3567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Support temporary IDs #3567

wants to merge 4 commits into from

Conversation

gouttegd
Copy link
Collaborator

This PR implements the idea proposed in #3564 for allowing AI agents (or in fact any editor, AI or not) to use “temporary” term IDs that are later replaced by definitive IDs.

It allocates two new ID ranges:

  • the Temporary IDs range (UBERON:99NNNNN): any ID picked within that range is treated as a temporary ID, slated for later replacement by a definitive ID;
  • the Automation range (UBERON:12NNNNN): this is a “normal” ID range (IDs picked within that range are not treated differently from any other ID), but is reserved for automated process – notably, for the process that replaces temporary IDs by definitive ones.

It also adds a new GitHub Action workflow, allocate-definitive-ids.yml, which finds all temporary IDs (all IDs in the UBERON:99NNNNN range) in the -edit file and replaces them by newly allocated IDs from the Automation range. That workflow can be used in two different ways, corresponding to the two options outlined at the end of the #3564 ticket:

(A) Manual trigger: When a PR contains temporary IDs, a Uberon maintainer should manually trigger the allocate-definitive-ids.yml workflow on the PR’s underlying branch, just before merging the PR into the master branch. This will automatically add a commit to the PR, in which temporary IDs are replaced by definitive ones. The PR should then be merged as soon as possible once that commit has been added.

(B) Automatic trigger: If a PR containing temporary IDs is merged into the master branch (with the temporary IDs still present), the allocate-definitive-ids.yml workflow will automatically be triggered and push a new commit to replace the temporary IDs by definitive ones, directly on the master branch. This can act as a “fall-back” action to ensure that temporary IDs are never left in the master branch, in case a Uberon maintainer forgets to manually trigger the ID replacement workflow on a PR.

gouttegd added 4 commits June 20, 2025 11:46
Add two ranges to the ID policy:

* the "Temporary IDs" range (UBERON:99NNNNN), intended for automatically
  generated temporary IDs that must later be replaced by definitive IDs;
* the "Automation" range (UBERON:12NNNNN), intended for all automated
  processes (e.g. KGCL, allocation of definitive IDs).
Add a helper rule in the custom Makefile to automatically replace
temporary IDs in the -edit file by definitive IDs.

Add a new GitHub Actions workflow to perform the ID replacement
operation (1) whenever something is pushed to the master branch and (2)
on demand on any other branch.

This supports the two methods envisioned in #3564 for dealing with
temporary IDs:

(1) keep using temporary IDs throughout the life of a PR, and replace
them on the master branch _after_ the PR has been merged; this happens
entirely automatically;

(2) use temporary IDs throughout most of the life of a PR, but replace
them just before merging the PR; this has to be manually triggered by
someone, ideally the same person who decides to merge the PR.
Add a new documentation file focusing on term ID management, and
explaining how to use temporary IDs.
@gouttegd gouttegd requested a review from matentzn as a code owner June 20, 2025 14:32
@gouttegd gouttegd self-assigned this Jun 20, 2025
@gouttegd gouttegd added the tech label Jun 20, 2025
@@ -17,260 +16,269 @@ AnnotationProperty: allocatedto:

AnnotationProperty: idprefix:

AnnotationProperty: iddigits:
AnnotationProperty: iddigits:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reviewers: all the changes in the uberon-idranges.owl files are due to the fact that the file has been re-serialized as a side-effect of the addition of the two new ranges. Those serialisation-induced changes are inconsequential.

@gouttegd gouttegd requested review from cmungall, dosumis and balhoff June 20, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0