Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 TheSandBot  
92 comments  


1.1  Discussion  





1.2  Post-RFC Closure  





1.3  Trial run  
















Wikipedia:Bots/Requests for approval/TheSandBot







Add links
 









Project page
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

< Wikipedia:Bots | Requests for approval

  • Approved BRFAs
  • talk
  • contribs
  • count
  • SUL
  • logs
  • page moves
  • block log
  • rights log
  • flag)
  • Operator: TheSandDoctor (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

    Time filed: 00:47, Wednesday, October 17, 2018 (UTC)

    Automatic, Supervised, or Manual: automatic

    Programming language(s): Python

    Source code available: https://github.com/TheSandDoctor/election_converter

    Function overview: Looks through the linked csv file, converting from the old title format to the new one.

    Links to relevant discussions (where appropriate): [1], RfC on election/referendum article naming format

    Edit period(s): Run until done

    Estimated number of pages affected: Approximately 35, 227

    Exclusion compliant (Yes/No):No

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

    Function details: The bot goes through the compiled csv file (in GitHub repo, more easily read form is the Excel document, which is also included). The bot then pulls up the individual page objects, double checks that they are not themselves redirects (ie that they haven't been moved) and exist. If both conditions are satisfied, the bot moves the page (leaving behind a redirect) to the corresponding title in column B (.xlsx doc). This corresponds with the latest RfC on election/referendum article naming format and was created per request of Number 57.

    The code itself is relatively straight forward, with most of the heavy lifting being handled by the mwclient Python library's move function, which is a part of the page object.

    Due to the large number of page moves required, I would also request that the bot flag be assigned should this request be approved. The bot is not exclusion compliant as that is non-applicable given the context.

    Discussion[edit]

    The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


    The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

    1. The RfC was advertised to the following WikiProjects: Elections and Referendums, Politics, Politics of the United Kingdom, U.S. Congress, Pakistani politics, New Zealand/Politics, Indian politics, Chinese politics and Australian politics; these are all the politics-related WikiProjects that I could find. On a vote-counting basis it is 69% in favour, but a couple of the oppose !votes are on dubious grounds (one being because an editor didn't believe that redirects appear in search, and another one who claimed they had never seen a year at the start of an article title), so I think the consensus (in terms of what a closing admin would determine) from the discussion is pretty undeniable.
    2. The proposed moves to 1998 California Proposition 10 etc are in line with the naming guideline (see the last bullet at WP:NC-GAL#Elections and referendums). The Oregon ones are currently incorrectly titled, so the move is to bring them in line with the guideline. We could have a conversation at a later date about whether the year is required at all for these types of articles (I'm not convinced it works), but currently they are in the guideline as such. If it's really a problem, perhaps we could drop them from the run?
    3. Polish presidential election, 1922 (special) is at the wrong title (one a few days before is at Polish presidential election, 9 December 1922, so the other one should be at Polish presidential election, 20 December 1922). This should therefore probably be moved to 20 December 1922 Polish presidential election;
    4. 2006 Ohio's 13th congressional district election is again a correct move in terms of the guideline (sixth bullet of WP:NC-GAL#Elections and referendums). The issue here is more around the awkward naming of the districts (e.g. Ohio's 13th congressional district) and is perhaps something that should be raised separately;
    5. The RfC did include discussion about titles that would start with a month (see Impru20's comments). The sortkey for articles like this would still be the year, followed by a numeral representing the month (e.g. "1946 1", "1946 2" for elections held in two separate months in 1946)
    Cheers, Number 57 09:02, 17 October 2018 (UTC)[reply]
    Looks like some bot coding is going to be needed to add/alter sort keys following the moves for new titles not starting with years. — xaosflux Talk 10:56, 17 October 2018 (UTC)[reply]
    I'm not sure this is really needed; the current format means that articles don't automatically sort by year, so in many cases a sortkey has already been added. For instance, French constitutional referendum, October 1946 (Guinea) mentioned above is sorted in Category:Referendums in Guinea by the key 1946. This might be something better to do manually for the 380 articles with months in the year if not already in place. Number 57 13:00, 17 October 2018 (UTC)[reply]
    For the other 4 categories it is in it is sorted only by page title such as Category:October 1946 events. I'm not sure what the 'best' answer for this is, but if doing it manually is the way that could be done prior to the page title moves to prevent issues in category view. — xaosflux Talk 13:08, 17 October 2018 (UTC)[reply]
    I think the question there is what is the best category sortkey for the article in Category:October 1946 events. Number 57 13:10, 17 October 2018 (UTC)[reply]
    Pages can be sorted differently in each category with a directive, but they only get one "default sort" for all undirected categories, so if in general sorting these be "month name" is undesirable a default sort should be defined for what the best general sorting should be. — xaosflux Talk 20:43, 17 October 2018 (UTC)[reply]
    There doesn't seem to be any firm conventions around this – some articles starting with a year are sorted by the year in the events categories, and others by the first word after the year. However, in election categories sorting by year would definitely be desirable, so I guess the year followed by the month would be the best sorting (e.g. 1946 01, 1946 02 to 1946 12). Happy to add a DEFAULTSORT manually to these articles if it will resolve this concern for you? Cheers, Number 57 21:06, 17 October 2018 (UTC)[reply]
    WP:NCGAL is a guideline, which like other guidelines says prominently at the top It is a generally accepted standard that editors should attempt to follow, though it is best treated with common sense, and occasional exceptions may apply. The use of a bot on such a huge scale precludes the consideration of exceptions. --BrownHairedGirl (talk) • (contribs) 03:03, 19 October 2018 (UTC)[reply]

    Post-RFC Closure[edit]

    Cheers, Number 57 10:47, 20 November 2018 (UTC)[reply]
    @TheSandDoctor: I can protect the lists too if you like (I'm also an admin), but that does sound sensible. Cheers, Number 57 22:33, 21 November 2018 (UTC)[reply]
    Haha, you're right. I knew you were an admin, my script told me you were an admin, yet when I sent that for some reason that didn't come to mind. I was just concerned with making sure you could edit it. That said, it still stands that I believe fully or template protecting is a smart move. The bot only reads the page in question containing the list of changes for a moment before storing it in memory and working from there, but if it was changed just before, then there could be potential issues. The probability is probably extremely small, but it is a risk as automated scripts don't think. So long as a malicious change kept the same format the bot would happily execute it unless it didn't have the rights to. --TheSandDoctor Talk 23:26, 21 November 2018 (UTC)[reply]
    @Number 57: ^ --TheSandDoctor Talk 23:27, 21 November 2018 (UTC)[reply]

    Trial run[edit]

    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.

    Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:Bots/Requests_for_approval/TheSandBot&oldid=871140441"

    Category: 
    Approved Wikipedia bot requests for approval
     



    This page was last edited on 29 November 2018, at 05:21 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki