Wesalius created this task.
Wesalius added a subscriber: Wesalius.
Wesalius added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
When I try to do ANY work on this [[ http://www.wikiskripta.eu/index.php/Speci%C3%A1ln%C3%AD:Verze | 1.22 non-WMF wiki]] I get hookaborted error. Recently I tried to fix doubleredirects, underneath is a output of the same command with -verbose
```
Pywikibot r89d748fb2c8babe1596a4eabdd5b4a316e2be43f
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)]
Found 1 ws:cs processes running, including this one.
LOADING SITE ws:cs VERSION: 1.22.0
Retrieving special page...
>>> Ca ledvin <<<
Links to: [[Karcinom ledvin]].
Links to: [[Karcinom ledviny]].
@@ -1 +1 @@
- #PŘESMĚRUJ [[Karcinom ledvin]]
+ #PŘESMĚRUJ [[Karcinom ledviny]]
Do you want to accept the changes? ([y]es, [N]o, [a]ll, [q]uit): y
Cosmetic changes for ws-cs enabled.
WARNING: \core\pywikibot\cosmetic_changes.py:221: Im
portWarning: package stdnum.isbn not found; using scripts.isbn
Site("cs", "ws").login(False) called when a previous login was in progress.
WARNING: \core\pywikibot\tools\ip.py:55: Deprecation
Warning: ipaddress backport not available.
API Error: query=
{'action': [u'edit'],
u'basetimestamp': [Timestamp(2015, 4, 30, 12, 13, 53)],
'bot': [True],
'createonly': [False],
u'format': [u'json'],
u'maxlag': ['5'],
'minor': [True],
'nocreate': [False],
'notminor': [False],
'recreate': [True],
'summary': [u'Robot: Opravuji dvojit\xe9 p\u0159esm\u011brov\xe1n\xed na [[Karc
inom ledviny]]'],
'text': [u'#P\u0158ESM\u011aRUJ [[Karcinom ledviny]]'],
'title': [u'Ca ledvin'],
'token': [u'3d5bb3852621602ab4d9f93d106a4ec4+\\']}
response=
{u'error': {u'info': u'The modification you tried to make was aborted by an exte
nsion hook', u'code': u'hookaborted'}}
Error saving page [[Ca ledvin]] (hookaborted: The modification you tried to make
was aborted by an extension hook)
```
TASK DETAIL
https://phabricator.wikimedia.org/T98591
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Wesalius
Cc: pywikipedia-bugs, Wesalius, Aklapper, jayvdb
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added projects: pywikibot-core, Pywikibot-Wikidata.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
The same functionality can be achieved as a class method of ItemPage
TASK DETAIL
https://phabricator.wikimedia.org/T98663
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, Aklapper, jayvdb
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
With a sysopname set for test:test, canBeEdited() returns True, but editing the page does not work unless the sysop account is explicitly logged in.
```
$ python3 pwb.py shell
Welcome to the Pywikibot interactive shell!
>>> import pywikibot
>>> s = pywikibot.Site('test', 'test')
>>> p = pywikibot.Page(s, 'User:John Vandenberg/test protected')
>>> p.canBeEdited()
True
>>> p.text = 'Testing 1 2 3'
>>> p.save()
Logging in to test:test as JVbot
Traceback (most recent call last):
File "pywikibot/site.py", line 4163, in editpage
result = req.submit()
File "pywikibot/data/api.py", line 1734, in submit
raise APIError(**result['error'])
pywikibot.data.api.APIError: protectedpage: The "editprotected" right is required to edit this page
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/code.py", line 90, in runcode
exec(code, self.locals)
File "<console>", line 1, in <module>
File "pywikibot/tools/__init__.py", line 949, in wrapper
return obj(*__args, **__kw)
File "pywikibot/page.py", line 1051, in save
**kwargs)
File "pywikibot/page.py", line 1075, in _save
raise err
File "pywikibot/page.py", line 1062, in _save
watch=watchval, bot=botflag, **kwargs)
File "pywikibot/site.py", line 1075, in callee
return fn(self, *args, **kwargs)
File "pywikibot/site.py", line 4183, in editpage
raise self._ep_errors[err.code](page)
pywikibot.exceptions.LockedPage: Page [[test:User:John Vandenberg/test protected]] is locked.
```
None of these callers explicitly login as sysop, and two dont catch the error.
```
$ git grep canBeEdited
pywikibot/page.py: def canBeEdited(self):
pywikibot/page.py: if not self.canBeEdited():
scripts/blockpageschecker.py: # if not page.canBeEdited():
scripts/blockpageschecker.py: if not page.canBeEdited():
scripts/reflinks.py: if not page.canBeEdited():
scripts/replace.py: if not page.canBeEdited():
scripts/upload.py: if potential_file_page.canBeEdited():
$ grep login scripts/blockpageschecker.py scripts/reflinks.py scripts/replace.py scripts/upload.py
scripts/replace.py: site.login()
scripts/upload.py: self.targetSite.login()
$ grep LockedPage scripts/blockpageschecker.py scripts/reflinks.py scripts/replace.py scripts/upload.py
scripts/blockpageschecker.py: except pywikibot.LockedPage:
scripts/replace.py: except pywikibot.LockedPage:
```
TASK DETAIL
https://phabricator.wikimedia.org/T98659
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, jayvdb, Aklapper
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