happy5214 created this task.
happy5214 added subscribers: happy5214, Legoktm, gerritbot, rmoen, EBernhardson, NiharikaKohli, Capt_Swing, Qgil, jayvdb, Mattflaschen, Xqt, Ricordisamoa, Multichill, Ladsgroup, pywikipedia-bugs.
happy5214 added projects: Outreachy-Round-10, Google-Summer-of-Code-2015, Collaboration-Team, Patch-For-Review, Possible-Tech-Projects, Flow, pywikibot-core, Pywikibot-General.
Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION
My name is Alexander Jones, and I want to implement Flow support in Pywikibot.
=Personal info and past contributions==
I am currently a sophomore at Northwest Vista College, a community college in San Antonio, Texas. My major is computer science, and I currently have a perfect 4.0 GPA. I know several different programming languages, including Java, PHP, Python, Perl, and Lua. Examples of my programming work can be found at my Github page (https://github.com/happy5214); especially notable are my current FILG (Python) and RPPDb (PHP) projects.
I have previously contributed to Mediawiki, submitting small patches to the Scribunto and WikiEditor extensions. But my biggest contributions to Wikimedia projects have been my edits to the English Wikipedia and Wikidata, which each number over 8,000. Part of my work on both has been creating Lua modules, particularly for road-related topics. I single-handedly devised the framework now used by several road templates, using a database of format strings and specially arranged tables to represent shield, link, abbreviation, and name formats for highway types around the world.
=Why I want to work on this=
Some of my work has brought me to Pywikibot. I currently operate HappyBot on enwikipedia using two Pywikibot scripts, which I will post momentarily. Each script updates a series of tables in my userspace using data collected from the catscan2 tool. The scripts run daily and have proven to be reliable, with the exceptions of catscan2 outages.
I love what Flow is trying to do. As a nut for structure, I love the organized nature of discussions that is a goal for Flow. I hope to help promote Flow and contribute workflow descriptions later on. For me, having a coded and formal framework for community processes would be perfect for my view of order.
=Goals=
Obviously, I want to have working code in Pywikibot that can interface with Flow objects through the MediaWiki API by the end of the coding period. But doing that would have to involve learning the codebases of both Pywikibot and Flow, learning and using the testing system, and figuring out the API.
During this project, I hope to:
# Establish working relationships with the Pywikibot and Flow teams.
# Learn prerequisites, including the MW API, Travis-CI and the testing framework, and the respective codebases and conventions of Pywikibot and Flow.
# Create an initial implementation of Flow support in Pywikibot.
# Test frequently, including in live testing environments and using Flow-specific and generic constructs where appropriate.
# Finish a stable implementation of Flow support in Pywikibot.
# If time allows, add a version-tracking construct to enable/disable specific Flow features as appropriate.
=Time=
I start my summer around May 18, so I can certainly start work by then. I hope to start my prerequisite research sooner than that, having most of it completed by the start of the coding period. The end of my summer vacation should be the last week-or-so of August. I will file a more detailed plan later.
=Other=
* I am only eligible for GSoC.
* I do not have any other fixed commitments for this summer.
I hope you will accept my (almost late) proposal. Thank you.
TASK DETAIL
https://phabricator.wikimedia.org/T93991
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: happy5214
Cc: pywikipedia-bugs, Ladsgroup, Multichill, Ricordisamoa, Xqt, Mattflaschen, jayvdb, Qgil, Capt_Swing, NiharikaKohli, EBernhardson, rmoen, gerritbot, Legoktm, Aklapper, happy5214, Imaculate, matthiasmullie, Gryllida, Spage, Quiddity
akashagarwal created this task.
akashagarwal claimed this task.
akashagarwal added subscribers: akashagarwal, happy5214, Legoktm, gerritbot, rmoen, EBernhardson, NiharikaKohli, Capt_Swing, Qgil, jayvdb, Mattflaschen, Xqt, Ricordisamoa, Multichill, Ladsgroup, pywikipedia-bugs.
akashagarwal added projects: Google-Summer-of-Code-2015, Collaboration-Team, Possible-Tech-Projects, Flow, pywikibot-core, Pywikibot-General.
Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION
==Profile Information==
- Name: Akash Agarwal
- Email: akashslg(a)gmail.com
- IRC nickname: akashagarwal
- Github : https://github.com/akashagarwal/
- Resume : https://dl.dropboxusercontent.com/u/94374390/AkashAgarwal.pdf
- Location: Hyderabad, India (Time Zone - UTC+05:30)
- Typical working hours: 6:00 - 14:00 UTC & 17:00 - 21:00 UTC
==Synopsis==
Pywikibot is a collection of tools that allows one to automate work on a MediaWiki site. As per [[ http://stats.wikimedia.org/EN/BotActivityMatrixEdits.htm | Wikimedia stats ]] 910 M or 25.8 % of total edits are made by bots. So, Pywikibot is one the major projects for Wikimedia Foundation which makes consuming the MediaWiki API simple for bot developers.
Flow, the new communication extension for MediaWiki is not supported by Pywikibot. When the Flow extension is installed and Flow is enabled on a page (usually a Talk page - [[ https://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Breakfast | example ]]), the page becomes a Flow board (the content model property changes to 'flow-board' instead of 'wikitext'). The content in such a page is quite different from a general wiki page (For example, Flow stores a revision per post not per article and flow data can be on a different database. Also, several wikis may use the same database for flow ). As a result, the API calls for a general wiki page will not work for Flow enables pages. Flow has an extensive set of API’s which needs to be implemented in Pywikibot.
Possible mentors : @jayvdb, @Mattflaschen, @Legoktm
==Deliverables==
As per T67119 the main goal of this project will be to implement the concepts of Flow as Pywikibot classes and adding unit tests to interact with test Flow pages.
The code written as part of the project can be categories as:
==Part 1: Adding flow functionality in Pywikibot ==
This will be done by inheriting from the pywikibot base class BasePage. The main functionlities will be added in page.py or in a new flow.py.
=== Basic Flow information ===
Add the API Action = query,prop = flowinfo in Pywikibot which should give the basic flow information about a page. Already implemented ( https://gerrit.wikimedia.org/r/#/c/132767/) but we may need to modify and/or add unit tests. Also, it may be needed to update prop = info in Pywikibot.
=== Flow API ===
These include the read and write API consisting of submodules of action=flow.
GET - Read API’s
- view-topiclist ( ApiFlowViewTopicList ) - example - http://en.wikipedia.org/w/api.php?action=flow&submodule=view-topiclist&page…
- view-post ( ApiFlowViewPost )
- view-topic ( ApiFlowViewTopic )
- view-header ( ApiFlowViewHeader )
- view-topic-summary ( ApiFlowViewTopicSummary )
POST - Write API’s
- new-topic ( ApiFlowNewTopic )
- edit-header ( ApiFlowEditHeader )
- edit-post ( ApiFlowEditPost )
- edit-topic-summary ( ApiFlowEditTopicSummary )
- reply ( ApiFlowReply )
- moderate-post ( ApiFlowModeratePost )
- moderate-topic ( ApiFlowModerateTopic )
- edit-title ( ApiFlowEditTitle )
- lock-topic ( ApiFlowLockTopic )
- close-open-topic ( ApiFlowLockTopic )
Legoktm has added some related code at https://gerrit.wikimedia.org/r/#/c/187066/3 which may or may not be helpful.
=== Flow parsoid utility ===
Since, we have the Parsiod web API ( https://www.mediawiki.org/wiki/Parsoid/API ), I am not sure whether it would be relavent the add support for the action=flow-parsoid-utils API, which converts text between wikitext and HTML,in Pywikibot.
== Part 2: Unit tests ==
As specified in T67119 , unit tests will be added to the test suite to interact with test Flow pages on a Flow enabled Wikimedia site (e.g. MediaWiki.org). The tests will interact with Flow objects using the Flow specific functionality, and interact with the same pages using the standard Page functionality where appropriate.
The unit tests will be configured to run on travis-ci , and Flow related tests run when the test site has Flow enabled, and Flow related tests will be skipped when Flow isn’t installed.
== Part 3: Server version tracking (optional) ==
As Flow is being rapidly developed, we can expect changes in functionalities and different wikis may have several different versions of the Flow extension installed. It is important for Pywikibot to support them. If time permits, the Flow support will include server version tracking, so Flow features can easily be enabled/disabled as the Flow extension is enhanced.
==Timeline==
| 27 April | Accepted student proposals will be announced |
| 27 April - 25 May | Community bonding period. Get familiar with the Flow and Pywikibot developer community. Finalize plans for the project and go through the code base, read documentation. |
| 25 May | Coding period begins |
| 25 May - 3 July | Part 1: Adding flow functionality in Pywikibot |
| 3 July | Mid-term evaluations due |
| 3 July - 20 July | Part 2: Unit tests |
| 20 July - 14 August | Reiterate based on feedback, solve bugs, Part 3: Server version tracking (optional) |
| 14 August - 21 August | Documentation, Solve Bugs |
| 21 August | Pencils down data |
| 28th August | Final Evaluations due |
==Past experience==
MediaWiki extension on Peer Evaluation - https://github.com/akashagarwal/peer-evaluation
==Microtasks==
https://gerrit.wikimedia.org/r/#/c/196450/ (T72965 and T85725)
TASK DETAIL
https://phabricator.wikimedia.org/T94131
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: akashagarwal
Cc: pywikipedia-bugs, Ladsgroup, Multichill, Ricordisamoa, Xqt, Mattflaschen, jayvdb, Qgil, Capt_Swing, NiharikaKohli, EBernhardson, rmoen, gerritbot, Legoktm, happy5214, Aklapper, akashagarwal, Imaculate, matthiasmullie, Gryllida, Spage, Quiddity
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added projects: Pywikibot-login.py, pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
If -user: is specified on the command line for a bot which uses sysop actions, the sysop name in user-config is used for the sysop actions.
TASK DETAIL
https://phabricator.wikimedia.org/T98607
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, jayvdb, Aklapper
jayvdb added a comment.
I mentioned this on the CS, but it will be a long standing problem so worth mentioning here.
Currently if there are two different usernames in for user and sysop, pywikibot drops down to the user account for non-sysop actions after a sysop action. It is bad behaviour on the wiki to split a sysop bots actions/edits between two accounts, which is why bot operators usually set both usernames to be the same username for a sysop bot which also performs normal edits. But we need to think about whether/how we support the prior behaviour, or fail in an orderly manner.
One approach is to set a flag when a user action has occurred, and error if the same bot attempts to perform a sysop action with a different username.
TASK DETAIL
https://phabricator.wikimedia.org/T71283
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: gerritbot, XZise, jayvdb, Ricordisamoa, pywikipedia-bugs
Silvonen created this task.
Silvonen added a subscriber: Silvonen.
Silvonen added a project: Pywikibot-category.py.
Silvonen changed Security from none to none.
TASK DESCRIPTION
category.py now crashes after every move. I didn't check what it is actually trying to do, but this doesn't seem to affect the end result.
Test run on fiwiki:
>category.py move
Please enter the old name of the category: Parhaan elokuvan Oscar-palkinnon voittaneet elokuvat
Please enter the new name of the category: Parhaan elokuvan Oscar-palkinnon saaneet elokuvat
Page Luokka:Parhaan elokuvan Oscar-palkinnon voittaneet elokuvat moved to Luokka:Parhaan elokuvan Oscar-palkinnon saaneet elokuvat
Page Luokka:Parhaan elokuvan Oscar-palkinnon voittaneet elokuvat is moved and no longer exist.
Getting [[Luokka:Parhaan elokuvan Oscar-palkinnon voittaneet elokuvat]] list...
Getting 60 pages from wikipedia:fi...
...
Traceback (most recent call last):
File "D:\git\pywikipedia\category.py", line 1079, in <module>
main()
File "D:\git\pywikipedia\category.py", line 1049, in main
bot.run()
File "D:\git\pywikipedia\category.py", line 512, in run
self.oldCat.delete(reason, confirm, mark=True)
File "D:\git\pywikipedia\wikipedia.py", line 3765, in delete
self._getActionUser(action='delete', sysop=True)
File "D:\git\pywikipedia\wikipedia.py", line 2018, in _getActionUser
self.site().forceLogin(sysop=sysop)
File "D:\git\pywikipedia\wikipedia.py", line 6719, in forceLogin
if not self.loggedInAs(sysop=sysop):
File "D:\git\pywikipedia\wikipedia.py", line 6713, in loggedInAs
self._load(sysop=sysop)
File "D:\git\pywikipedia\wikipedia.py", line 7772, in _load
data = query.GetData(params, self, sysop=sysop)
File "D:\git\pywikipedia\pywikibot\support.py", line 118, in wrapper
return method(*__args, **__kw)
File "D:\git\pywikipedia\query.py", line 150, in GetData
data=data)
File "D:\git\pywikipedia\wikipedia.py", line 7239, in getUrl
back_response=True)
File "D:\git\pywikipedia\pywikibot\comms\http.py", line 97, in request
if not no_hostname and site.cookies(sysop = sysop):
File "D:\git\pywikipedia\wikipedia.py", line 6797, in cookies
self._loadCookies(sysop=sysop)
File "D:\git\pywikipedia\wikipedia.py", line 6829, in _loadCookies
% (self.family.name, self.lang))
pywikibot.exceptions.NoUsername: You tried to perform an action that requires admin privileges, but you haven't
entered your sysop name in your user-config.py. Please add
sysopnames['wikipedia']['fi']='name' to your user-config.py
>python version.py
Pywikibot: [https] r-pywikibot-compat.git (925d931, g11106, 2014/11/29, 15:08:51, ok)
Release version: 1.0b1
Python: 2.7.2 (default, Jun 24 2011, 12:22:14) [MSC v.1500 64 bit (AMD64)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
TASK DETAIL
https://phabricator.wikimedia.org/T76687
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: Silvonen
Cc: Aklapper, Silvonen, pywikipedia-bugs