Changeset 3a39c2e in sasview
- Timestamp:
- Feb 13, 2015 3:53:03 AM (10 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 8c9ffde
- Parents:
- 79492222
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
build_tools/get_version.py
r5709051 r3a39c2e 15 15 return __revision__ 16 16 17 # Get the version number from the sa nsview module17 # Get the version number from the sasview module 18 18 # Check to see if we are dealing with a release 19 19 try: 20 import sa ns.sansview21 __version__ = sa ns.sansview.__version__22 __revision__ = sa ns.sansview.__build__20 import sas.sasview 21 __version__ = sas.sasview.__version__ 22 __revision__ = sas.sasview.__build__ 23 23 except: 24 print "Could not load sa nsview module"24 print "Could not load sasview module" 25 25 26 26 # Get actual revision number if possible -
build_tools/jenkins_linux_pylint.sh
r9939b16 r3a39c2e 14 14 rm -f test/*.txt 15 15 16 $PYLINT --rcfile "$WORKSPACE/build_tools/pylint.rc" -f parseable sasview-install/sasview.egg/sa ns sansview > test/sansview.txt || exit 016 $PYLINT --rcfile "$WORKSPACE/build_tools/pylint.rc" -f parseable sasview-install/sasview.egg/sas sasview > test/sasview.txt || exit 0 -
build_tools/jenkins_linux_test.sh
r21b7a49 r3a39c2e 12 12 export PYTHONPATH=$PYTHONPATH:$WORKSPACE/sasview-install:$WORKSPACE/utils 13 13 14 $PYTHON utest_sa nsview.py14 $PYTHON utest_sasview.py -
build_tools/jenkins_rhel6_build.sh
rb44da61 r3a39c2e 54 54 # Run tests 55 55 cd $WORKSPACE/test 56 python utest_sa nsview.py56 python utest_sasview.py 57 57 58 58 … … 66 66 cd ${WORKSPACE}/build_tools/rpm 67 67 python create_rpm_spec.py ${SVN_REVISION} 68 cp sa nsview.spec ${HOME}/rpmbuild/SPECS68 cp sasview.spec ${HOME}/rpmbuild/SPECS 69 69 70 70 cd ${HOME}/rpmbuild/SPECS 71 rpmbuild -bb sa nsview.spec --clean71 rpmbuild -bb sasview.spec --clean 72 72 cp ${HOME}/rpmbuild/RPMS/x86_64/* ${WORKSPACE}/dist 73 73 -
build_tools/jenkins_win32_build.bat
rb44da61 r3a39c2e 9 9 %PYTHON% check_packages.py 10 10 11 set PYTHONPATH=%WORKSPACE%\sa nsview-install;%PYTHONPATH%11 set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% 12 12 13 RD /S /Q sa nsview-install14 MD sa nsview-install13 RD /S /Q sasview-install 14 MD sasview-install 15 15 RD /S /Q dist 16 16 RD /S /Q build 17 17 18 rem %PYTHON% -m pip install -t ../sa nsview-install --no-deps bumps=0.7.5.419 rem PYTHON% -m pip install -t ../sa nsview-install --no-deps periodictable=1.3.020 rem %PYTHON% -m pip install -t ../sa nsview-install --no-deps pyparsing=1.5.518 rem %PYTHON% -m pip install -t ../sasview-install --no-deps bumps=0.7.5.4 19 rem PYTHON% -m pip install -t ../sasview-install --no-deps periodictable=1.3.0 20 rem %PYTHON% -m pip install -t ../sasview-install --no-deps pyparsing=1.5.5 21 21 22 22 %PYTHON% setup.py build -cmingw32 23 23 %PYTHON% setup.py bdist_egg --skip-build 24 24 cd dist 25 %EASY_INSTALL% -d ..\sa nsview-install sasview*.egg25 %EASY_INSTALL% -d ..\sasview-install sasview*.egg 26 26 27 27 cd %WORKSPACE%\test 28 %PYTHON% utest_sa nsview.py28 %PYTHON% utest_sasview.py -
build_tools/rpm/create_rpm_spec.py
rf6f0c7b r3a39c2e 29 29 return newline 30 30 31 input=open("sa nsview.spec.template",'r')32 output=open("sa nsview.spec",'w')31 input=open("sasview.spec.template",'r') 32 output=open("sasview.spec",'w') 33 33 34 34 buf = input.read() -
docs/sphinx-docs/build_sphinx.py
rf6b977c r3a39c2e 46 46 example: 47 47 48 sa ns/../[MODULE]/media/dir/A.rst49 sa ns/../[MODULE]/media/B.rst48 sas/../[MODULE]/media/dir/A.rst 49 sas/../[MODULE]/media/B.rst 50 50 51 51 gets copied to a new location: -
docs/sphinx-docs/source/conf.py
re27d71b r3a39c2e 79 79 # that we don't get various "ImportError: No module named ___" when 80 80 # running Sphinx. 81 exclude_patterns = ["*sa ns.perspectives.simulation.rst",82 "*sa ns.pr.c_extensions.rst",83 "*sa ns.realspace.rst",84 "*sa ns.simulation.rst",81 exclude_patterns = ["*sas.perspectives.simulation.rst", 82 "*sas.pr.c_extensions.rst", 83 "*sas.realspace.rst", 84 "*sas.simulation.rst", 85 85 "*park.fitmc.rst", 86 86 "*park.fitservice.rst", 87 87 "*park.parksnob.rst", 88 88 "*park.rangemap.rst", 89 "*sa ns.sansview.setup_exe.rst",90 "*sa ns.sansview.setup_mac.rst",91 "*sa ns.guiframe.custom_pstats.rst", # pstats not in standard library on Ubuntu out of the box89 "*sas.sasview.setup_exe.rst", 90 "*sas.sasview.setup_mac.rst", 91 "*sas.guiframe.custom_pstats.rst", # pstats not in standard library on Ubuntu out of the box 92 92 ] 93 93 -
run.py
r70a9d1c r3a39c2e 3 3 Run sasview in place. This allows sasview to use the python 4 4 files in the source tree without having to call setup.py install 5 first. A rebuild is still necessary when working on sa ns models5 first. A rebuild is still necessary when working on sas models 6 6 or c modules. 7 7 … … 105 105 addpath(joinpath(root, 'park-1.2.1')) 106 106 107 # Import the sa nsview package from root/sansview as sans.sansview. It would108 # be better to just store the package in src/sa ns/sansview.109 import sa ns110 sa ns.sansview = import_package('sans.sansview', joinpath(root,'sansview'))107 # Import the sasview package from root/sasview as sas.sasview. It would 108 # be better to just store the package in src/sas/sasview. 109 import sas 110 sas.sasview = import_package('sas.sasview', joinpath(root,'sasview')) 111 111 112 # The sa ns.models package Compiled Model files should be pulled in from the build directory even though113 # the source is stored in src/sa ns/models.112 # The sas.models package Compiled Model files should be pulled in from the build directory even though 113 # the source is stored in src/sas/models. 114 114 115 115 # Compiled modules need to be pulled from the build directory. 116 116 # Some packages are not where they are needed, so load them explicitly. 117 import sa ns.pr118 sa ns.pr.core = import_package('sans.pr.core',119 joinpath(build_path, 'sa ns', 'pr', 'core'))117 import sas.pr 118 sas.pr.core = import_package('sas.pr.core', 119 joinpath(build_path, 'sas', 'pr', 'core')) 120 120 #import_dll('park._modeling', build_path) 121 121 122 122 #park = import_package('park',os.path.join(build_path,'park')) 123 123 124 # Pull the entire sa ns.models package from the build directory since it contains124 # Pull the entire sas.models package from the build directory since it contains 125 125 # a mixture of autogenerated python and C. Any changes in models will require 126 126 # a rebuild with setup.py build 127 sa ns.models = import_package('sans.models', joinpath(build_path, 'sans', 'models'))127 sas.models = import_package('sas.models', joinpath(build_path, 'sas', 'models')) 128 128 129 129 sys.path.append(build_path) 130 130 131 131 #print "\n".join(sys.path) 132 #from sa ns.models import SphereModel132 #from sas.models import SphereModel 133 133 134 134 if __name__ == "__main__": 135 135 prepare() 136 from sa ns.sansview.sansview import run136 from sas.sasview.sasview import run 137 137 run() -
sasmodels/CMakeLists.txt
r79492222 r3a39c2e 1 # CMakeLists for SA NS models1 # CMakeLists for SAS models 2 2 cmake_minimum_required (VERSION 2.6) 3 project (Sa nsModels)3 project (SasModels) 4 4 5 5 # Version number 6 set (Sa nsModels_VERSION_MAJOR 1)7 set (Sa nsModels_VERSION_MAJOR 0)6 set (SasModels_VERSION_MAJOR 1) 7 set (SasModels_VERSION_MAJOR 0) 8 8 9 9 set (SRC_FILES … … 123 123 src/libigor/GaussWeights.h 124 124 src/libigor/libCylinder.h 125 src/libigor/libSA NSAnalysis.h125 src/libigor/libSASAnalysis.h 126 126 src/libigor/libSphere.h 127 127 src/libigor/libStructureFactor.h -
sasmodels/MANIFEST.IN
r79492222 r3a39c2e 1 1 2 graft src/sa ns/models/libigor3 graft src/sa ns/models/c_smearer4 graft src/sa ns/models/c_models5 graft src/sa ns/models/c_extensions6 recursive-include sa ns *.h7 recursive-include sa ns *.hh2 graft src/sas/models/libigor 3 graft src/sas/models/c_smearer 4 graft src/sas/models/c_models 5 graft src/sas/models/c_extensions 6 recursive-include sas *.h 7 recursive-include sas *.hh 8 8 include README.txt 9 9 include license.txt -
sasmodels/generate_cmake.py
r79492222 r3a39c2e 12 12 f = open("CMakeLists.txt", "w") 13 13 14 cmakelist = """# CMakeLists for SA NS models14 cmakelist = """# CMakeLists for SAS models 15 15 cmake_minimum_required (VERSION 2.6) 16 project (Sa nsModels)16 project (SasModels) 17 17 18 18 # Version number 19 set (Sa nsModels_VERSION_MAJOR 1)20 set (Sa nsModels_VERSION_MAJOR 0)19 set (SasModels_VERSION_MAJOR 1) 20 set (SasModels_VERSION_MAJOR 0) 21 21 22 22 set (SRC_FILES -
sasmodels/setup.py
r79492222 r3a39c2e 1 1 """ 2 Installation script for SA NS models2 Installation script for SAS models 3 3 """ 4 4 … … 14 14 15 15 # Manage version number ###################################### 16 sys.path.append(os.path.join("src", "sa ns"))16 sys.path.append(os.path.join("src", "sas")) 17 17 import models 18 18 VERSION = models.__version__ … … 66 66 from wrapping import generate_wrappers 67 67 generate_wrappers(header_dir=includedir, 68 output_dir=os.path.join("src", "sa ns", "models"),68 output_dir=os.path.join("src", "sas", "models"), 69 69 c_wrapper_dir=wrapper_dir) 70 70 … … 108 108 109 109 dist = setup( 110 name="sa nsmodels",110 name="sasmodels", 111 111 version = VERSION, 112 description = "Python module for SA NS scattering models",113 author = "SA NS/DANSE",112 description = "Python module for SAS scattering models", 113 author = "SAS/DANSE", 114 114 author_email = "sansdanse@gmail.gov", 115 115 url = "http://sansviewproject.svn.sourceforge.net", 116 116 117 # Place this module under the sa ns package118 #ext_package = "sa ns",117 # Place this module under the sas package 118 #ext_package = "sas", 119 119 120 120 # Use the pure python modules 121 package_dir = {"sa ns":os.path.join("src", "sans"),122 "sa ns.models":os.path.join("src", "sans", "models"),123 "sa ns.models.sans_extension":os.path.join("src", "sans", "models", "sans_extension"),121 package_dir = {"sas":os.path.join("src", "sas"), 122 "sas.models":os.path.join("src", "sas", "models"), 123 "sas.models.sas_extension":os.path.join("src", "sas", "models", "sas_extension"), 124 124 }, 125 package_data={'sa ns.models': [os.path.join('media', "*")]},126 packages = ["sa ns","sans.models",127 "sa ns.models.sans_extension",],125 package_data={'sas.models': [os.path.join('media', "*")]}, 126 packages = ["sas","sas.models", 127 "sas.models.sas_extension",], 128 128 129 129 ext_modules = [ 130 130 131 Extension("sa ns.models.sans_extension.c_models",131 Extension("sas.models.sas_extension.c_models", 132 132 sources=model_sources, 133 133 include_dirs=[igordir, includedir, c_model_dir, numpy_incl_path], … … 135 135 136 136 # Smearer extension 137 Extension("sa ns.models.sans_extension.smearer",137 Extension("sas.models.sas_extension.smearer", 138 138 sources = smearer_sources, 139 139 include_dirs=[igordir, smear_dir, numpy_incl_path], 140 140 ), 141 141 142 Extension("sa ns.models.sans_extension.smearer2d_helper",142 Extension("sas.models.sas_extension.smearer2d_helper", 143 143 sources = [os.path.join(smear_dir, 144 144 "smearer2d_helper_module.cpp"), -
sasview/installer.iss
r79492222 r3a39c2e 34 34 Root: HKCR; Subkey: ".abs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 35 35 Root: HKCR; Subkey: ".d1d\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 36 Root: HKCR; Subkey: ".sa ns\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror36 Root: HKCR; Subkey: ".sas\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 37 37 Root: HKCR; Subkey: ".nxs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 38 38 Root: HKCR; Subkey: "applications\SasView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SasView.exe"" ""%1"""; Flags: uninsdeletevalue noerror … … 44 44 Root: HKCU; Subkey: "Software\Classes\.abs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 45 45 Root: HKCU; Subkey: "Software\Classes\.d1d\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 46 Root: HKCU; Subkey: "Software\Classes\.sa ns\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror46 Root: HKCU; Subkey: "Software\Classes\.sas\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 47 47 Root: HKCU; Subkey: "Software\Classes\.nxs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror 48 48 Root: HKCU; Subkey: "Software\Classes\applications\SasView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SasView.exe"" ""%1"""; Flags: uninsdeletevalue noerror … … 54 54 Root: HKCR; Subkey: "{app}\SasView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SasView.exe"" ""%1"""; Flags: uninsdeletevalue noerror 55 55 Root: HKCR; Subkey: "{app}\images\ball.ico"; ValueType: string; ValueName: ""; ValueData: "{app}\SasView.exe,0"; Flags: uninsdeletevalue noerror 56 Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "SA NSVIEWPATH"; ValueData: "{app}"; Flags: uninsdeletevalue noerror56 Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "SASVIEWPATH"; ValueData: "{app}"; Flags: uninsdeletevalue noerror 57 57 ; Write to PATH (below) is disabled; need more tests 58 ;Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "PATH"; ValueData: "%SA NSVIEWPATH%;{olddata}"; Check: NeedsAddPath()58 ;Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "PATH"; ValueData: "%SASVIEWPATH%;{olddata}"; Check: NeedsAddPath() 59 59 60 60 … … 114 114 RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath) 115 115 oldpath := oldpath + ';'; 116 newpath := '%SA NSVIEWPATH%';116 newpath := '%SASVIEWPATH%'; 117 117 i := 0; 118 118 while (Pos(';', oldpath) > 0) do begin -
sasview/installer_generator.py
r79492222 r3a39c2e 45 45 46 46 #(ext, type, name, flags) 47 from sa ns.dataloader.loader import Loader47 from sas.dataloader.loader import Loader 48 48 wild_cards = Loader().get_wildcards() 49 49 for item in wild_cards: … … 145 145 146 146 147 #SA NSVIEWPATH147 #SASVIEWPATH 148 148 msg += """Root: HKLM; Subkey: "%s";\t""" % str('SYSTEM\CurrentControlSet\Control\Session Manager\Environment') 149 149 msg += """ValueType: %s; """ % str('expandsz') 150 msg += """ValueName: "%s";\t""" % str('SA NSVIEWPATH')150 msg += """ValueName: "%s";\t""" % str('SASVIEWPATH') 151 151 msg += """ValueData: "{app}";\t""" 152 152 msg += """ Flags: %s""" % str('uninsdeletevalue noerror') … … 158 158 msg += """ValueType: %s; """ % str('expandsz') 159 159 msg += """ValueName: "%s";\t""" % str('PATH') 160 msg += """ValueData: "%s;{olddata}";\t""" % str('%SA NSVIEWPATH%')160 msg += """ValueData: "%s;{olddata}";\t""" % str('%SASVIEWPATH%') 161 161 msg += """ Check: %s""" % str('NeedsAddPath()') 162 162 msg += "\n" … … 280 280 msg += """'PATH', oldpath)\n""" 281 281 msg += """ oldpath := oldpath + ';';\n""" 282 msg += """ newpath := '%SA NSVIEWPATH%';\n"""282 msg += """ newpath := '%SASVIEWPATH%';\n""" 283 283 msg += """ i := 0;\n""" 284 284 msg += """ while (Pos(';', oldpath) > 0) do begin\n""" -
sasview/local_config.py
r79492222 r3a39c2e 4 4 import time 5 5 import os 6 from sa ns.guiframe.gui_style import GUIFRAME7 import sa ns.sansview6 from sas.guiframe.gui_style import GUIFRAME 7 import sas.sasview 8 8 import logging 9 9 10 10 # Version of the application 11 11 __appname__ = "SasView" 12 __version__ = sa ns.sansview.__version__13 __build__ = sa ns.sansview.__build__12 __version__ = sas.sasview.__version__ 13 __build__ = sas.sasview.__build__ 14 14 __download_page__ = 'http://sourceforge.net/projects/sasview/files/' 15 15 __update_URL__ = ['svn.code.sf.net', 16 '/p/sasview/code/trunk/sa nsview.latestversion']16 '/p/sasview/code/trunk/sasview.latestversion'] 17 17 18 18 -
sasview/sasview.py
r79492222 r3a39c2e 46 46 reload(sys) 47 47 sys.setdefaultencoding("iso-8859-1") 48 from sa ns.guiframe import gui_manager49 from sa ns.guiframe.gui_style import GUIFRAME48 from sas.guiframe import gui_manager 49 from sas.guiframe.gui_style import GUIFRAME 50 50 from welcome_panel import WelcomePanel 51 51 # For py2exe, import config here … … 78 78 # Fitting perspective 79 79 try: 80 import sa ns.perspectives.fitting as module80 import sas.perspectives.fitting as module 81 81 fitting_plug = module.Plugin() 82 82 self.gui.add_perspective(fitting_plug) … … 88 88 # P(r) perspective 89 89 try: 90 import sa ns.perspectives.pr as module90 import sas.perspectives.pr as module 91 91 pr_plug = module.Plugin(standalone=False) 92 92 self.gui.add_perspective(pr_plug) … … 97 97 #Invariant perspective 98 98 try: 99 import sa ns.perspectives.invariant as module99 import sas.perspectives.invariant as module 100 100 invariant_plug = module.Plugin(standalone=False) 101 101 self.gui.add_perspective(invariant_plug) … … 108 108 #Calculator perspective 109 109 try: 110 import sa ns.perspectives.calculator as module110 import sas.perspectives.calculator as module 111 111 calculator_plug = module.Plugin(standalone=False) 112 112 self.gui.add_perspective(calculator_plug) -
sasview/setup_exe.py
r79492222 r3a39c2e 19 19 # put the build directory at the front of the path 20 20 if os.path.abspath(os.path.dirname(__file__)) != os.path.abspath(os.getcwd()): 21 raise RuntimeError("Must run setup_exe from the sa nsview directory")21 raise RuntimeError("Must run setup_exe from the sasview directory") 22 22 from distutils.util import get_platform 23 23 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) … … 239 239 data_files += periodictable.data_files() 240 240 241 import sa ns.perspectives.fitting as fitting241 import sas.perspectives.fitting as fitting 242 242 data_files += fitting.data_files() 243 243 244 import sa ns.perspectives.calculator as calculator244 import sas.perspectives.calculator as calculator 245 245 data_files += calculator.data_files() 246 246 247 import sa ns.perspectives.invariant as invariant247 import sas.perspectives.invariant as invariant 248 248 data_files += invariant.data_files() 249 249 250 import sa ns.guiframe as guiframe250 import sas.guiframe as guiframe 251 251 data_files += guiframe.data_files() 252 252 253 import sa ns.models as models253 import sas.models as models 254 254 data_files += models.data_files() 255 255 … … 258 258 data_files.append((os.path.split(dirname)[0], [f])) 259 259 260 # Copy the settings file for the sa ns.dataloader file extension associations261 import sa ns.dataloader.readers262 f = os.path.join(sa ns.dataloader.readers.get_data_path(),'defaults.xml')260 # Copy the settings file for the sas.dataloader file extension associations 261 import sas.dataloader.readers 262 f = os.path.join(sas.dataloader.readers.get_data_path(),'defaults.xml') 263 263 if os.path.isfile(f): 264 264 data_files.append(('.', [f])) … … 345 345 target_wx_client = Target( 346 346 description = 'SasView', 347 script = 'sa nsview.py',347 script = 'sasview.py', 348 348 icon_resources = [(1, os.path.join(images_dir, "ball.ico"))], 349 349 other_resources = [(24,1,manifest)], … … 357 357 gen.generate_installer() 358 358 #initialize category stuff 359 #from sa ns.guiframe.CategoryInstaller import CategoryInstaller359 #from sas.guiframe.CategoryInstaller import CategoryInstaller 360 360 #CategoryInstaller.check_install() 361 361 -
sasview/setup_mac.py
r79492222 r3a39c2e 13 13 from setuptools import setup 14 14 import periodictable.xsf 15 import sa ns.dataloader.readers15 import sas.dataloader.readers 16 16 import os 17 17 import string … … 29 29 DATA_FILES = periodictable.data_files() 30 30 #invariant and calculator help doc 31 import sa ns.perspectives.fitting as fitting31 import sas.perspectives.fitting as fitting 32 32 DATA_FILES += fitting.data_files() 33 import sa ns.perspectives.calculator as calculator33 import sas.perspectives.calculator as calculator 34 34 DATA_FILES += calculator.data_files() 35 import sa ns.perspectives.invariant as invariant35 import sas.perspectives.invariant as invariant 36 36 DATA_FILES += invariant.data_files() 37 import sa ns.models as models37 import sas.models as models 38 38 DATA_FILES += models.data_files() 39 import sa ns.guiframe as guiframe39 import sas.guiframe as guiframe 40 40 DATA_FILES += guiframe.data_files() 41 41 42 42 #CANSAxml reader data files 43 RESOURCES_FILES.append(os.path.join(sa ns.dataloader.readers.get_data_path(),'defaults.xml'))43 RESOURCES_FILES.append(os.path.join(sas.dataloader.readers.get_data_path(),'defaults.xml')) 44 44 45 45 # Locate libxml2 library … … 53 53 raise RuntimeError, "Could not find libxml2 on the system" 54 54 55 APP = ['sa nsview.py']55 APP = ['sasview.py'] 56 56 DATA_FILES += ['images','test','media', 'custom_config.py', 'local_config.py', 57 57 'default_categories.json'] … … 67 67 list = [] 68 68 EXCEPTION_LIST = ['*', '.', ''] 69 from sa ns.dataloader.loader import Loader69 from sas.dataloader.loader import Loader 70 70 wild_cards = Loader().get_wildcards() 71 71 for item in wild_cards: … … 100 100 CFBundleTypeRole="Shell" )],) 101 101 102 APP = ['sa nsview.py']102 APP = ['sasview.py'] 103 103 DATA_FILES += ['images','test','media'] 104 104 -
sasview/welcome_panel.py
r79492222 r3a39c2e 10 10 import local_config as config 11 11 from wx.lib.scrolledpanel import ScrolledPanel 12 from sa ns.guiframe.panel_base import PanelBase12 from sas.guiframe.panel_base import PanelBase 13 13 #Font size width 14 14 if sys.platform.count("win32")>0: -
setup.py
r5972029 r3a39c2e 26 26 27 27 # Manage version number ###################################### 28 import sa nsview29 VERSION = sa nsview.__version__28 import sasview 29 VERSION = sasview.__version__ 30 30 ############################################################## 31 31 … … 36 36 37 37 # Remove all files that should be updated by this setup 38 # We do this here because application updates these files from .sa nsview38 # We do this here because application updates these files from .sasview 39 39 # except when there is no such file 40 40 # Todo : make this list generic … … 45 45 'sum_Ap1_1_Ap2.pyc', 'sum_p1_p2.pyc', 46 46 'testmodel_2.pyc', 'testmodel.pyc', 'plugins.log'] 47 sa ns_dir = os.path.join(os.path.expanduser("~"),'.sasview')48 if os.path.isdir(sa ns_dir):49 f_path = os.path.join(sa ns_dir, "sasview.log")47 sas_dir = os.path.join(os.path.expanduser("~"),'.sasview') 48 if os.path.isdir(sas_dir): 49 f_path = os.path.join(sas_dir, "sasview.log") 50 50 if os.path.isfile(f_path): 51 51 os.remove(f_path) 52 f_path = os.path.join(sa ns_dir, "serialized_cat.json")52 f_path = os.path.join(sas_dir, "serialized_cat.json") 53 53 if os.path.isfile(f_path): 54 54 os.remove(f_path) 55 f_path = os.path.join(sa ns_dir, 'config', "custom_config.py")55 f_path = os.path.join(sas_dir, 'config', "custom_config.py") 56 56 if os.path.isfile(f_path): 57 57 os.remove(f_path) 58 f_path = os.path.join(sa ns_dir, 'plugin_models')58 f_path = os.path.join(sas_dir, 'plugin_models') 59 59 if os.path.isdir(f_path): 60 60 for f in os.listdir(f_path): … … 164 164 build_sphinx.build() 165 165 166 # sa ns module167 package_dir["sa ns"] = os.path.join("src", "sans")168 packages.append("sa ns")169 170 # sa ns.invariant171 package_dir["sa ns.invariant"] = os.path.join("src", "sans", "invariant")172 packages.extend(["sa ns.invariant"])173 174 # sa ns.guiframe175 guiframe_path = os.path.join("src", "sa ns", "guiframe")176 package_dir["sa ns.guiframe"] = guiframe_path177 package_dir["sa ns.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives"))178 package_data["sa ns.guiframe"] = ['images/*', 'media/*']179 packages.extend(["sa ns.guiframe", "sans.guiframe.local_perspectives"])166 # sas module 167 package_dir["sas"] = os.path.join("src", "sas") 168 packages.append("sas") 169 170 # sas.invariant 171 package_dir["sas.invariant"] = os.path.join("src", "sas", "invariant") 172 packages.extend(["sas.invariant"]) 173 174 # sas.guiframe 175 guiframe_path = os.path.join("src", "sas", "guiframe") 176 package_dir["sas.guiframe"] = guiframe_path 177 package_dir["sas.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives")) 178 package_data["sas.guiframe"] = ['images/*', 'media/*'] 179 packages.extend(["sas.guiframe", "sas.guiframe.local_perspectives"]) 180 180 # build local plugin 181 181 for d in os.listdir(os.path.join(guiframe_path, "local_perspectives")): 182 182 if d not in ['.svn','__init__.py', '__init__.pyc']: 183 package_name = "sa ns.guiframe.local_perspectives." + d183 package_name = "sas.guiframe.local_perspectives." + d 184 184 packages.append(package_name) 185 185 package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d) 186 186 187 # sa ns.dataloader188 package_dir["sa ns.dataloader"] = os.path.join("src", "sans", "dataloader")189 package_data["sa ns.dataloader.readers"] = ['defaults.xml','schema/*.xsd']190 packages.extend(["sa ns.dataloader","sans.dataloader.readers","sans.dataloader.readers.schema"])191 192 # sa ns.calculator193 package_dir["sa ns.calculator"] =os.path.join("src", "sans", "calculator")194 packages.extend(["sa ns.calculator"])187 # sas.dataloader 188 package_dir["sas.dataloader"] = os.path.join("src", "sas", "dataloader") 189 package_data["sas.dataloader.readers"] = ['defaults.xml','schema/*.xsd'] 190 packages.extend(["sas.dataloader","sas.dataloader.readers","sas.dataloader.readers.schema"]) 191 192 # sas.calculator 193 package_dir["sas.calculator"] =os.path.join("src", "sas", "calculator") 194 packages.extend(["sas.calculator"]) 195 195 196 # sa ns.pr196 # sas.pr 197 197 numpy_incl_path = os.path.join(NUMPY_INC, "numpy") 198 srcdir = os.path.join("src", "sa ns", "pr", "c_extensions")199 package_dir["sa ns.pr.core"] = srcdir200 package_dir["sa ns.pr"] = os.path.join("src","sans", "pr")201 packages.extend(["sa ns.pr","sans.pr.core"])202 ext_modules.append( Extension("sa ns.pr.core.pr_inversion",198 srcdir = os.path.join("src", "sas", "pr", "c_extensions") 199 package_dir["sas.pr.core"] = srcdir 200 package_dir["sas.pr"] = os.path.join("src","sas", "pr") 201 packages.extend(["sas.pr","sas.pr.core"]) 202 ext_modules.append( Extension("sas.pr.core.pr_inversion", 203 203 sources = [os.path.join(srcdir, "Cinvertor.c"), 204 204 os.path.join(srcdir, "invertor.c"), … … 207 207 ) ) 208 208 209 # sa ns.fit (park integration)210 package_dir["sa ns.fit"] = os.path.join("src", "sans", "fit")211 packages.append("sa ns.fit")209 # sas.fit (park integration) 210 package_dir["sas.fit"] = os.path.join("src", "sas", "fit") 211 packages.append("sas.fit") 212 212 213 213 # Perspectives 214 package_dir["sa ns.perspectives"] = os.path.join("src", "sans", "perspectives")215 package_dir["sa ns.perspectives.pr"] = os.path.join("src", "sans", "perspectives", "pr")216 packages.extend(["sa ns.perspectives","sans.perspectives.pr"])217 package_data["sa ns.perspectives.pr"] = ['images/*']218 219 package_dir["sa ns.perspectives.invariant"] = os.path.join("src", "sans", "perspectives", "invariant")220 packages.extend(["sa ns.perspectives.invariant"])221 package_data['sa ns.perspectives.invariant'] = [os.path.join("media",'*')]222 223 package_dir["sa ns.perspectives.fitting"] = os.path.join("src", "sans", "perspectives", "fitting")224 package_dir["sa ns.perspectives.fitting.plugin_models"] = os.path.join("src", "sans", "perspectives", "fitting", "plugin_models")225 packages.extend(["sa ns.perspectives.fitting",226 "sa ns.perspectives.fitting.plugin_models"])227 package_data['sa ns.perspectives.fitting'] = ['media/*','plugin_models/*']228 229 packages.extend(["sa ns.perspectives", "sans.perspectives.calculator"])230 package_data['sa ns.perspectives.calculator'] = ['images/*', 'media/*']214 package_dir["sas.perspectives"] = os.path.join("src", "sas", "perspectives") 215 package_dir["sas.perspectives.pr"] = os.path.join("src", "sas", "perspectives", "pr") 216 packages.extend(["sas.perspectives","sas.perspectives.pr"]) 217 package_data["sas.perspectives.pr"] = ['images/*'] 218 219 package_dir["sas.perspectives.invariant"] = os.path.join("src", "sas", "perspectives", "invariant") 220 packages.extend(["sas.perspectives.invariant"]) 221 package_data['sas.perspectives.invariant'] = [os.path.join("media",'*')] 222 223 package_dir["sas.perspectives.fitting"] = os.path.join("src", "sas", "perspectives", "fitting") 224 package_dir["sas.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "perspectives", "fitting", "plugin_models") 225 packages.extend(["sas.perspectives.fitting", 226 "sas.perspectives.fitting.plugin_models"]) 227 package_data['sas.perspectives.fitting'] = ['media/*','plugin_models/*'] 228 229 packages.extend(["sas.perspectives", "sas.perspectives.calculator"]) 230 package_data['sas.perspectives.calculator'] = ['images/*', 'media/*'] 231 231 232 232 # Data util 233 package_dir["data_util"] = os.path.join("src", "sa ns", "data_util")234 packages.append("sa ns.data_util")233 package_dir["data_util"] = os.path.join("src", "sas", "data_util") 234 packages.append("sas.data_util") 235 235 236 236 # Plottools 237 package_dir["sa ns.plottools"] = os.path.join("src", "sans", "plottools")238 packages.append("sa ns.plottools")237 package_dir["sas.plottools"] = os.path.join("src", "sas", "plottools") 238 packages.append("sas.plottools") 239 239 240 240 # Park 1.2.1 … … 250 250 ) ) 251 251 252 # Sans models253 includedir = os.path.join("src", "sa ns", "models", "include")254 igordir = os.path.join("src", "sa ns", "models", "c_extension", "libigor")255 cephes_dir = os.path.join("src", "sa ns", "models", "c_extension", "cephes")256 c_model_dir = os.path.join("src", "sa ns", "models", "c_extension", "c_models")257 smear_dir = os.path.join("src", "sa ns", "models", "c_extension", "c_smearer")258 gen_dir = os.path.join("src", "sa ns", "models", "c_extension", "c_gen")259 wrapper_dir = os.path.join("src", "sa ns", "models", "c_extension", "python_wrapper", "generated")260 model_dir = os.path.join("src", "sa ns","models")252 # sas models 253 includedir = os.path.join("src", "sas", "models", "include") 254 igordir = os.path.join("src", "sas", "models", "c_extension", "libigor") 255 cephes_dir = os.path.join("src", "sas", "models", "c_extension", "cephes") 256 c_model_dir = os.path.join("src", "sas", "models", "c_extension", "c_models") 257 smear_dir = os.path.join("src", "sas", "models", "c_extension", "c_smearer") 258 gen_dir = os.path.join("src", "sas", "models", "c_extension", "c_gen") 259 wrapper_dir = os.path.join("src", "sas", "models", "c_extension", "python_wrapper", "generated") 260 model_dir = os.path.join("src", "sas","models") 261 261 262 262 if os.path.isdir(wrapper_dir): … … 266 266 else: 267 267 os.makedirs(wrapper_dir) 268 sys.path.append(os.path.join("src", "sa ns", "models", "c_extension", "python_wrapper"))268 sys.path.append(os.path.join("src", "sas", "models", "c_extension", "python_wrapper")) 269 269 from wrapping import generate_wrappers 270 270 generate_wrappers(header_dir = includedir, … … 305 305 append_file(file_list=smear_sources, dir_path=smear_dir) 306 306 307 package_dir["sa ns.models"] = model_dir308 package_dir["sa ns.models.sans_extension"] = os.path.join("src", "sans", "models", "sans_extension")309 package_data['sa ns.models'] = [os.path.join('media', "*.*")]310 package_data['sa ns.models'] += [os.path.join('media','img', "*.*")]311 packages.extend(["sa ns.models","sans.models.sans_extension"])307 package_dir["sas.models"] = model_dir 308 package_dir["sas.models.sas_extension"] = os.path.join("src", "sas", "models", "sas_extension") 309 package_data['sas.models'] = [os.path.join('media', "*.*")] 310 package_data['sas.models'] += [os.path.join('media','img', "*.*")] 311 packages.extend(["sas.models","sas.models.sas_extension"]) 312 312 313 313 smearer_sources = [os.path.join(smear_dir, "smearer.cpp"), … … 319 319 320 320 c_models = [ 321 Extension("sa ns.models.sans_extension.c_models",321 Extension("sas.models.sas_extension.c_models", 322 322 sources=model_sources, 323 323 include_dirs=[ … … 327 327 328 328 # Smearer extension 329 Extension("sa ns.models.sans_extension.smearer",329 Extension("sas.models.sas_extension.smearer", 330 330 sources = smearer_sources, 331 331 include_dirs=[igordir, smear_dir, numpy_incl_path], 332 332 ), 333 333 334 Extension("sa ns.models.sans_extension.smearer2d_helper",334 Extension("sas.models.sas_extension.smearer2d_helper", 335 335 sources = [ 336 336 os.path.join(smear_dir, "smearer2d_helper_module.cpp"), … … 340 340 ), 341 341 342 Extension("sa ns.models.sans_extension.sld2i",342 Extension("sas.models.sas_extension.sld2i", 343 343 sources = [ 344 344 os.path.join(gen_dir, "sld2i_module.cpp"), … … 356 356 # SasView 357 357 358 package_dir["sa ns.sansview"] = "sansview"359 package_data['sa ns.sansview'] = ['images/*', 'media/*', 'test/*',358 package_dir["sas.sasview"] = "sasview" 359 package_data['sas.sasview'] = ['images/*', 'media/*', 'test/*', 360 360 'default_categories.json'] 361 packages.append("sa ns.sansview")361 packages.append("sas.sasview") 362 362 363 363 required = [ … … 397 397 entry_points = { 398 398 'console_scripts':[ 399 "sasview = sa ns.sansview.sansview:run",399 "sasview = sas.sasview.sasview:run", 400 400 ] 401 401 }, -
src/examples/test_chisq_panel.py
rf468791 r3a39c2e 27 27 28 28 import wx 29 from sa ns.plottools.PlotPanel import PlotPanel30 from sa ns.plottools.plottables import Plottable, Graph, Data1D, Theory1D29 from sas.plottools.PlotPanel import PlotPanel 30 from sas.plottools.plottables import Plottable, Graph, Data1D, Theory1D 31 31 import sys 32 32 import numpy … … 86 86 dy = numpy.sqrt(100*numpy.abs(y))/100 87 87 88 from sa ns.plottools.plottables import Data1D, Theory1D, Chisq , Graph88 from sas.plottools.plottables import Data1D, Theory1D, Chisq , Graph 89 89 data = Data1D(x,y,dy=dy) 90 90 data.xaxis('distance', 'm') -
src/examples/test_copy_print.py
rf468791 r3a39c2e 26 26 27 27 import wx 28 from sa ns.plottools.PlotPanel import PlotPanel29 from sa ns.plottools.plottables import Graph, Data1D, Theory1D28 from sas.plottools.PlotPanel import PlotPanel 29 from sas.plottools.plottables import Graph, Data1D, Theory1D 30 30 import sys 31 31 sys.platform = 'win95' -
src/examples/test_panel.py
rf468791 r3a39c2e 1 1 """ 2 2 Test application that uses plottools 3 This application uses most of the functionality required by the SA NS group3 This application uses most of the functionality required by the SAS group 4 4 and should be treated as a test-case representative of that use. 5 5 … … 37 37 """ 38 38 import wx 39 from sa ns.plottools.PlotPanel import PlotPanel40 from sa ns.plottools.plottables import Data1D39 from sas.plottools.PlotPanel import PlotPanel 40 from sas.plottools.plottables import Data1D 41 41 import sys 42 42 import numpy … … 44 44 45 45 46 class SA NSplotpanel(PlotPanel):46 class SASplotpanel(PlotPanel): 47 47 48 48 def __init__(self, parent, id = -1, color = None,\ … … 94 94 95 95 # Panel for 1D plot 96 self.plotpanel = SA NSplotpanel(self, -1, style=wx.RAISED_BORDER)96 self.plotpanel = SASplotpanel(self, -1, style=wx.RAISED_BORDER) 97 97 98 98 # Set up the menu -
src/examples/test_panel2D.py
rf468791 r3a39c2e 1 1 """ 2 2 Test application that uses plottools 3 This application uses most of the functionality required by the SA NS group3 This application uses most of the functionality required by the SAS group 4 4 and should be treated as a test-case representative of that use. 5 5 … … 37 37 """ 38 38 import wx 39 from sa ns.plottools.PlotPanel import PlotPanel40 from sa ns.plottools.plottables import Data1D, Theory1D, Data2D39 from sas.plottools.PlotPanel import PlotPanel 40 from sas.plottools.plottables import Data1D, Theory1D, Data2D 41 41 import sys,os 42 42 import numpy … … 44 44 45 45 46 class SA NSplotpanel(PlotPanel):46 class SASplotpanel(PlotPanel): 47 47 48 48 def __init__(self, parent, id = -1, color = None,\ … … 136 136 137 137 # Panel for 1D plot 138 self.plotpanel = SA NSplotpanel(self, -1, style=wx.RAISED_BORDER)138 self.plotpanel = SASplotpanel(self, -1, style=wx.RAISED_BORDER) 139 139 140 140 # Set up the menu … … 200 200 path = dlg.GetPath() 201 201 mypath = os.path.basename(path) 202 from sa ns.dataloader.loader import Loader202 from sas.dataloader.loader import Loader 203 203 204 204 #Instantiate a loader -
src/examples/test_text_panel.py
rf468791 r3a39c2e 27 27 28 28 import wx 29 from sa ns.plottools.PlotPanel import PlotPanel30 from sa ns.plottools.plottables import Text, Graph29 from sas.plottools.PlotPanel import PlotPanel 30 from sas.plottools.plottables import Text, Graph 31 31 32 32 class TestPlotPanel(PlotPanel):
Note: See TracChangeset
for help on using the changeset viewer.