cosmetic_changes.py has been moved from scripts/ into pywikibot/ , so that the library package 'pywikibot' is not dependant on the 'scripts' package.
https://gerrit.wikimedia.org/r/#/c/190715
The script can still be run using its new location explicitly; e.g.
$ python3 pwb.py pywikibot/cosmetic_changes.py -family:wikipedia -lang:en -page:Main_Page -simulate
If you have a script that was importing cosmetic changes, you will need to update your import statement to import pywikibot.cosmetic_changes .
We have a change pending to re-add 'scripts/cosmetic_changes.py', so the breakage is only temporary, however import statements should be updated anyway.
https://gerrit.wikimedia.org/r/#/c/205843/
Another way to reduce the impact of the move is allowing pwb to find & execute commands located in the pywikibot/ directory.
https://gerrit.wikimedia.org/r/#/c/209429/
2015-05-07 7:51 GMT+03:00 John Mark Vandenberg jayvdb@gmail.com:
cosmetic_changes.py has been moved from scripts/ into pywikibot/ , so that the library package 'pywikibot' is not dependant on the 'scripts' package.
Thanks for the heads up!
https://gerrit.wikimedia.org/r/#/c/190715
The script can still be run using its new location explicitly; e.g.
$ python3 pwb.py pywikibot/cosmetic_changes.py -family:wikipedia -lang:en -page:Main_Page -simulate
If you have a script that was importing cosmetic changes, you will need to update your import statement to import pywikibot.cosmetic_changes .
We have a change pending to re-add 'scripts/cosmetic_changes.py', so the breakage is only temporary, however import statements should be updated anyway.
https://gerrit.wikimedia.org/r/#/c/205843/
Another way to reduce the impact of the move is allowing pwb to find & execute commands located in the pywikibot/ directory.
I know you guys are not keen on adding new configuration options, but this looks like a prime candidate to me. Allowing the user's own list of folders would simplify calling some scripts.
Thanks, Strainu
-- John Vandenberg
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
On Thu, May 7, 2015 at 4:43 PM, Strainu strainu10@gmail.com wrote:
2015-05-07 7:51 GMT+03:00 John Mark Vandenberg jayvdb@gmail.com:
Another way to reduce the impact of the move is allowing pwb to find & execute commands located in the pywikibot/ directory.
I know you guys are not keen on adding new configuration options, but this looks like a prime candidate to me. Allowing the user's own list of folders would simplify calling some scripts.
Hi Strainu, thanks for the reply.
I agree, and this follows from our last discussion. https://lists.wikimedia.org/pipermail/pywikipedia-l/2015-January/009234.html
That patch only adds 'pywikibot' to the list of directories scanned, but we could extend that to aid finding scripts in other directories. e.g. using a env var PYWIKIBOT2_SCRIPT_PATH which could include multiple directories separated by the OS path separator (: or ;), and the entries could also be proper python package names for shared scripts which are packaged and distributed separately from the core library.
I've added another change to make using scripts in other directories easier.
https://gerrit.wikimedia.org/r/#/c/209428/
pywikipedia-l@lists.wikimedia.org