Skip to content

Commit

Permalink
Merge branch 'main' into 2D-Data-Processing-for-Pr-rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-wilkins authored Jan 8, 2025
2 parents 75b4448 + b9d1f26 commit baa871b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 39 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
run: |
git clone --depth=50 --branch=master https://github.com/SasView/sasdata.git ../sasdata
git clone --depth=50 --branch=master https://github.com/SasView/sasmodels.git ../sasmodels
git clone --depth=50 --branch=master https://github.com/bumps/bumps.git ../bumps
git clone --depth=50 --branch=v0.9.3 https://github.com/bumps/bumps.git ../bumps
- name: Build and install sasdata
run: |
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
primary-bundle-id: "org.sasview.SasView6"
appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }}
appstore-connect-team-id: W2AG9MPZ43
appstore-connect-team-id: 8CX8K63BQM
verbose: True

- name: Staple Release Build (OSX)
Expand Down Expand Up @@ -297,35 +297,6 @@ jobs:
installers/dist/sasview6.tar.gz
if-no-files-found: ignore

- 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
if: ${{ matrix.installer }}
uses: ncipollo/release-action@v1
with:
draft: false
prerelease: true
allowUpdates: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "installers/dist/*SasView-6.0.0-*"
name: "Release 6.0.0-alpha"
bodyFile: "build_tools/release_notes/6.0.0_notes.txt"
tag: "v6.0.0-alpha"

test-installer:
needs: [ build-matrix ]

Expand Down
8 changes: 4 additions & 4 deletions build_tools/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Alphabetized list of OS and version agnostic dependencies
appdirs
bumps
cffi
docutils
dominate
Expand All @@ -14,16 +13,19 @@ lxml
mako
matplotlib
numba
numpy
periodictable
pybind11
pylint
pyopengl
pyparsing
PySide6
pytest
pytest_qt
pytest-mock
pytools
qtconsole
scipy
six
sphinx
superqt
Expand All @@ -38,6 +40,4 @@ zope
pywin32; platform_system == "Windows"

# Alphabetized list of version-pinned packages
numpy==1.26.4 # 2.0.0 deprecates many functions used in the codebase (and potentially in dependencies)
PySide6==6.4.3 # Later versions do not mesh well with pyinstaller < 6.0
scipy==1.13.1 # 1.14 deprecates some functions used in the codebase (and potentially in dependencies)
bumps==0.* # v1.+ is very experimental
15 changes: 11 additions & 4 deletions src/sas/sascalc/fit/BumpsFitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,14 @@ def fit(self, msg_q=None,
# Check if uncertainty is missing for any parameter
uncertainty_warning = False

for fitness in problem.models:
for fitting_module in problem.models:
# CRUFT: This makes BumpsFitting compatible with bumps v0.9 and v1.0
if isinstance(fitting_module, SasFitness):
# Bumps v1.x+ - A Fitness object is returned
fitness = fitting_module
else:
# Bumps v0.x - A module is returned that holds the Fitness object
fitness = fitting_module.fitness
pars = fitness.fitted_pars + fitness.computed_pars
par_names = fitness.fitted_par_names + fitness.computed_par_names

Expand Down Expand Up @@ -346,8 +353,8 @@ def fit(self, msg_q=None,

# TODO: Let the GUI decided how to handle success/failure.
if not fitting_result.success:
fitting_result.stderr[:] = np.NaN
fitting_result.fitness = np.NaN
fitting_result.stderr[:] = np.nan
fitting_result.fitness = np.nan

all_results.append(fitting_result)

Expand Down Expand Up @@ -398,7 +405,7 @@ def abort_test():
try:
best, fbest = fitdriver.fit()
except Exception as exc:
best, fbest = None, np.NaN
best, fbest = None, np.nan
errors.extend([str(exc), traceback.format_exc()])
finally:
mapper.stop_mapper(fitdriver.mapper)
Expand Down

0 comments on commit baa871b

Please sign in to comment.