HomePhabricator

Support any origin wiki for update/queries endpoints

Tags
None
Referenced Files
None
Subscribers
None

Description

Support any origin wiki for update/queries endpoints

There is no reason to not support other wikis than Wikidata.

  • Add url as argument to the update and queries endpoints
  • Use that URL as link back in the Jinja templates, instead of building the link using the page_title
  • Pass-through the given URL to the PagesProcessor object, building on the work made in 8977958

This changes very little functionality-wise, yet effectively
resolves T243780 for the manual/interactive behaviour: as long
as the remote site provides the URL parameter to the application,
then Integraality will identify and update the right wiki.

(Accordingly, this also adds a unit-test checking
that the links to Meta are correct)

Both the {{Property dashboard}} and {{Integraality cell}} templates
have been updated accordingly, on both Wikidata and Meta, so there
is no need to provide backwards compatibliity.

Note that we are divering here from the blueprint laid out by Listeria,
which passes as parameter both the language-code and the project-code.
I find that passing the URL is more straightforward and clearer,
(leaving to Pywkibot to figure out the correct Site).
(By comparison, Listeria uses lang=Meta but project=commons)

Future work will include sorting out the periodic update.

Bug: T243780

Details

Provenance
JeanFredAuthored on Feb 13 2020, 2:33 PM
Parents
R2566:842198a443ab: Refine test_update_success test for the `update` endpoint
Branches
Unknown
Tags
Unknown
ChangeId
None