opensanctions / opensanctions/poliloom

Push new references to existing Wikidata statements

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

loom
Dominant language
Python
Stars
22
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Problem

When enrichment finds a new source that corroborates an existing Wikidata property, a PropertyReference is added to that property (#103). However, there is currently no mechanism to push these new references to the existing Wikidata statement.

This can't happen through the evaluate route — users only evaluate extracted properties (those without statement_id). Existing Wikidata properties are never shown for acceptance, only for rejection in advanced mode. So the reference-pushing needs its own flow.

Expected Behavior

When an existing Wikidata statement accumulates new PropertyReference entries from enrichment, there should be a way to push those as additional reference blocks to the statement via the Wikidata REST API (POST /entities/items/{item_id}/statements/{statement_id}/references).

Notes

  • Likely belongs in a dedicated review/push flow rather than the evaluate route
  • We already build multi-source reference blocks correctly for new statements
  • The push_evaluation "accepted existing statement" branch is currently a no-op and should probably stay that way

Related

  • #80 — Add government sources as Wikidata references during enrichment (closed, but the push side was not implemented)
  • #103 — Store multiple references per property instead of dropping duplicates

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the evaluate route and the push_evaluation "accepted existing statement" branch, then trace how PropertyReference entries and multi-source reference blocks are built. Check the existing Wikidata integration against POST /entities/items/{item_id}/statements/{statement_id}/references. Done means a dedicated flow can review and push newly accumulated references to existing statements without changing the no-op branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.