Changes between Initial Version and Version 1 of Orange25/RefactoringTool


Ignore:
Timestamp:
04/12/11 11:55:13 (3 years ago)
Author:
marko
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Orange25/RefactoringTool

    v1 v1  
     1== Refactoring tool orange2to25.py == 
     2 
     3In orange directory there is a orange2to25.py script 
     4* Use it like this (this will output a diff of proposed changes): 
     5{{{ 
     6python orange2to25.py myscripy.py 
     7}}} 
     8* To overwrite the myscript.py (a backup will be saved in myscript.py.bak) use: 
     9{{{ 
     10python orange2to25.py -w myscripy.py 
     11}}} 
     12* To use an aggressive name changer add the '-a' flag (will fix names in the global and local scope, e.g. it will replace ExampleTable (without the orange. prefix) with Orange.data.Table and import the appropriate package (Orange.data)) 
     13{{{ 
     14python orange2to25.py -w -a myscripy.py 
     15}}} 
     16* To write the changed script to a new file use '-o' argument 
     17{{{ 
     18python orange2to25.py -w -o mynewandimprovedscript.py myscript.py 
     19}}} 
     20* For help type: 
     21{{{ 
     22python orange2to25.py --help 
     23}}}  
     24 
     25=== Adding mapped names and modules === 
     26 
     27Currently there are only a few MAPPING definitions in the both fixers available. Add all changed names and moved modules to the appropriate file: 
     28 
     29* Add other mapped names to orange/fixer/fix_changed_names.py in the MAPPING global variable (For instance .. "orange.ExampleTable":"Orange.data.Table", ...)  
     30* Add mapped modules to orange/fixer/fix_orange_imports.py in the MAPPING global variable (For instance ... "orngSVM": Orange.classification.svm", ...)