From 578e8ea7c650c369e286f971dc2aefe473938635 Mon Sep 17 00:00:00 2001 From: Alex Buts Date: Tue, 20 Oct 2015 09:48:42 +0100 Subject: [PATCH 1/3] created vs 2012_proj branch and committed changes there which would be used while transition to vs2015 occurs. Added recent tests for Mantid python --- .../RB1999000/MARIReduction_2000_1.py | 2 + Build_Mantid_config/UpgradeLog.XML | Bin 0 -> 2394 bytes Build_Mantid_config/UpgradeLog.htm | Bin 0 -> 15758 bytes .../_UpgradeReport_Files/UpgradeReport.css | 118 ++++ .../_UpgradeReport_Files/UpgradeReport.xslt | 558 ++++++++++++++++++ .../UpgradeReport_Error.png | Bin 0 -> 397 bytes .../UpgradeReport_Information.png | Bin 0 -> 338 bytes .../UpgradeReport_Success.png | Bin 0 -> 381 bytes .../UpgradeReport_Warning.png | Bin 0 -> 292 bytes ReadVLC/ReadVLC.py | 134 +++++ ReadVLC/ReadVLC.pyproj | 28 + ReadVLC/ReadVLC.sln | 20 + RunReduction/module1.py | 195 ++++++ Test_Mantid_config/Test_Mantid_config.pyproj | 31 + Test_Mantid_config/Test_Mantid_config.sln | 20 + VSArea_Projects/ReduceLET/ReduceLET.pyproj | 14 +- test_MatrixWS/test_MatrixWS.py | 1 + test_MatrixWS/test_MatrixWS.pyproj | 44 ++ test_MatrixWS/test_MatrixWS.sln | 18 + test_RunDescriptor/RunDescriptorTest.pyproj | 6 +- 20 files changed, 1180 insertions(+), 9 deletions(-) create mode 100644 Build_Mantid_config/Build_Mantid_config/tuf666699/RB1999000/MARIReduction_2000_1.py create mode 100644 Build_Mantid_config/UpgradeLog.XML create mode 100644 Build_Mantid_config/UpgradeLog.htm create mode 100644 Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.css create mode 100644 Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.xslt create mode 100644 Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Error.png create mode 100644 Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Information.png create mode 100644 Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Success.png create mode 100644 Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Warning.png create mode 100644 ReadVLC/ReadVLC.py create mode 100644 ReadVLC/ReadVLC.pyproj create mode 100644 ReadVLC/ReadVLC.sln create mode 100644 RunReduction/module1.py create mode 100644 Test_Mantid_config/Test_Mantid_config.pyproj create mode 100644 Test_Mantid_config/Test_Mantid_config.sln create mode 100644 test_MatrixWS/test_MatrixWS.py create mode 100644 test_MatrixWS/test_MatrixWS.pyproj create mode 100644 test_MatrixWS/test_MatrixWS.sln diff --git a/Build_Mantid_config/Build_Mantid_config/tuf666699/RB1999000/MARIReduction_2000_1.py b/Build_Mantid_config/Build_Mantid_config/tuf666699/RB1999000/MARIReduction_2000_1.py new file mode 100644 index 0000000..bb5333a --- /dev/null +++ b/Build_Mantid_config/Build_Mantid_config/tuf666699/RB1999000/MARIReduction_2000_1.py @@ -0,0 +1,2 @@ +#Test reduction file +Contents=None \ No newline at end of file diff --git a/Build_Mantid_config/UpgradeLog.XML b/Build_Mantid_config/UpgradeLog.XML new file mode 100644 index 0000000000000000000000000000000000000000..401bd341fc3b775d966a96e24abd09441f86f852 GIT binary patch literal 2394 zcmeH}%Wl(95Qb-s#5-7B&{gc-ptO)yy-G+>RWw~7Aw_NCl9a>_cG@&A4}AZeL~#&_ zDo{5FS+>VBbLR4&nK}OP{jKfWgY~Uvk=QnYG}zk!JSA zrI*&QQ>&r%3Y~r1vzfITc7`^_ZVJ`mnerVuZvb7lRp=DoLrZv;Xs#mf5J74;E^peU z4e(Xi6@F9u$UPv2f;CM%cPG}9C3^A1_7LkK!o@cC?72N7hjTpScoG^zyeNajvpaE& zGPseQAeCNW@6ix;Jx68J@d`F>;kM8gmWOud5x0r`0~yImm%N&eYevppauwDWSiQq; zi`9=``T3C^Vlo?ZEB0IWcZ{DBZv_zyJgVvbznkoOAO4j~t{w9g&o>|qzWpzZ;;32n8Q!_8aWQ~m(X*{wM`wb+lFo0j=i)Ocu+;X;SMuL()9|z z1c3o-=DVojb(@;%RaS+bs!}*rZT8@+v+B&Q2ixMgQ<1lbZkhZF%XK>R0zYS!btS$e znUCqnvz~Q_W>S}!#+8*hxz+7;)T|>5k-Zu0x zw|eJqdhh>q3bShQbPDI){4Q$>|M_H&>5?A(B@2sZ?R1i;qk8nVPKVI@IvI41M$~l9 zyE+Hd1>gK+5fyo7h7)tTK7OK#d1^e)$n|&mMBe$coWlhCgtjKyud`KHjT}Gy;e=B? c%w=_H$5&~d_M!A|Bdn_vd~vre`|H@VpDnhh=l}o! literal 0 HcmV?d00001 diff --git a/Build_Mantid_config/UpgradeLog.htm b/Build_Mantid_config/UpgradeLog.htm new file mode 100644 index 0000000000000000000000000000000000000000..3b45160403d139b71f86f00b3fe6366e18dc1d41 GIT binary patch literal 15758 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 F_g}| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ + + + + Solution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Error + Warning + Success + + + + + + + + + + + + + + + + + + + + + + + + + + + + Message + Warning + Error + Message + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProjectPathErrorsWarningsMessages
+ + + + _UpgradeReport_Files\UpgradeReport_Error.png + _UpgradeReport_Files\UpgradeReport_Warning.png + _UpgradeReport_Files\UpgradeReport_Success.png + + + + + + + + + + + + + + + Solution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ' + + + + + + + +
+
+ + + + + + + + + + + + + ' + + + + + + + + + + + Show additional messages + + + + + + + + + + + + + + + + + ' + + + + + + + + + + + Hide additional messages + + + + + + + + + + + + + + display: none + + + + + + + + + + + _UpgradeReport_Files\UpgradeReport_Error.png + _UpgradeReport_Files\UpgradeReport_Warning.png + _UpgradeReport_Files\UpgradeReport_Information.png + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + +

