Skip to content

Commit

Permalink
Merge branch 'release_6.0.0' into 2D-Data-Processing-for-Pr
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-wilkins authored Oct 12, 2023
2 parents 8005823 + cee4343 commit a0a8c9a
Show file tree
Hide file tree
Showing 118 changed files with 796 additions and 2,417 deletions.
80 changes: 60 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@ jobs:

runs-on: ubuntu-latest

# Stop existing workflows for matching branches and pull requests
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

outputs:
matrix-json: ${{ steps.set-matrix.outputs.matrix }}

steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- uses: actions/checkout@v3
- id: set-matrix
Expand Down Expand Up @@ -195,7 +200,7 @@ jobs:
- name: Install utilities to build installer
if: ${{ matrix.installer }}
run: |
python -m pip install pyinstaller==5.7.0
python -m pip install pyinstaller==5.13.2
- name: Build sasview with pyinstaller
if: ${{ matrix.installer }}
Expand All @@ -221,13 +226,13 @@ jobs:
if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }}
run: |
cd installers/dist
hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO
hdiutil create SasView6.dmg -srcfolder SasView6.app -ov -format UDZO
- name: Build sasview installer tarball (Linux)
if: ${{ matrix.installer && startsWith(matrix.os, 'ubuntu') }}
run: |
cd installers/dist
tar zcf sasview5.tar.gz sasview
tar zcf sasview6.tar.gz sasview
- name: Collect a debug tarball of the installer package
if: ${{ matrix.installer }}
Expand All @@ -238,13 +243,6 @@ jobs:
installers/dist/sasview-pyinstaller-dist.tar.gz
if-no-files-found: ignore

- name: Fix qt folders (OSX)
if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }}
run: |
cd installers/dist
python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app
#hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO
- name: Sign executable and create dmg (OSX)
if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }}
env:
Expand All @@ -259,31 +257,73 @@ jobs:
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain
cd installers/dist
python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app
python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView6.app
python ../../build_tools/code_sign_osx.py
codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app
hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO
codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.dmg
codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView6.app
hdiutil create SasView6.dmg -srcfolder SasView6.app -ov -format UDZO
codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView6.dmg
- name: Notarize Release Build (OSX)
if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }}
uses: GuillaumeFalourd/xcode-notarize@v1
with:
product-path: "installers/dist/SasView6.dmg"
primary-bundle-id: "org.sasview.SasView6"
appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }}
verbose: True

- name: Staple Release Build (OSX)
if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }}
uses: BoundfoxStudios/action-xcode-staple@v1
with:
product-path: "installers/dist/SasView6.dmg"

- name: Publish installer package
if: ${{ matrix.installer }}
uses: actions/upload-artifact@v3
with:
name: SasView-Installer-${{ matrix.os }}-${{ matrix.python-version }}
path: |
installers/dist/setupSasView.exe
installers/dist/SasView5.dmg
installers/dist/sasview5.tar.gz
installers/dist/SasView6.dmg
installers/dist/sasview6.tar.gz
if-no-files-found: error

- name: Rename artifacts (Windows)
if: ${{ matrix.installer && startsWith(matrix.os, 'windows') }}
run: |
mv installers/dist/setupSasView.exe installers/dist/setupSasView-6.0.0-alpha-Win64.exe
- name: Rename artifacts (MacOS)
if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }}
run: |
mv installers/dist/SasView6.dmg installers/dist/SasView-6.0.0-alpha-MacOSX.dmg
- name: Rename artifacts (Linux)
if: ${{ matrix.installer && startsWith(matrix.os, 'ubuntu') }}
run: |
mv installers/dist/sasview6.tar.gz installers/dist/SasView-6.0.0-alpha-Linux.tar.gz
- name: Upload Release Installer to GitHub
uses: ncipollo/release-action@v1
with:
draft: false
prerelease: true
allowUpdates: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "installers/dist/setupSasView-6.0.0-alpha-Win64.exe, installers/dist/SasView-6.0.0-alpha-MacOSX.dmg, installers/dist/SasView-6.0.0-alpha-Linux.tar.gz"
name: "Release 6.0.0-alpha"
tag: "v6.0.0-alpha"

