r82763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82762‎ | r82763 | r82764 >
Date:23:36, 24 February 2011
Author:diederik
Status:deferred
Tags:
Comment:
Some minor fixes.
Modified paths:
  • /trunk/tools/editor_trends/manage.py (modified) (history)
  • /trunk/tools/editor_trends/requirements.txt (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/manage.py
@@ -49,33 +49,33 @@
5050 return choices
5151
5252
53 -def config_launcher(properties, logger):
 53+def config_launcher(rts, logger):
5454 '''
5555 Config launcher is used to reconfigure editor trends toolkit.
5656 '''
5757 # settings.load_configuration()
5858 pc = projects.ProjectContainer()
59 - if not os.path.exists('wiki.cfg') or properties.force:
 59+ if not os.path.exists('wiki.cfg') or rts.force:
6060 config = ConfigParser.RawConfigParser()
6161 project = None
6262 language = None
6363 #language_map = languages.language_map()
6464 working_directory = raw_input('Please indicate where you installed Editor Trends Analytics.\nCurrent location is %s\nPress Enter to accept default.\n' % os.getcwd())
65 - input_location = raw_input('Please indicate where to store the Wikipedia dump files.\nDefault is: %s\nPress Enter to accept default.\n' % settings.input_location)
 65+ input_location = raw_input('Please indicate where to store the Wikipedia dump files.\nDefault is: %s\nPress Enter to accept default.\n' % rts.input_location)
6666
6767 while project not in pc.projects.keys():
68 - project = raw_input('Please indicate which project you would like to analyze.\nDefault is: %s\nPress Enter to accept default.\n' % pc.projects[properties.project.name])
69 - project = project if len(project) > 0 else properties.project.name
 68+ project = raw_input('Please indicate which project you would like to analyze.\nDefault is: %s\nPress Enter to accept default.\n' % rts.project.full_name)
 69+ project = project if len(project) > 0 else rts.project.name
7070 if project not in pc.projects.keys():
7171 print 'Valid choices for a project are: %s' % ','.join(pc.projects.keys())
7272
73 - while language not in properties.project.valid_languages:
74 - language = raw_input('Please indicate which language of project %s you would like to analyze.\nDefault is: %s\nPress Enter to accept default.\n' % (pc.projects[project], properties.language))
 73+ while language not in rts.project.valid_languages:
 74+ language = raw_input('Please indicate which language of project %s you would like to analyze.\nDefault is: %s\nPress Enter to accept default.\n' % (rts.project.full_name, rts.language))
7575 if len(language) == 0:
76 - language = properties.language.code
77 - language = language if language in properties.project.valid_languages else properties.language
 76+ language = rts.language.code
 77+ language = language if language in rts.project.valid_languages else rts.language.default
7878
79 - input_location = input_location if len(input_location) > 0 else settings.input_location
 79+ input_location = input_location if len(input_location) > 0 else rts.input_location
8080 working_directory = working_directory if len(working_directory) > 0 else os.getcwd()
8181
8282 config = ConfigParser.RawConfigParser()
@@ -90,8 +90,8 @@
9191 config.write(fh)
9292 fh.close()
9393
94 - settings.working_directory = config.get('file_locations', 'working_directory')
95 - settings.input_location = config.get('file_locations', 'input_location')
 94+ rts.working_directory = config.get('file_locations', 'working_directory')
 95+ rts.input_location = config.get('file_locations', 'input_location')
9696
9797
9898
Index: trunk/tools/editor_trends/requirements.txt
@@ -4,3 +4,4 @@
55 pymongo==1.9
66 argparse
77 python-dateutil
 8+texttable
\ No newline at end of file

Status & tagging log