feat: add new lookup-rule for entity numbers - #572
Merged
Conversation
tombrooks248
force-pushed
the
feat/add-lookup-rule
branch
from
June 30, 2026 16:18
0407af0 to
e5d5168
Compare
tombrooks248
force-pushed
the
feat/add-lookup-rule
branch
from
June 30, 2026 16:35
e5d5168 to
993ed6d
Compare
tombrooks248
marked this pull request as ready for review
June 30, 2026 16:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Adds a lookup rule mechanism for assigning entity numbers. Instead of an exact
lookup.csvrow per reference, a collection can provide an optionallookup-rule.csvdefining a rule: apply anoffsetto an incoming integer reference, and if the result falls within a dataset's entity range (entity-minimum/entity-maximum, inclusive), assign that number as the entity.Why
Some datasets - e.g. title-boundaries - would require managing an unmanageable number of individual entity records if we relied on exact reference-to-entity lookups. A range-based rule lets a whole dataset's entities be assigned from a single, compact rule instead of millions of lookup rows, which is the prerequisite for adding title boundaries.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
True testing for this will take place once I begin running title-boundary in DEV, but until then this is going to lie dormant for a few days until that is ready.
Testing this PR is safe
This change is inert for existing pipelines — it cannot alter the output of any current collection, because none of them have
lookup_rule.csvs in the config repo, in fact currently no collections have lookup_rule.csv in the config repo and this code change will only do anything when I add one to title-boundry.Ran a pipeline locally with the changes and it all ran fine.
Plus all the existing tests pass.
Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above. Please refer to the Digital Land Testing Guidance for more information.
have not been included
[optional] Are there any post deployment tasks we need to perform?
[optional] Are there any dependencies on other PRs or Work?