From 47053af44897bbbe5b0b79c19421f40cd6d9b124 Mon Sep 17 00:00:00 2001 From: Karlo Berket Date: Wed, 27 Mar 2024 11:22:29 -0400 Subject: [PATCH] Fixes for bugs related to SDOE in 3.21-rc (#1210) * restricting matplotlib due to issues when using 3.8 * cast parameter for setValue to int * Add link to CCSI-Toolset/FOQUS#1211 --------- Co-authored-by: Ludovico Bianchi --- foqus_lib/gui/sdoe/sdoeAnalysisDialog.py | 2 +- setup.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/foqus_lib/gui/sdoe/sdoeAnalysisDialog.py b/foqus_lib/gui/sdoe/sdoeAnalysisDialog.py index e74a84e0c..573bc1f13 100644 --- a/foqus_lib/gui/sdoe/sdoeAnalysisDialog.py +++ b/foqus_lib/gui/sdoe/sdoeAnalysisDialog.py @@ -849,7 +849,7 @@ def runSdoeNUSF(self): "mwr = %d, n = %d" % (mwr, results[mwr]["num_restarts"]) ) count += 1 - self.SDOE2_progressBar.setValue((100 / len(mwr_list)) * count) + self.SDOE2_progressBar.setValue(int((100 / len(mwr_list)) * count)) QApplication.processEvents() self.unfreeze() diff --git a/setup.py b/setup.py index 39d5a6c10..fa38bdcf4 100644 --- a/setup.py +++ b/setup.py @@ -94,7 +94,9 @@ "cma", "dask[dataframe,distributed]", # <2024.3", # prebuilt wheels not available on 3.11 for matplotlib<3.6 on: macos arm64, win32 - "matplotlib==3.*", + # matplotlib>=3.8 has API incompatibilities with SDoE plots + # see CCSI-Toolset/FOQUS#1211 for more information + "matplotlib >= 3.6.0, <= 3.7.5", "python-tsp==0.3.1", "mplcursors", "numpy",