The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was  Approved.

Operator: GreenC (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 14:09, Thursday, April 11, 2019 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): GNU Awk

Source code available: Yes

Function overview: Add ((Spain metadata Wikidata)) and any other country as they become available to infoboxes. This BRFA mirrors Wikipedia:Bots/Requests for approval/GreenC bot 12 except it will be for Spain instead of Austria, and it will be be for any other countries that become available under the terms set out in the Austria BRFA.

Links to relevant discussions (where appropriate): Wikipedia:Bot_requests#Population_for_Spanish_municipalities

Edit period(s): one time

Estimated number of pages affected: TBD

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details: Example edit. It may operate on other countries besides Spain as those templates and data become available.

Discussion

[edit]
@GreenC: Here's the updated query: link.--eh bien mon prince (talk) 17:54, 11 April 2019 (UTC)[reply]
Ok, the bot is pretty much ready to go. @Underlying lk: can you confirm the Wikidata has been updated and is the most recent available so we don't overwrite any in-line sourcing that is more recent? -- GreenC 14:42, 12 April 2019 (UTC)[reply]
They are from 2018, so they're definitely the most recent ones.--eh bien mon prince (talk) 19:44, 12 April 2019 (UTC)[reply]

Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. As usual, please post a link to the contribs (preferably permanent) and take all the time you need, GreenC. --TheSandDoctor Talk 20:10, 14 April 2019 (UTC)[reply]

Trial complete. Diffs -- GreenC 17:13, 17 April 2019 (UTC)[reply]

A couple things came up in the test run:

  1. A Coruña - There is a |population_metro= hard-coded and since it's displayed in the same sub-box that has the Spain population footnote it's not the right reference for that number. It has some other fields which may also no longer be accurate like |population_density_km2=.
  2. Castellón de la Plana - has a |population_density_km2=auto which seems to automatically generate the density based on calculating |population_total= divided by |area_total_km2=. It seems to work with the new template. Wondering if the bot should check for the existence of |area_total_km2= and if available set |population_density_km2=auto.
  3. Montejo, Salamanca - the reference the bot replaced was used in multiple places creating a missing citation error.

Solutions:

  1. The |population_metro= appears to be verifiable in the new Footnote. The number is outdated, but that is beyond the scope of the bot to fix as it preexists.
  2. The bot will now convert to |population_density_km2=auto if the |area_total_km2= exists and has a valid number. Same with the sq_mi versions. This works.
  3. The other bot at work here is OrphanReferenceFixer.pm which is a sophisticated bot and beyond the scope of this bot to replicate. There will be some temporary breaking changes but OrphanReferenceFixer.pm will fix it within 24hrs.

-- GreenC 17:17, 17 April 2019 (UTC)[reply]


 Approved. Under normal circumstances, I would prefer to leave the close for someone else. However, given the backlog, lack of recent BAG activity (myself included), and the fact that this task is uncontroversial and based on how well the trial went, I am inclined to make an exception for this. As per usual, if amendments to - or clarifications regarding - this approval are needed, please start a discussion on the talk page and ping. --TheSandDoctor Talk 16:30, 27 April 2019 (UTC)[reply]

The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.