test-installer:
needs: [ build-matrix ]

strategy:
matrix:
os: [ windows-latest, ubuntu-20.04 ]
python-version: [ 3.8 ]
python-version: [ 3.11 ]
fail-fast: false

name: Test installer
Expand Down Expand Up @@ -383,7 +423,7 @@ jobs:
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
# $INSTALL_PATH is already the base directory
tar xf "$DL_PATH/sasview5.tar.gz"
tar xf "$DL_PATH/sasview6.tar.gz"
- name: Check installation files
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# List of python versions to use for release builds
python_release_list = [
'3.8',
'3.11',
]

# List of python versions to use for tests
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Sign executable and create dmg (OSX)
if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }}
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p DloaAcYP build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p DloaAcYP build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k DloaAcYP build.keychain
cd installers/dist
python ../../build_tools/fix_qt_folder_names_for_codesign.py SasView5.app
python ../../build_tools/code_sign_osx.py
codesign --verify --options=runtime --entitlements ../../build_tools/entitlements.plist --timestamp --deep --verbose=4 --force --sign "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.app
hdiutil create SasView5.dmg -srcfolder SasView5.app -ov -format UDZO
codesign -s "Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)" SasView5.dmg
- name: Rename artifacts
run: |
mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe
Expand Down
8 changes: 4 additions & 4 deletions build_tools/code_sign_osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import subprocess
import itertools

so_list = glob.glob("SasView5.app/Contents/MacOS/**/*.so", recursive=True)
dylib_list = glob.glob("SasView5.app/Contents/MacOS/**/*.dylib", recursive=True)
so_list = glob.glob("SasView*.app/Contents/MacOS/**/*.so", recursive=True)
dylib_list = glob.glob("SasView*.app/Contents/MacOS/**/*.dylib", recursive=True)
dylib_list_resources = glob.glob(
"SasView5.app/Contents/Resources/.dylibs/*.dylib", recursive=True
"SasView*.app/Contents/Resources/.dylibs/*.dylib", recursive=True
)
zmq_dylib_list_resources = glob.glob(
"SasView5.app/Contents/Resources/zmq/.dylibs/*.dylib", recursive=True
"SasView*.app/Contents/Resources/zmq/.dylibs/*.dylib", recursive=True
)

