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 Withdrawn by operator.

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

Time filed: 23:18, Tuesday, March 12, 2019 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Python

Source code available: https://github.com/Kadane-Wikipedia/Rnd_Merge/blob/master/rnd_sub.py

Function overview: Replaces Template:Round and Template:Decimals with Template:Rnd if a parameter change is needed.

Links to relevant discussions (where appropriate): Wikipedia:Templates_for_discussion/Log/2018_December_14#Template:Rnd, Wikipedia:Bot_requests#Convert_of_rounding_templates

Edit period(s): One time run

Estimated number of pages affected: 21,900 (est) 7300 (est)

Exclusion compliant (Yes/No): No

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

Function details: Bot replaces Template:Round and Template:Decimals with Template:Rnd iff:

  The template name is Round or Decimals and
  The template's 2nd argument is not a decimal number or
  The template's doesn't have a second argument

  1. Let NAME be the name of the template
  2. Let NUMBER represent the number to be rounded (first parameter)
  3. Let PLACE represent the number of places to round to (second parameter)

Note: This can result in a change of appearance, but does not result in loss of precision

Discussion

[edit]
@TheSandDoctor: thanks, but this isn't my bot @Kadane --DannyS712 (talk) 20:17, 13 March 2019 (UTC)[reply]
@DannyS712: Saw you in the discussion section and had a brain fart. Kadane please see the above. --TheSandDoctor Talk 20:20, 13 March 2019 (UTC)[reply]

After the merge, aren't Template:Round and Template:Rnd going to point the the same place? This bot task therefore seems unnecessary to me. ((3x|p))ery (talk) 00:13, 14 March 2019 (UTC)[reply]

Regarding the WP:COSMETICBOT comment, in my opinion this is much like substituting templates so they can be deleted. Exceptions are regularly made for that purpose according to the page you linked. Although I am not opposed to just changing templates that need a parameter change.
Regarding this bot being a useless task, I am not sure I am following why you think that.
It might be a good idea to ping the requester to answer your questions as well. @Zackmann08: Kadane (talk) 01:08, 14 March 2019 (UTC)[reply]
@Kadane: My comment about the bot being useless was based on a misconception of the task as only doing the edits I defined as cosmetic. I have no objection to the edits that actually do change parameters. Substing templates so that they can be deleted isn't cosmetic (the template will be deleted, at which point the pre-subst edit will display a redlinked template). Bypassing template redirects, which is what this task will end up having done after the merge is complete, is. Although I do realize, as a non-BAG-member, that I'm probably speaking as if I have much more authority than I actually do. ((3x|p))ery (talk) 01:13, 14 March 2019 (UTC)[reply]
@Pppery: - I appreciate your comments BAG or not. I am a newbie when it comes to Wikipedia, I just happen to know how to program. So a change of algorithm is needed to ensure that only edits with parameter changes are needed. I suppose I would need another trial for that? Kadane (talk) 01:19, 14 March 2019 (UTC)[reply]
@Kadane: I have started drafting rules for changing the parameters - see below, and feel free to help write the rest --DannyS712 (talk) 01:39, 14 March 2019 (UTC)[reply]
@DannyS712: I wasn't sure if you would mind if I edited that or not. I wrote out a quick requirement on User:KadaneBot/Task2/ReplacementRules. I think that covers all differences. Thoughts? Kadane (talk) 01:43, 14 March 2019 (UTC)[reply]
@Kadane: Sorry, looking at all of these numbers for the templates is giving me a headache. I won't be on tomorrow, but I'll try to get back to you. I noticed, however, that you only cover Round->Rnd, not Decimal->Rnd. --DannyS712 (talk) 02:16, 14 March 2019 (UTC)[reply]
@DannyS712: - It doesn't appear that parameter changes are needed from Decimal->Rnd. The only case it would be edited is if there is a decimal number as an argument, it would be truncated to an int. Do you see anything that I am missing? Kadane (talk) 03:19, 15 March 2019 (UTC)[reply]
@Kadane: I agree --DannyS712 (talk) 22:34, 15 March 2019 (UTC)[reply]

((BAG assistance needed)) ((3x|p))ery (talk) 13:50, 16 March 2019 (UTC)[reply]

@Pppery: ((BAG assistance needed)) is generally only added to a request after seven days has passed. It is intended for use if urgent attention is needed or if a request is being neglected (wait seven days first). As far as I can tell, neither was the case here (nothing urgent and only 3 days since my last comment here). Just an FYI for the future, that's all --TheSandDoctor Talk 16:48, 16 March 2019 (UTC)[reply]

Approved for extended trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. @Kadane: As with the last trial, please post the results here. --TheSandDoctor Talk 16:48, 16 March 2019 (UTC)[reply]

Withdrawn by operator. Not enough edits to justify bot task. All parameters changed within trial. Kadane (talk) 06:04, 17 March 2019 (UTC)[reply]

Withdrawn by operator. As indicated per the above. Based on this, closing this request. --TheSandDoctor Talk 06:17, 17 March 2019 (UTC)[reply]

Replacement rules

[edit]

P1 = first parameter, P2 = second

Round -> Rnd
  • IF the P2 <= the number of digits after the decimal point in P1, no change is needed
  • IF the P2 > the number of digits after the decimal point in P1, CHANGE IS NEEDED - P2 should be set to equal the number of digits after the decimal point in P1
Decimals -> Rnd
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.