Changes in / [5dba493:158a0c7] in sasview


Ignore:
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r846a063 recbfddd  
    1010# Feel free to add more stuff to this as and when it becomes an issue. 
    1111 
     12# stack dumps due to Git Bash internal crashes 
     13*.stackdump 
     14 
    1215# Editor files 
     16*.pyproj 
    1317.DS_Store 
    1418/.settings 
     
    1721/.pydevproject 
    1822/.idea 
     23/.vs 
    1924 
    2025# Build and run files 
  • src/sas/qtgui/GUITests.py

    r57be490 rd0528c4  
    33from PyQt5 import QtGui 
    44from PyQt5 import QtWidgets 
     5 
     6""" 
     7Unit tests for the QT GUI 
     8========================= 
     9 
     10In order to run the tests, first install SasView and sasmodels to site-packages 
     11by running ``python setup.py install`` in both repositories. 
     12 
     13The tests can be run with ``python GUITests.py``, or to get more verbose 
     14console output (recommended), use ``python GUITests.py -v``. 
     15""" 
    516 
    617# Prepare the general QApplication instance 
  • src/sas/qtgui/MainWindow/DataExplorer.py

    rd9150d8 r6ff103a  
    496496        # Now query the model item for available plots 
    497497        plots = GuiUtils.plotsFromFilename(filename, model) 
    498         item = GuiUtils.itemFromFilename(filename, model) 
    499498 
    500499        new_plots = [] 
    501         for plot in plots: 
     500        for item, plot in plots.items(): 
    502501            plot_id = plot.id 
    503502            if plot_id in list(self.active_plots.keys()): 
  • src/sas/qtgui/Utilities/GuiUtils.py

    re20870bc r6ff103a  
    415415    assert isinstance(filename, str) 
    416416 
    417     plot_data = [] 
     417    plot_data = {} 
    418418    # Iterate over model looking for named items 
    419419    for index in range(model_item.rowCount()): 
     
    421421        if str(item.text()) == filename: 
    422422            # TODO: assure item type is correct (either data1/2D or Plotter) 
    423             plot_data.append(item.child(0).data()) 
     423            plot_data[item] = item.child(0).data() 
    424424            # Going 1 level deeper only 
    425425            for index_2 in range(item.rowCount()): 
     
    427427                if item_2 and item_2.isCheckable(): 
    428428                    # TODO: assure item type is correct (either data1/2D or Plotter) 
    429                     plot_data.append(item_2.child(0).data()) 
     429                    plot_data[item_2] = item_2.child(0).data() 
    430430 
    431431    return plot_data 
  • src/sas/qtgui/convertUI.py

    rc03692f r67642f7  
    1313    os.system(execute) 
    1414 
     15def file_in_newer(file_in, file_out): 
     16    """ 
     17    Check whether file_in is newer than file_out, if file_out exists. 
     18 
     19    Returns True if file_in is newer, or if file_out doesn't exist; False 
     20    otherwise. 
     21    """ 
     22    try: 
     23        out_stat = os.stat(file_out) 
     24    except OSError: 
     25        # file_out does not exist 
     26        return True 
     27 
     28    in_stat = os.stat(file_in) 
     29 
     30    # simple comparison of modification time 
     31    return in_stat.st_mtime >= out_stat.st_mtime 
     32 
    1533# look for .ui files 
    1634for root, dirs, files in os.walk("."): 
     
    1937            file_in = os.path.join(root, file) 
    2038            file_out = os.path.splitext(file_in)[0]+'.py' 
    21             pyuic(file_in, file_out) 
     39            if file_in_newer(file_in, file_out): 
     40                print("Generating " + file_out + " ...") 
     41                pyuic(file_in, file_out) 
    2242 
    2343# RC file in UI directory 
     
    2747out_file = 'main_resources_rc.py' 
    2848 
    29 pyrrc(os.path.join(ui_root, rc_file), os.path.join(ui_root, out_file)) 
     49in_file = os.path.join(ui_root, rc_file) 
     50out_file = os.path.join(ui_root, out_file) 
     51 
     52if file_in_newer(in_file, out_file): 
     53    print("Generating " + out_file + " ...") 
     54    pyrrc(in_file, out_file) 
    3055 
    3156# Images 
     
    3459rc_file = 'images.qrc' 
    3560out_file = 'images_rc.py' 
    36 pyrrc(os.path.join(images_root, rc_file), os.path.join(out_root, out_file)) 
     61 
     62in_file = os.path.join(images_root, rc_file) 
     63out_file = os.path.join(ui_root, out_file) 
     64 
     65if file_in_newer(in_file, out_file): 
     66    print("Generating " + out_file + " ...") 
     67    pyrrc(in_file, out_file) 
     68 
  • src/sas/sasview/__init__.py

    r6a88ad9 r18f11a6  
    1 __version__ = "4.1" 
     1__version__ = "5.0" 
    22__build__ = "GIT_COMMIT" 
Note: See TracChangeset for help on using the changeset viewer.