Page MenuHomePhabricator

Add entity_prefix/repoConceptBaseUri to siteinfo
Closed, ResolvedPublic

Description

In various places (e.g. quantiy claims with units 1) we refer to items via their entity urls such as http://www.wikidata.org/entity/Q712226.

Yet there is no easy way of determining what the stem/prefix (i.e. http://www.wikidata.org/entity/ for wikidata) is for a given wikibase installation. Hence it would be useful if this could be included in the siteinfo api call (cf. articlepath).

Note that just /entity/ isn't enough (unlike for articlepath) here since the protocol is http rather than the site default which is https.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterAdd missing test cases for onAPIQuerySiteInfoGeneralInfo hook
mediawiki/extensions/Wikibase : masterExpose ConceptBaseUri through siteinfo

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 25 2016, 4:53 PM

To clarify what I would like to have exposed through siteinfo is $wgWBClientSettings['repoConceptBaseUri']

Lokal_Profil renamed this task from Add entity_prefix to siteinfo to Add entity_prefix/repoConceptBaseUri to siteinfo.Oct 10 2016, 9:59 AM

Change 315063 had a related patch set uploaded (by Lokal Profil):
Expose repoConceptBaseUri through siteinfo

https://gerrit.wikimedia.org/r/315063

One of the use cases for this is for pywikibot to be able to set units by simply providing the Qid and then use the exposed uri base to construct the entity URI.

Change 315220 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Add missing test cases for onAPIQuerySiteInfoGeneralInfo hook

https://gerrit.wikimedia.org/r/315220

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 11 2016, 9:48 AM

Change 315063 merged by jenkins-bot:
Expose ConceptBaseUri through siteinfo

https://gerrit.wikimedia.org/r/315063

hoo closed this task as Resolved.Oct 12 2016, 6:34 PM
hoo moved this task from Review to Done on the Wikidata-Sprint-2016-10-12 board.
thiemowmde reopened this task as Open.Oct 13 2016, 8:28 AM
thiemowmde moved this task from Done to Review on the Wikidata-Sprint-2016-10-12 board.
thiemowmde moved this task from incoming to in progress on the Wikidata board.

Change 315220 merged by jenkins-bot:
Add missing test cases for onAPIQuerySiteInfoGeneralInfo hook

https://gerrit.wikimedia.org/r/315220

thiemowmde closed this task as Resolved.Oct 13 2016, 10:07 AM
thiemowmde moved this task from Review to Done on the Wikidata-Sprint-2016-10-12 board.

Question: Other than checking the API response how can I track when this has been deployed?

hoo added a subscriber: hoo.Oct 20 2016, 2:30 PM

Question: Other than checking the API response how can I track when this has been deployed?

You could see in which branch your commit is included and check when that's going to be deployed (see https://wikitech.wikimedia.org/wiki/Deployments).

Question: Other than checking the API response how can I track when this has been deployed?

You could see in which branch your commit is included and check when that's going to be deployed (see https://wikitech.wikimedia.org/wiki/Deployments).

Ah. The patch gets cherry picked to a branch which is then part of the deployment train. Thanks then I know what to keep an eye out for.