Page MenuHomePhabricator

Evaluate BaseBot class usage across scripts
Open, MediumPublic

Description

Replace.py outputs how many pages were affected during its run, I find this information useful and want to add this output to other scripts as well.

Event Timeline

This is the default behavior of those scripts using BaseBot classes if not overwriting their run method.

so the thing to do here is to check where and why the scripts overwrite the basebot run method?

so the thing to do here is to check where and why the scripts overwrite the basebot run method?

Yes. And which script does not use BaseBot classes.

Wesalius renamed this task from Add "no. of pages changed" output to pwb scripts to Evaluate BaseBot class usage across scripts.Jun 11 2018, 6:27 AM
Wesalius updated the task description. (Show Details)

so the thing to do here is to check where and why the scripts overwrite the basebot run method?

Yes. And which script does not use BaseBot classes.

@Xqt Can you please name an exemplary script that uses BaseBot so I can compare others?

All of them use either Bot, SingleSiteBot or MultipleSitesBot.

I am removing myself since it looks beyond my python knowledge. When creating the task I naively hoped to just add a simple counter to the script that missed the "x pages written output".

Vvjjkkii renamed this task from Evaluate BaseBot class usage across scripts to 8abaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Wesalius renamed this task from 8abaaaaaaa to Evaluate BaseBot class usage across scripts.Jul 1 2018, 10:34 AM
Wesalius lowered the priority of this task from High to Medium.
Wesalius updated the task description. (Show Details)
Wesalius added a subscriber: Aklapper.

Change 443590 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] use SingleSiteBot, AutomaticTWSummaryBot for CategoryListifyRobot

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

when listifying, the script outputs affected pages fine, when moving categories, there is no output

when listifying, the script outputs affected pages fine, when moving categories, there is no output

What output do you expect? Could you give an example.

Change 443832 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] derive ImageTransferBot from SingleSiteBot

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

when listifying, the script outputs affected pages fine, when moving categories, there is no output

What output do you expect? Could you give an example.

Number of pages moved (analogy to number of pages written in other scripts)

Change 445955 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Derive SandboxBot from MultipleSitesBot and ExistingPageBot

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

Change 456999 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Adjust BaseBot._savecounter for RedirectRobot

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

Change 456999 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Adjust BaseBot._savecounter for RedirectRobot

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

Change 589717 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] rename replace.run() with replace.treat()

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

Change 589872 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Remove duplicate counter in replace.py

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

Change 589717 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] rename replace.run() with replace.treat()

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

Change 589872 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Remove duplicate counter in replace.py

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

Change 636460 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Rename ReferencesRobot.run to treat

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

Change 636132 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] split WelcomeBot.run into parts

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

Change 636460 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Rename ReferencesRobot.run to treat

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

Change 443832 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] remove outdated "followRedirects" parameter from imagelinks()

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

Change 443832 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] remove outdated "followRedirects" parameter from imagelinks()

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

Change 636132 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] split WelcomeBot.run into parts

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

Change 641057 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Derive CommonsLinkBot from CurrentPageBot

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

Change 641057 abandoned by Xqt:
[pywikibot/core@master] [IMPR] Derive CommonsLinkBot from CurrentPageBot

Reason:
no longer maintained

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

Change 699413 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Use CurrentPageBot for add_text script

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

Change 699413 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] Use CurrentPageBot for add_text script

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