Profile Information
- Name: Akash Agarwal
- Email: akashslg@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 Wikimedia stats 910 M or 25.8 % of total edits are made by bots. So, Pywikibot is one the major projects for Wikimedia Foundation. Pywikibot 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 - 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 enabled 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 add unit tests to interact with test Flow pages.
The code written as part of the project can be categorized as:
Part 1: Adding flow functionality in Pywikibot
This will be done by inheriting from the pywikibot base class BasePage. The main functionalities 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 ( with corresponding Flow classes that needs to be implemented )
- view-topiclist ( ApiFlowViewTopicList ) - example - http://en.wikipedia.org/w/api.php?action=flow&submodule=view-topiclist&page=Wikipedia_talk:WikiProject_Breakfast
- 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 date |
28th August | Final Evaluations due |
Participation
I plan to be active on the MediaWiki and Pywikibot development channels and communicate regularly with Flow and Pywikibot developers. I believe that for such a project it is necessary to reiterate several times based on the feedback from the community. I plan to do so by pushing code to gerrit frequently and replying promptly to feedback received.
Will ask for help via IRC and mailing lists.
About me
I am a fourth year student at IIIT Hyderabad pursuing B.Tech + MS in Computer Science and Engineering. I will be completing my coursework this semester and will have one year left to complete the MS requirements. This will leave me with a lot of free time and so I plan to contribute to an open source organization.
Other time commitments
My exams end on 2 May after which I have a 3 month summer vacation. I plan to go for a 10 day vacation sometime during the period which I can decide with discussion with my mentors. Other than that I will be fully committed to GSoC.
Eligibility for Google Summer of Code and FOSS Outreach Program
Only eligible for GSoC.
Past experience
MediaWiki extension on Peer Evaluation - https://github.com/akashagarwal/peer-evaluation
Microtasks
https://gerrit.wikimedia.org/r/#/c/196450/ (T72965 and T85725)