Solution

+
+ +

+ +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Message
+ + + Solution logged no messages. + + logged no messages. +
+
+
+ + + + + + + +]]> + + + + + + + + Migration Report + + + + + +

+ Migration Report - +

+ +
+

Overview

+ + + + +
+ +
+ +

Solution and projects

+ +
+ +
+
+ + +
+ +
\ No newline at end of file diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Error.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Error.png new file mode 100644 index 0000000000000000000000000000000000000000..4b489836c22fb143719d3f56e0a979eb1719dc99 GIT binary patch literal 397 zcmV;80doF{P)EE*$K8{ zYi%niSZSec8Y9@)C4~=QV-pCjf=m2e=Noci<`M+SflD^uy=Qi2I6EUoWm#@{(Dv0d zty^DbS(cqDu*MZ%z1N#gHP~!bPs@@Nj2<)0sxRzd40>;SJN1vtbNNei+q;q-92Fik z{B9oIm|vBL`@vjW%|lr!e?K`EX7RusXa2gs%V}U-y6#fRB9=3Y2e0G8Mjpg+i*+4V zb6~OX;N|@3Wi|8ayLhe;ztJxk#P4~NR0S?>fE3lCmRA}P!@NXT4R%r%XDpTtHIWfDe6{vBl= r0Ia%j(UIDEORQk@m{Bu)>d*NX`1=(663H+y00000NkvXXu0mjfc}A;U literal 0 HcmV?d00001 diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Information.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Information.png new file mode 100644 index 0000000000000000000000000000000000000000..fc631e2b8adebc8f1ecb7133059f1074f329fea7 GIT binary patch literal 338 zcmV-Y0j>UtP)S` zFasu%8~!9bEAVdgd9S1}9qxhwD6#Wn>>Md3V8CJmI}84pZc&*gU}0dUA52|A6*Hz3 zCG|fH0)(WfmON>MD;Q#;t07*qoM6N<$g4*zlqyPW_ literal 0 HcmV?d00001 diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Success.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Success.png new file mode 100644 index 0000000000000000000000000000000000000000..c8c27bcf094ea0860ac5c7a1eeced541efd533df GIT binary patch literal 381 zcmV-@0fPRCP)-&@60ojc~?F7 b_jmpQHYJ(sAt^vU00000NkvXXu0mjf`*5Fz literal 0 HcmV?d00001 diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Warning.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Warning.png new file mode 100644 index 0000000000000000000000000000000000000000..7197e0304d299e27ec06052057d4518076248914 GIT binary patch literal 292 zcmV+<0o(qGP)uo03i;pQ#VLkU+xo=10JRlrjNOn&~ErqFe}jIl)a9KIYJA zNWo*pCay?5fh??}7jv qZ-W*3V)h)mODq8-=*KRO + + + Debug + 2.0 + c1f1ace0-e79d-47ae-b88e-70885e51edc9 + . + ReadVLC.py + + + . + . + ReadVLC + ReadVLC + + + true + false + + + true + false + + + + + + \ No newline at end of file diff --git a/ReadVLC/ReadVLC.sln b/ReadVLC/ReadVLC.sln new file mode 100644 index 0000000..68d97bd --- /dev/null +++ b/ReadVLC/ReadVLC.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "ReadVLC", "ReadVLC.pyproj", "{C1F1ACE0-E79D-47AE-B88E-70885E51EDC9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C1F1ACE0-E79D-47AE-B88E-70885E51EDC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1F1ACE0-E79D-47AE-B88E-70885E51EDC9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1F1ACE0-E79D-47AE-B88E-70885E51EDC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1F1ACE0-E79D-47AE-B88E-70885E51EDC9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/RunReduction/module1.py b/RunReduction/module1.py new file mode 100644 index 0000000..7cf0364 --- /dev/null +++ b/RunReduction/module1.py @@ -0,0 +1,195 @@ +#pylint: disable=invalid-name +import os +#os.environ["PATH"] =\ +#r"c:/Mantid/Code/builds/br_master/bin/Release;"+os.environ["PATH"] +""" Sample MARI reduction scrip used in testing ReductionWrapper """ +from Direct.ReductionWrapper import * +try: + import reduce_vars as web_var +except: + web_var = None + + +class ReduceMARIFromFile(ReductionWrapper): + @MainProperties + def def_main_properties(self): + """Define main properties used in reduction. These are the property + a user usually wants to change + """ + prop = {} + # if energy is specified as a list (even with single value e.g. ei=[81]) + # The numbers are treated as a fraction of ei [from ,step, to ]. If energy is + # a number, energy binning assumed to be absolute (e_min, e_step,e_max) + # + prop['incident_energy'] = 12 + prop['energy_bins'] = [-11,0.05,11] + # + # the range of files to reduce. This range ignored when deployed from autoreduction, + # unless you going to sum these files. + # The range of numbers or run number is used when you run reduction from PC. + + prop['sample_run'] = 11001 + prop['wb_run'] = 11060 + + # + prop['sum_runs'] = False # set to true to sum everything provided to sample_run + # # list + # Absolute units reduction properties. Set prop['monovan_run']=None to do relative units + prop['monovan_run'] = 11015 + prop['sample_mass'] = 10 + prop['sample_rmm'] = 435.96 + return prop + + @AdvancedProperties + def def_advanced_properties(self): + """Set up advanced properties, describing reduction. + These are the properties, usually provided by an instrument + scientist + + separation between simple and advanced properties depends + on scientist, experiment and user. All are necessary for reduction + to work properly + """ + prop = {} + prop['map_file'] = "mari_res.map" + prop['monovan_mapfile'] = "mari_res.map" + #prop['hardmaskOnly']=maskfile # disable diag, use only hard mask + prop['hard_mask_file'] = "mar11015.msk" + prop['det_cal_file'] = 11060 + #prop['data_file_ext']='.nxs' # if two input files with the same name and + #different extension found, what to prefer. + # there is currently bug in loadISISnexus, not loading monitors properly. + # When it fixed, the value of this parameter will be irrelevant + prop['load_monitors_with_workspace'] = True + # change this to correct value and verify that motor_log_names refers correct and existing + # log name for crystal rotation to write correct psi value into nxspe files + prop['motor_offset']=None + return prop + # + @iliad + def reduce(self,input_file=None,output_directory=None): + """Method executes reduction over single file + + Overload only if custom reduction is needed or + special features are requested + """ + + outWS = ReductionWrapper.reduce(self,input_file,output_directory) + #SaveNexus(outWS,Filename = 'MARNewReduction.nxs') + # Does the possibility to return PATH where to copy from web-services exist? + return outWS + + def validate_result(self,build_validation=False): + """Change this method to verify different results""" + # build_validation -- if true, build and save new workspace rather then validating the old one + rez,message = ReductionWrapper.build_or_validate_result(self,11001,"MARIReduction.nxs",build_validation,1.e-5) + return rez,message + + def set_custom_output_filename(self): + """ define custom name of output files if standard one is not satisfactory + In addition to that, example of accessing reduction properties + Changing them if necessary + """ + def custom_name(prop_man): + """Sample function which builds filename from + incident energy and run number and adds some auxiliary information + to it. + """ + # Note -- properties have the same names as the list of advanced and + # main properties + ei = prop_man.incident_energy + # sample run is more then just list of runs, so we use + # the formalization below to access its methods + run_num = PropertyManager.sample_run.run_number() + name = "RUN{0}atEi{1:<4.1f}meV_One2One".format(run_num ,ei) + return name + + # Uncomment this to use custom filename function + # Note: the properties are stored in prop_man class accessed as + # below. + #return custom_name(self.reducer.prop_man) + # use this method to use standard file name generating function + return None + + + def __init__(self,web_var=None): + """ sets properties defaults for the instrument with Name""" + ReductionWrapper.__init__(self,'MAR',web_var) +#-------------------------------------------------------------------------------------------------# +#-------------------------------------------------------------------------------------------------# +#-------------------------------------------------------------------------------------------------# +def main(input_file=None,output_directory=None): + """ This method is used to run code from web service + and should not be touched except changing the name of the + particular ReductionWrapper class (e.g. ReduceMARI here) + + You can also change the output folder to save data to + where web services will copy data + + This method will go when web service implements proper factory + """ + # note web variables initialization + rd = ReduceMARIFromFile(web_var) + rd.reduce(input_file,output_directory) + # change to the name of the folder to save data to + return '' + +if __name__ == "__main__": +#------------------------------------------------------------------------------------# +# SECTION USED TO RUN REDUCTION FROM MANTID SCRIPT WINDOW # +#------------------------------------------------------------------------------------# +##### Here one sets up folders where to find input data and where to save results #### + # It can be done here or from Mantid GUI: + # File->Manage user directory ->Browse to directory + # Folder where map and mask files are located: + #map_mask_dir = 'c:/Users/wkc26243/Documents/work/Libisis/InstrumentFiles/maps' + # folder where input data can be found + #data_dir = 'd:/Data/Mantid_Testing/15_01_27/autoreduce_maps' + root=os.path.dirname(os.path.realpath(__file__)) + data_dir = os.path.join(root,r'data') + + config.appendDataSearchDir(root) + config.appendDataSearchDir(data_dir) + config['defaultsave.directory']=root +###### Initialize reduction class above and set up reduction properties. ###### +###### Note no web_var in constructor.(will be irrelevant if factory is implemented) + rd = ReduceMARIFromFile() + rd.def_advanced_properties() + rd.def_main_properties() + +#### uncomment rows below to generate web variables and save then to transfer to ### + ## web services. + run_dir = os.path.dirname(os.path.realpath(__file__)) + file = os.path.join(run_dir,'reduce_vars.py') + rd.save_web_variables(file) + +#### Set up time interval (sec) for reducer to check for input data file. #### + # If this file is not present and this value is 0,reduction fails + # if this value >0 the reduction wait until file appears on the data + # search path checking after time specified below. + rd.wait_for_file = 0 # waiting time interval + +####get reduction parameters from properties above, override what you want locally ### + # and run reduction. Overriding would have form: + # rd.reducer.property_name (from the dictionary above) = new value e.g. + # rd.reducer.energy_bins = [-40,2,40] + # or + ## rd.reducer.sum_runs = False + +###### Run reduction over all run numbers or files assigned to ###### + # sample_run variable + + # return output workspace only if you are going to do + # something with it here. Running range of runs will return the array + # of workspace pointers. + #red_ws = rd.run_reduction() + # usual way to go is to reduce workspace and save it internally + #rd.run_reduction() + + +#### Validate reduction result against known result, obtained earlier ### + rez,mess=rd.validate_result() + if not rez: + raise RuntimeError("validation failed with error: {0}".format(mess)) + else: + print "ALL Fine" diff --git a/Test_Mantid_config/Test_Mantid_config.pyproj b/Test_Mantid_config/Test_Mantid_config.pyproj new file mode 100644 index 0000000..9cde26d --- /dev/null +++ b/Test_Mantid_config/Test_Mantid_config.pyproj @@ -0,0 +1,31 @@ + + + + Debug + 2.0 + 8c7fe82f-dedc-45a7-b287-2fec77e9d53a + . + d:\users\abuts\SVN\ISIS_analysisscripts\Build_Mantid_config.py + c:/Mantid/Code/builds/br_master/bin/Release;c:\Mantid\Code\Mantid\scripts\test;C:\Mantid\Code\Third_Party\lib\win64;c:\Mantid\Code\Mantid\scripts\Inelastic + . + . + Build_Mantid_config + Build_Mantid_config + Standard Python launcher + c:\Mantid\Code\builds\br_master\bin\Release\python.exe + False + False + + + true + false + + + true + false + + + + + + \ No newline at end of file diff --git a/Test_Mantid_config/Test_Mantid_config.sln b/Test_Mantid_config/Test_Mantid_config.sln new file mode 100644 index 0000000..1ed0893 --- /dev/null +++ b/Test_Mantid_config/Test_Mantid_config.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "Test_Mantid_config", "Test_Mantid_config.pyproj", "{8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/VSArea_Projects/ReduceLET/ReduceLET.pyproj b/VSArea_Projects/ReduceLET/ReduceLET.pyproj index 80e2112..6ef5f79 100644 --- a/VSArea_Projects/ReduceLET/ReduceLET.pyproj +++ b/VSArea_Projects/ReduceLET/ReduceLET.pyproj @@ -5,19 +5,18 @@ 2.0 a7a5f658-0191-4c55-a995-931b9be33661 D:\Data\isis\Let\June2013\ - d:\Data\Mantid_Testing\15_10_02\SumRunsTatiana.py - c:\Mantid\Code\builds\br_master\bin\Release;c:\Mantid\Code\Mantid\scripts\Inelastic;c:\Mantid\Code\Third_Party\lib\win64;d:\Data\MatidScripsPublicRepository\direct_inelastic\ISIS\qtiGenie + c:\Mantid\Testing\SystemTests\tests\analysis\ISIS_LETReduction.py + c:\Mantid\scripts\Inelastic;c:\Mantid\_builds\br_master\bin\Release;c:\Mantid\Third_Party\lib\win64;c:\Mantid\Testing\SystemTests\tests\analysis;d:\Data\MatidScripsPublicRepository\direct_inelastic\ISIS\qtiGenie . . - 00000000-0000-0000-0000-000000000000 - - + {1e3a12e0-0644-44c9-b078-9d1b6368e04e} + 2.7 ReduceLET ReduceLET False Standard Python launcher - c:\Mantid\Code\builds\br_master\bin\Release\python.exe + c:\Mantid\_builds\br_master\bin\Release\python.exe False @@ -34,5 +33,8 @@ + + + \ No newline at end of file diff --git a/test_MatrixWS/test_MatrixWS.py b/test_MatrixWS/test_MatrixWS.py new file mode 100644 index 0000000..df1dc68 --- /dev/null +++ b/test_MatrixWS/test_MatrixWS.py @@ -0,0 +1 @@ +print('Hello World') diff --git a/test_MatrixWS/test_MatrixWS.pyproj b/test_MatrixWS/test_MatrixWS.pyproj new file mode 100644 index 0000000..adaef90 --- /dev/null +++ b/test_MatrixWS/test_MatrixWS.pyproj @@ -0,0 +1,44 @@ + + + + Debug + 2.0 + e6512e09-3f20-4f2f-b1e7-ce8364b6b148 + . + c:\Mantid\Framework\PythonInterface\test\python\mantid\api\MatrixWorkspaceTest.py + c:\Mantid\_builds\br_master\bin\Release;c:\Mantid\scripts\Inelastic;C:\Mantid\Third_Party\lib\win64 + . + . + test_MatrixWS + test_MatrixWS + False + Standard Python launcher + False + c:\Mantid\_builds\br_master\bin\Release\python.exe + + + true + false + + + true + false + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + + + + + + + + + + \ No newline at end of file diff --git a/test_MatrixWS/test_MatrixWS.sln b/test_MatrixWS/test_MatrixWS.sln new file mode 100644 index 0000000..1f65e81 --- /dev/null +++ b/test_MatrixWS/test_MatrixWS.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "test_MatrixWS", "test_MatrixWS.pyproj", "{E6512E09-3F20-4F2F-B1E7-CE8364B6B148}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E6512E09-3F20-4F2F-B1E7-CE8364B6B148}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6512E09-3F20-4F2F-B1E7-CE8364B6B148}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/test_RunDescriptor/RunDescriptorTest.pyproj b/test_RunDescriptor/RunDescriptorTest.pyproj index 0618f50..7ea1082 100644 --- a/test_RunDescriptor/RunDescriptorTest.pyproj +++ b/test_RunDescriptor/RunDescriptorTest.pyproj @@ -5,9 +5,9 @@ 2.0 26b5f999-0dab-421b-8108-f5f37d50287f . - c:\Mantid\Code\Mantid\scripts\test\RunDescriptorTest.py - c:\Mantid\Code\Mantid\scripts\test;c:\Mantid\Code\builds\br_master\bin\Release;C:\Mantid\Code\Third_Party\lib\win64;d:\Data\MantidSystemTests\SystemTests\AnalysisTests;c:\Mantid\Code\Mantid\scripts\Inelastic - c:\Mantid\Code\Mantid\scripts\test + c:\Mantid\scripts\test\RunDescriptorTest.py + c:\Mantid\scripts\test;c:\Mantid\_builds\br_master\bin\Release;C:\Mantid\Third_Party\lib\win64;c:\Mantid\Testing\SystemTests\tests\analysis;c:\Mantid\scripts\Inelastic + c:\Mantid\scripts\test . RunPropertyTest RunPropertyTest From 040959ddf83e15ee1aa15c78fd9e06cb705ace09 Mon Sep 17 00:00:00 2001 From: Alex Buts Date: Tue, 20 Oct 2015 16:43:35 +0100 Subject: [PATCH 2/3] Fixed and working projects when used with VS2012 --- .../DirectEnergyConversionTest.pyproj | 10 +++++----- test_RunDescriptor/RunDescriptorTest.pyproj | 6 ++++++ test_RunDescriptor/RunDescriptorTest.sln | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj b/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj index 512c63f..e7b4454 100644 --- a/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj +++ b/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj @@ -4,10 +4,10 @@ Debug 2.0 7de7d019-7039-4e37-9aab-8bc165b6acb0 - c:\Mantid\Code\Mantid\scripts\test\ - c:\Mantid\Code\Mantid\scripts\test\DirectEnergyConversionTest.py - c:\Mantid\Code\builds\br_master\bin\Release;c:\Mantid\Code\Mantid\scripts\Inelastic;c:\Mantid\Code\Third_Party\lib\win64 - c:\Mantid\Code\Mantid\scripts\Inelastic + c:\Mantid\scripts\test\ + c:\Mantid\scripts\test\DirectEnergyConversionTest.py + c:\Mantid\_builds\br_master\bin\Release;c:\Mantid\scripts\Inelastic;c:\Mantid\Third_Party\lib\win64 + c:\Mantid\scripts\Inelastic . 00000000-0000-0000-0000-000000000000 @@ -17,7 +17,7 @@ False Standard Python launcher - c:\programming\Python27\python.exe + c:\Mantid\_builds\br_master\bin\Release\python.exe False diff --git a/test_RunDescriptor/RunDescriptorTest.pyproj b/test_RunDescriptor/RunDescriptorTest.pyproj index 7ea1082..f68b69a 100644 --- a/test_RunDescriptor/RunDescriptorTest.pyproj +++ b/test_RunDescriptor/RunDescriptorTest.pyproj @@ -14,6 +14,9 @@ Standard Python launcher False False + c:\Mantid\_builds\br_master\bin\Release\Python.exe + {2af0f10d-7135-4994-9156-5d01c9c11b7e} + 2.7 true @@ -27,6 +30,9 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + + +