Skip to content

Raise missing associated entity issue for plan-timetable - #563

Merged
salabi merged 1 commit into
mainfrom
raise_missing_assoc_ent_issue_for_plan_timetable
Jun 15, 2026
Merged

Raise missing associated entity issue for plan-timetable#563
salabi merged 1 commit into
mainfrom
raise_missing_assoc_ent_issue_for_plan_timetable

Conversation

@salabi

@salabi salabi commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Raise missing associated entity issue for plan-timetable.
Because plan is a package dataset rather than a concrete resource/dataset, issue-type is not raise when there is a missing association entity. We need to adjust the specification to lookup in the resource that Plan was made from and report a missing association entity if none matched just like other normal resource.

Change details as follow

digital_land/phase/lookup.py

  • Added package_prefixes support to FactLookupPhase, fallback lookup through package prefixes, and missing associated entity logging for package roots like plan.

digital-land-python/digital_land/pipeline/main.py

  • Passes self.specification.get_package_prefixes() into FactLookupPhase.

digital-land-python/digital_land/specification.py

  • Added get_package_prefixes() with the plan -> local-plan/minerals-plan/waste-plan/supplementary-plan mapping.
    test_lookup.py
  • Added unit tests for package prefix lookup resolving and missing associated entity issue logging.
    test_specification.py
  • Added unit test for the package prefix mapping.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

This was tested by running local-plan collection locally and one example of the resource that raise a missing association entity is

dataset,resource,line-number,entry-number,field,entity,issue-type,value,message
plan-timetable,95b1fb985e0573bc4a658c3d9980716d0a66c37db750ca5a71b4a3b8875b2e9f,2,1,plan,5109768,missing associated entity,county-durham-plan,

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.

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

[optional] Are there any post deployment tasks we need to perform?

[optional] Are there any dependencies on other PRs or Work?

@salabi
salabi marked this pull request as ready for review June 12, 2026 11:59
@salabi
salabi requested a review from tombrooks248 June 12, 2026 11:59
@salabi
salabi merged commit 15ab5ed into main Jun 15, 2026
5 checks passed
@salabi
salabi deleted the raise_missing_assoc_ent_issue_for_plan_timetable branch June 15, 2026 08:31
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.

2 participants