jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/508717 )
Change subject: Drop support for script_wui.py
......................................................................
Drop support for script_wui.py
- move script_wui.py to archive
- update docs accordingly
- remove requirements
- ignore tests for archived scripts because they are no longer maintained
- remove archive from script_path in pwb wrapper. They are still available
using the archive path
Bug: T222759
Change-Id: I1c51f246d352c12e664c304f7203c869f81a652d
---
M docs/scripts/scripts.archive.rst
M docs/scripts/scripts.rst
M pwb.py
M requirements.txt
M scripts/README.rst
R scripts/archive/script_wui.py
M setup.py
M tests/script_tests.py
M tox.ini
9 files changed, 13 insertions(+), 37 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/scripts/scripts.archive.rst b/docs/scripts/scripts.archive.rst
index 4cfbdbe..08a8b67 100644
--- a/docs/scripts/scripts.archive.rst
+++ b/docs/scripts/scripts.archive.rst
@@ -17,4 +17,12 @@
:undoc-members:
:show-inheritance:
+scripts.archive.script\_wui script
+----------------------------------
+
+.. automodule:: scripts.archive.script_wui
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
diff --git a/docs/scripts/scripts.rst b/docs/scripts/scripts.rst
index 501b274..181c5e1 100644
--- a/docs/scripts/scripts.rst
+++ b/docs/scripts/scripts.rst
@@ -490,14 +490,6 @@
:undoc-members:
:show-inheritance:
-scripts.script\_wui script
---------------------------
-
-.. automodule:: scripts.script_wui
- :members:
- :undoc-members:
- :show-inheritance:
-
scripts.selflink script
-----------------------
diff --git a/pwb.py b/pwb.py
index 1316bda..9027c8c 100755
--- a/pwb.py
+++ b/pwb.py
@@ -177,7 +177,6 @@
if not os.path.exists(filename):
script_paths = ['scripts',
'scripts.maintenance',
- 'scripts.archive',
'scripts.userscripts']
from pywikibot import config
if config.user_script_paths:
diff --git a/requirements.txt b/requirements.txt
index 29f8c87..ec693c7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -49,9 +49,6 @@
google >= 1.7
sseclient >= 0.0.18,!=0.0.23
-# scripts/script_wui.py:
-crontab
-
# scripts/flickrripper.py
flickrapi
@@ -65,11 +62,6 @@
# pywikibot prefers PyMySQL over MySQLdb (Python 2 only)
PyMySQL
-# scripts/script_wui.py depends on Lua, which is not available using pip
-# but can be obtained from:
https://github.com/bastibe/lunatic-python
-# However, a better fork is:
https://github.com/AlereDevices/lunatic-python
-# Also script_wui.py is not currently functional, so it isn't installed here.
-
# core HTML comparison parser in diff module
beautifulsoup4
diff --git a/scripts/README.rst b/scripts/README.rst
index 707bc85..a5a09ff 100644
--- a/scripts/README.rst
+++ b/scripts/README.rst
@@ -194,8 +194,6 @@
+------------------------+---------------------------------------------------------+
| revertbot.py | Revert edits. |
+------------------------+---------------------------------------------------------+
- | script_wui.py | Fix anomalous escape (\) |
- +------------------------+---------------------------------------------------------+
| selflink.py | This bot goes over multiple pages of the home wiki, |
| | searches for selflinks, and allows removing them. |
+------------------------+---------------------------------------------------------+
@@ -266,6 +264,8 @@
+========================+=========================================================+
| featured.py | A robot to check feature articles. |
+------------------------+---------------------------------------------------------+
+ | script_wui.py | Run scripts as sub-bot |
+ +------------------------+---------------------------------------------------------+
+----------------------------------------------------------------------------------+
diff --git a/scripts/script_wui.py b/scripts/archive/script_wui.py
similarity index 100%
rename from scripts/script_wui.py
rename to scripts/archive/script_wui.py
diff --git a/setup.py b/setup.py
index 766d5b9..e218e90 100644
--- a/setup.py
+++ b/setup.py
@@ -89,9 +89,6 @@
'patrol.py': ['mwparserfromhell>=0.3.3'],
}
-# lunatic-python is only available for Linux
-if sys.platform.startswith('linux'):
- script_deps['script_wui.py'] = ['irc', 'lunatic-python',
'crontab']
if PY2:
# tools.ip does not have a hard dependency on an IP address module,
diff --git a/tests/script_tests.py b/tests/script_tests.py
index 0fd85ca..e265965 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -19,16 +19,12 @@
scripts_path = join_root_path('scripts')
-archive_path = join_root_path('scripts', 'archive')
-
# These dependencies are not always the package name which is in setup.py.
# e.g. 'PIL.ImageTk' is a object provided by several different pypi packages,
# and setup.py requests that 'Pillow' is installed to provide
'PIL.ImageTk'.
# Here, it doesn't matter which pypi package was requested and installed.
# Here, the name given to the module which will be imported is required.
script_deps = {
- 'script_wui': ['crontab', 'lua'],
- # Note: package 'lunatic-python' provides module 'lua'
'flickrripper': ['flickrapi', 'Pillow'],
'imageharvest': ['bs4'],
'isbn': ['python-stdnum'],
@@ -59,7 +55,6 @@
unrunnable_script_set = {
'version', # does not use global args
- 'script_wui', # depends on lua compiling
}
@@ -73,8 +68,7 @@
script_list = (['login']
- + list_scripts(scripts_path, 'login.py')
- + list_scripts(archive_path))
+ + list_scripts(scripts_path, 'login.py'))
runnable_script_list = (
['login'] + sorted(set(script_list) - {'login'} -
unrunnable_script_set))
@@ -107,7 +101,6 @@
'checkimages',
'clean_sandbox',
'disambredir',
- 'featured',
'followlive',
'imagerecat',
'login',
@@ -117,7 +110,6 @@
'noreferences',
'nowcommons',
'patrol',
- 'script_wui',
'shell',
'standardize_interwiki',
'states_redirect',
@@ -134,7 +126,6 @@
# TODO: until done here, remember to set editor = None in user-config.py
'checkimages': 'Execution time: 0 seconds',
'editarticle': 'Nothing changed',
- 'featured': '0 pages written.',
'freebasemappingupload': 'Cannot find ',
'harvest_template': 'ERROR: Please specify',
'imageuncat':
@@ -145,7 +136,6 @@
'login': 'Logged in on ',
'pagefromfile': 'Please enter the file name',
'replace': 'Press Enter to use this automatic message',
- 'script_wui': 'Pre-loading all relevant page contents',
'shell': ('>>> ', 'Welcome to the'),
'transferbot': 'Target site not different from source site',
'unusedfiles': ('Working on', None),
diff --git a/tox.ini b/tox.ini
index e109fd3..45afec0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -100,7 +100,7 @@
ignore =
D105,D211,D401,D413,D412,FI12,FI13,FI15,FI16,FI17,FI5,H101,H236,H301,H404,H405,H903,P101,P102,P103,W503
enable-extensions = H203,H204,H205
-exclude = .tox,.git,./*.egg,build,user-config.py,./scripts/i18n/*,scripts/userscripts/*
+exclude =
.tox,.git,./*.egg,build,user-config.py,scripts/archive/*,./scripts/i18n/*,scripts/userscripts/*
min-version = 2.7
accept-encodings = utf-8
require-code = true
@@ -163,7 +163,6 @@
pywikibot/weblib.py: N802
pywikibot/xmlreader.py : N803, N806, N802
scripts/add_text.py : N803, N806
- scripts/archive/featured.py : D102, D103, N802
scripts/blockpageschecker.py : N802, N803, N806, N816
scripts/casechecker.py : N802, N803, N806, N815
scripts/category.py : N803, N806, N802
@@ -197,7 +196,6 @@
scripts/reflinks.py: N802, N816
scripts/replace.py : N802, N803, N806, N816
scripts/revertbot.py: N815
- scripts/script_wui.py : D102, N806, N802
scripts/solve_disambiguation.py : N803, N806, N802
scripts/table2wiki.py: N802
scripts/templatecount.py: N802
@@ -253,7 +251,7 @@
tests/xmlreader_tests.py: N802
[pep8]
-exclude = .tox,.git,./*.egg,build,user-config.py,./scripts/i18n/*,scripts/userscripts/*
+exclude =
.tox,.git,./*.egg,build,user-config.py,scripts/archive/*,./scripts/i18n/*,scripts/userscripts/*
[pep257]
# see explanations above
--
To view, visit
https://gerrit.wikimedia.org/r/508717
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1c51f246d352c12e664c304f7203c869f81a652d
Gerrit-Change-Number: 508717
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)