jenkins-bot merged this change.

View Change

Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
[IMPR] move site.py to its own folder

site.py is the biggest framework file with 343 KB disk space and
8500 lines of code. It contains 13 classes and 4 decorator functions.
This should be splitted into smaller parts for readability and
maintainability. Moving site.py to site/__init__.py is the first step.
See I1d12bfa246a90f93 for a splitted example.

Change-Id: Ie7e49a3756fcd096c23aa7c7e192415253322b16
---
M docs/api_ref/pywikibot.rst
A docs/api_ref/pywikibot.site.rst
M pywikibot/CONTENT.rst
M pywikibot/DIRECTORIES.rst
R pywikibot/site/__init__.py
M tox.ini
6 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/docs/api_ref/pywikibot.rst b/docs/api_ref/pywikibot.rst
index 4e4f3a0..c100475 100644
--- a/docs/api_ref/pywikibot.rst
+++ b/docs/api_ref/pywikibot.rst
@@ -11,6 +11,7 @@
pywikibot.comms
pywikibot.data
pywikibot.families
+ pywikibot.site
pywikibot.tools
pywikibot.userinterfaces

@@ -127,11 +128,6 @@

.. automodule:: pywikibot.proofreadpage

-pywikibot.site module
----------------------
-
-.. automodule:: pywikibot.site
-
pywikibot.site\_detect module
-----------------------------

diff --git a/docs/api_ref/pywikibot.site.rst b/docs/api_ref/pywikibot.site.rst
new file mode 100644
index 0000000..04e0380
--- /dev/null
+++ b/docs/api_ref/pywikibot.site.rst
@@ -0,0 +1,4 @@
+pywikibot.site package
+=======================
+
+.. automodule:: pywikibot.site
diff --git a/pywikibot/CONTENT.rst b/pywikibot/CONTENT.rst
index 3ea540f..37c7786 100644
--- a/pywikibot/CONTENT.rst
+++ b/pywikibot/CONTENT.rst
@@ -59,8 +59,6 @@
| proofreadpage.py | Objects representing objects used with ProofreadPage |
| | Extension |
+----------------------------+------------------------------------------------------+
- | site.py | Objects representing MediaWiki sites (wikis) |
- +----------------------------+------------------------------------------------------+
| site_detect.py | Classes for detecting a MediaWiki site |
+----------------------------+------------------------------------------------------+
| specialbots.py | Predefined special bot classes |
@@ -117,6 +115,13 @@


+----------------------------+------------------------------------------------------+
+ | site | Module with classes for MediaWiki sites |
+ +============================+======================================================+
+ | __init__.py | Objects representing MediaWiki sites (wikis) |
+ +----------------------------+------------------------------------------------------+
+
+
+ +----------------------------+------------------------------------------------------+
| tools | Miscellaneous helper functions (not wiki-dependent). |
+============================+======================================================+
| __init__.py | several classes and methods |
diff --git a/pywikibot/DIRECTORIES.rst b/pywikibot/DIRECTORIES.rst
index d12b54d..c837fc4 100644
--- a/pywikibot/DIRECTORIES.rst
+++ b/pywikibot/DIRECTORIES.rst
@@ -14,6 +14,8 @@
+---------------------------+------------------------------------------------------+
| pywikibot/families | wiki-specific information and settings |
+---------------------------+------------------------------------------------------+
+ | pywikibot/site | Module with classes for MediaWiki sites |
+ +---------------------------+------------------------------------------------------+
| pywikibot/tools | Miscellaneous helper functions (not wiki-dependent) |
+---------------------------+------------------------------------------------------+
| pywikibot/userinterfaces | GUI and terminal interface |
diff --git a/pywikibot/site.py b/pywikibot/site/__init__.py
similarity index 100%
rename from pywikibot/site.py
rename to pywikibot/site/__init__.py
diff --git a/tox.ini b/tox.ini
index 8a88118..1ec19c1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -146,7 +146,7 @@
pywikibot/login.py: N802, N816
pywikibot/page.py: N802
pywikibot/pagegenerators.py : N802, N803, N806, N816
- pywikibot/site.py: N802, N815
+ pywikibot/site/__init__.py: N802, N815
pywikibot/specialbots.py : N803, N806, N802
pywikibot/textlib.py : N801, N802, N803, N806, N816
pywikibot/throttle.py: N802

To view, visit change 579706. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7e49a3756fcd096c23aa7c7e192415253322b16
Gerrit-Change-Number: 579706
Gerrit-PatchSet: 5
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: jenkins-bot (75)