opensanctions / opensanctions/poliloom
Push new references to existing Wikidata statements
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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