Page MenuHomePhabricator

Remove (seemingly) unused wb-status page prop (EntityContent::getEntityStatus)
Closed, ResolvedPublic

Description

I don't see this being used anywhere (did a code search on github), so I think we should consider dropping this.

Patches for review:

Event Timeline

@Lydia_Pintscher Shall we ask on the (tech) mailing list whether anyone is using this and announce that we (might) remove it soon?

What data is it holding?

It has one of the following values (documentation taken from the phpdoc blocks):

  • EntityContent::STATUS_NONE (0) "entity has no special status"
  • EntityContent::STATUS_STUB (100) "entity is a stub, i.e. it's empty except for terms (labels, descriptions, and aliases)"
  • EntityContent::STATUS_EMPTY (200) "entity is empty"
  • (Item only) ItemContent::STATUS_LINKSTUB (60) "entity is a 'linkstub', that is, it contains sitelinks, but no claims"

I think we introduced this not for our own use but for bot authors. So yes we should ask. Let's see what @Multichill says as the next step.

This page_prop doesn't ring a bell. When was it introduced? Did anyone dig up a commit?

This has been around forever. It was meant mainly for statistics, IIRC.
We now track the number of statements and sitelinks (and labels?) in separate page_props, so this probably isn't needed any more. Kind of nice to have though, since it's consistent with what MW will consider an "article" in the site stats (I think - needs confirmation).

Apparently this has been introduced together with the sitelink and claim count page props (in 7135d82e3d207fd1c542576ef5bc9a9844b3ad77)… maybe this wasn't thought through thoroughly, but just done while touching the code anyway?

Note that looking for a "use" of this status flag does not tell us much. We want others to use it, via special pages, API and SQL queries. There does not have to be a use in our code base.

I was looking for a visualization for a long time and finally found one:

0 terms & 0 statements1+ term & 0 statements0 terms & 1+ statement1+ term & 1+ statement
PropertyEMPTYSTUBNONENONE
Item with 0 sitelinksEMPTYSTUBNONENONE
Item with 1+ sitelinkLINKSTUBLINKSTUBNONENONE

Additionally we do count statements in the wb-claims and sitelinks in the wb-sitelinks page prop, but we do not count terms. Therefor:

  • We can find LINKSTUBs by searching for wb-claims = 0 & wb-sitelinks > 0.
  • We can find EMPTYs and STUBs by searching for wb-claims = 0 & wb-sitelinks = 0.
  • We can not distinguish between STUB and EMPTY.

In my opinion the way this status is calculated does not make it very useful. It maps three dimensions (terms, statements and sitelinks) to a single flag (not a bit field). I suggest to drop it entirely and introduce a wb-terms page prop instead, if required.

In my opinion the way this status is calculated does not make it very useful. It maps three dimensions (terms, statements and sitelinks) to a single flag (not a bit field). I suggest to drop it entirely and introduce a wb-terms page prop instead, if required.

Yeah, that would be more useful and allow much more fine grained filtering.

I think we have consensus for removing this page prop. @Lydia_Pintscher we should announce this as a breaking change soon, doing the actual changes in the code base is trivial (just need to delete code).

Announced that we in will drop this in December 2016 (or later) in all relevant places (for example https://lists.wikimedia.org/pipermail/wikidata/2016-October/009844.html).

Change 326978 had a related patch set uploaded (by Hoo man):
Remove the "wb-status" page prop

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

Change 326978 merged by jenkins-bot:
Remove the "wb-status" page prop

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

Change 328635 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Deprecate unused EntityContent::isStub

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

Change 328636 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Remove unused MediaInfoContent::isStub

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

Change 328638 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Remove unused LexemeContent::isStub

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

Change 328640 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Drop unused EntityContent::isStub entirely

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

Change 328635 merged by jenkins-bot:
Deprecate unused EntityContent::isStub

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

Change 328657 had a related patch set uploaded (by Ladsgroup):
Drop adding isStub() as part of extending entities doc

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

Change 328638 merged by jenkins-bot:
Remove unused LexemeContent::isStub

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

Change 328636 merged by jenkins-bot:
Remove unused MediaInfoContent::isStub

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

Change 328657 merged by jenkins-bot:
Drop adding isStub() as part of extending entities doc

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

Change 328640 merged by jenkins-bot:
Drop unused EntityContent::isStub entirely

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

thiemowmde updated the task description. (Show Details)
thiemowmde moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.