sign_command = ['codesign', '--timestamp', '--options=runtime', '--verify', '--verbose=4', '--force',
Expand Down
9 changes: 4 additions & 5 deletions build_tools/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy<1.24
scipy==1.10.0
numpy
scipy
docutils
pytest
pytest_qt
Expand All @@ -10,7 +10,6 @@ h5py
sphinx
pyparsing
html5lib
reportlab==3.6.6
pybind11
appdirs
six
Expand All @@ -22,7 +21,7 @@ xhtml2pdf
pylint
periodictable
uncertainties
matplotlib~=3.5.2
matplotlib
lxml
pytools
cffi
Expand All @@ -33,7 +32,7 @@ bumps
html2text
jsonschema
pywin32; platform_system == "Windows"
PySide6==6.2.4
PySide6==6.4.3
twisted
zope
superqt
Expand Down
1 change: 1 addition & 0 deletions docs/sphinx-docs/source/dev/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Contents
SasView API <sasview-api/modules>
sasmodels overview <sasmodels-dev/index>
sasmodels API <sasmodels-api/modules>
OpenGL subsystem <gl/opengl.rst>

Indices and Search
------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx-docs/source/dev/gl/opengl.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Open GL Subsystem
==============
=================

The SasView openGL subsystem is quite minimal, and works in the standard way though a scenegraph

Expand All @@ -8,6 +8,6 @@ a way of checking the rendering, and catalogue the available functions


Class Hierarchy
===============
^^^^^^^^^^^^^^^

TODO - data currently in PR.
2 changes: 2 additions & 0 deletions docs/sphinx-docs/source/user/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Tutorials

:download:`Simultaneous 1D Fitting in Sasview <sasview/simultaneous_1d_fitting_in_sasview_v5.pdf>`

:download:`Creating Custom Fitting Models in Sasview <sasview/creating_custom_fitting_models_in_sasview_v5.pdf>`

:download:`P(r) Inversion Analysis in Sasview <sasview/pr_inversion_analysis_in_sasview_v5.pdf>`

:download:`Correlation Function Analysis in SasView <sasview/correlation_function_analysis_in_sasview_v5.pdf>`
5 changes: 3 additions & 2 deletions installers/sasview.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ datas = [
('../src/sas/example_data', 'example_data'),
('../src/sas/qtgui/Utilities/Reports/report_style.css', 'sas/qtgui/Utilities/Reports'),
('../src/sas/qtgui/Perspectives/Fitting/plugin_models', 'plugin_models'),
('../src/sas/qtgui/Utilities/WhatsNew/messages', 'sas/qtgui/Utilities/WhatsNew/messages'),
('../src/sas/system/log.ini', 'sas/system/'),
('../../sasmodels/sasmodels','sasmodels'),
('../docs/sphinx-docs/build/html','doc')
Expand Down Expand Up @@ -131,7 +132,7 @@ coll = COLLECT(

if platform.system() == 'Darwin':
app = BUNDLE(coll,
name='SasView5.app',
name='SasView6.app',
icon='../src/sas/qtgui/images/ball.icns',
bundle_identifier='org.sasview.SasView5',
bundle_identifier='org.sasview.SasView6',
info_plist={'NSHighResolutionCapable': 'True'})
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pytest]
norecursedirs=test/sasrealspace test/calculatorview UnitTesting/SquishTestSuites
norecursedirs=test/sasrealspace test/calculatorview
addopts=--ignore test/utest_sasview.py
python_files='u*py' '*Test*py'
python_classes = *Test Test*
Expand Down
2 changes: 1 addition & 1 deletion src/sas/qtgui/Calculators/SlitSizeCalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def calculateSlitSize(self, data=None):
try:
xdata = data.x
ydata = data.y
if xdata == [] or xdata is None or ydata == [] or ydata is None:
if xdata.size == 0 or xdata is None or ydata.size == 0 or ydata is None:
msg = "The current data is empty please check x and y"
logging.error(msg)
return
Expand Down
6 changes: 3 additions & 3 deletions src/sas/qtgui/Calculators/UI/GenericScatteringCalculator.ui
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</widget>
</item>
<item row="0" column="9" rowspan="2" colspan="2">
<widget class="Line" name="line">
<widget class="Line" name="line1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
Expand Down Expand Up @@ -1791,7 +1791,7 @@ Number of Qbins &amp;isin; [2, 1000].</string>
</widget>
</item>
<item row="1" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox_7">
<widget class="QGroupBox" name="groupBox_8">
<property name="font">
<font>
<bold>false</bold>
Expand All @@ -1800,7 +1800,7 @@ Number of Qbins &amp;isin; [2, 1000].</string>
<property name="title">
<string>Sample Coordinates (xyz)</string>
</property>
<layout class="QGridLayout" name="gridLayout_14">
<layout class="QGridLayout" name="gridLayout_15">
<item row="0" column="0">
<widget class="QLabel" name="lblSampleYaw">
<property name="font">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,6 @@
<zorder>groupBox_3</zorder>
<zorder>graphicsView</zorder>
<zorder>line_4</zorder>
<zorder>verticalSpacer_2</zorder>
<zorder>line</zorder>
<zorder>line_2</zorder>
</widget>
Expand Down
5 changes: 3 additions & 2 deletions src/sas/qtgui/MainWindow/CategoryManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ def onSearch(self):
input_to_check = str(self.txtSearch.text())

# redefine the proxy model
self.model_proxy.filterRegularExpression = QtCore.QRegularExpression(input_to_check,
QtCore.Qt.CaseInsensitive, QtCore.QRegularExpression.FixedString)
self.model_proxy.setFilterRegularExpression(QtCore.QRegularExpression(input_to_check,
QtCore.QRegularExpression.CaseInsensitiveOption |
QtCore.QRegularExpression.PatternOption.NoPatternOption))

def onModify(self):
"""
Expand Down
Loading

0 comments on commit a0a8c9a

Please sign in to comment.