From 73b1a36ad6213fafd036b84e99b6fc9d8f57fd71 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 09:49:21 +0200 Subject: [PATCH 01/25] Fix atom color if valency is present --- easyDiffractionApp/Gui/Components/SampleAtoms.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/easyDiffractionApp/Gui/Components/SampleAtoms.qml b/easyDiffractionApp/Gui/Components/SampleAtoms.qml index 9ff3b7a4..785dd3ba 100644 --- a/easyDiffractionApp/Gui/Components/SampleAtoms.qml +++ b/easyDiffractionApp/Gui/Components/SampleAtoms.qml @@ -31,7 +31,6 @@ EaComponents.TableView { XmlRole { name: "label"; query: "label/value/string()" } XmlRole { name: "type"; query: "specie/value/string()" } - //XmlRole { name: "color"; query: "color/string()" } XmlRole { name: "x"; query: "fract_x/value/number()" } XmlRole { name: "y"; query: "fract_y/value/number()" } XmlRole { name: "z"; query: "fract_z/value/number()" } @@ -250,9 +249,19 @@ EaComponents.TableView { 'Ts' : '#000000', 'Og' : '#000000' } + // Simple case, e.g. Co if (colors.hasOwnProperty(symbol)) { return colors[symbol] } + // First 2 symbols, if valency is given for 2 characters element, e.g. Mn3+ + if (colors.hasOwnProperty(symbol.substring(0, 2))) { + return colors[symbol.substring(0, 2)] + } + // First symbol, if valency is given for 1 characters element, e.g. O2- + if (colors.hasOwnProperty(symbol.substring(0, 1))) { + return colors[symbol.substring(0, 1)] + } + // Transparent color if no elements found return 'transparent' } From 7d2ea04ff5724680852f785a96b152b2ca5167f1 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 10:17:23 +0200 Subject: [PATCH 02/25] Update MSPS table --- .../Gui/Components/SampleMsps.qml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/easyDiffractionApp/Gui/Components/SampleMsps.qml b/easyDiffractionApp/Gui/Components/SampleMsps.qml index d09c909d..2c85e5e5 100644 --- a/easyDiffractionApp/Gui/Components/SampleMsps.qml +++ b/easyDiffractionApp/Gui/Components/SampleMsps.qml @@ -17,9 +17,9 @@ import Gui.Globals 1.0 as ExGlobals EaComponents.TableView { property int numColumnWidth: EaStyle.Sizes.fontPixelSize * 2.5 property int labelColumnWidth: EaStyle.Sizes.fontPixelSize * 2.5 - property int typeColumnWidth: EaStyle.Sizes.fontPixelSize * 4.0 + property int typeColumnWidth: EaStyle.Sizes.fontPixelSize * 4.5 property int numFixedColumn: 3 - property int numFlexColumn: 7 + property int numFlexColumn: 6 property int flexColumnWidth: (width - numColumnWidth - labelColumnWidth - @@ -76,17 +76,24 @@ EaComponents.TableView { enabled: false width: typeColumnWidth headerText: "Type" - model: ["Cani", "Ciso"] + model: ["None", "Cani", "Ciso"] //currentIndex: model.indexOf(modelMspType) - Component.onCompleted: currentIndex = model.indexOf(modelMspType) + Component.onCompleted: { + currentIndex = model.indexOf(modelMspType) + if (currentIndex === -1) { + currentIndex = 0 + } + } } + /* EaComponents.TableViewTextInput { width: flexColumnWidth - headerText: "\u03C7Iso" + headerText: "Iso"//"\u03C7Iso" text: EaLogic.Utils.toFixed(model.mspIso) onEditingFinished: editParameterValue(model.mspIsoId, text) } + */ EaComponents.TableViewTextInput { width: flexColumnWidth From 8f6ce4545e2f1f58ee41a2fc814c6ccf740e2f07 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 11:25:54 +0200 Subject: [PATCH 03/25] Test ubuntu only (without video tutorials) --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9028bf37..b69e17f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - os: [macos-10.15, ubuntu-20.04, windows-2019] + os: [ubuntu-20.04] # [macos-10.15, ubuntu-20.04, windows-2019] steps: - name: Cancel previous workflow runs @@ -117,13 +117,13 @@ jobs: - name: Install app run: poetry run python ${{ env.SCRIPTS_PATH }}/InstallApp.py - - name: Run app in testmode, record screen and quit - run: poetry run python ${{ env.SCRIPTS_PATH }}/RunApp.py --testmode + #- name: Run app in testmode, record screen and quit + # run: poetry run python ${{ env.SCRIPTS_PATH }}/RunApp.py --testmode - - name: Rename test videos - run: > - poetry run python ${{ env.SCRIPTS_PATH }}/RenameTestVideos.py - ${{ env.BRANCH_NAME }} + #- name: Rename test videos + # run: > + # poetry run python ${{ env.SCRIPTS_PATH }}/RenameTestVideos.py + # ${{ env.BRANCH_NAME }} - name: Sign app installer if: github.event_name == 'push' && env.BRANCH_NAME == 'master' From a3ae1b46940fa52691c7748b24bef2f75f78b57b Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 11:57:21 +0200 Subject: [PATCH 04/25] Bump pyinstaller to 5.2 and QtInstallerFramework to 4.4.1 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 90a9ef9b..979a7722 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ easyApp = { git = 'https://github.com/easyScience/easyApp.git', rev = 'polarized #[tool.poetry.dev-dependencies] # PyInstaller -pyinstaller = '4.5.1' # 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app +pyinstaller = '^5.2' # 4.5.1 worked. 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app #pyinstaller = { git = 'https://github.com/pyinstaller/pyinstaller.git', rev = 'develop' } pywin32-ctypes = { version = '^0.2.0', platform = 'win32' } pypiwin32 = { version = '^223', platform = 'win32' } @@ -165,7 +165,7 @@ manual_exclude = [ 'mfc*', 'msvcp*', 'VCRUNTIME*', '*Qt*Scxml*', '*Qt*Sensors*', '*Qt*Sql*', '*Qt*VirtualKeyboard*', '*Qt*Wayland*' ] [ci.qtifw.setup] -version = '4.1.0' +version = '4.4.1' https_mirrors = ['download.qt.io', 'ftp.fau.de/qtproject', 'mirrors.dotsrc.org/qtproject'] base_path = 'official_releases/qt-installer-framework' file_name_base = 'QtInstallerFramework' From 99fa92803350782009c497f2e1bf9468f83c386e Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 12:00:11 +0200 Subject: [PATCH 05/25] Fix QtInstallerFramework online repository file path --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 979a7722..cbc99cf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -169,7 +169,7 @@ version = '4.4.1' https_mirrors = ['download.qt.io', 'ftp.fau.de/qtproject', 'mirrors.dotsrc.org/qtproject'] base_path = 'official_releases/qt-installer-framework' file_name_base = 'QtInstallerFramework' -file_platform = { macos = 'macOS-x86_64', ubuntu = 'linux-x64', windows = 'windows-x86' } +file_platform = { macos = 'macOS-x64', ubuntu = 'linux-x64', windows = 'windows-x64' } file_ext = { macos = 'dmg', ubuntu = 'run', windows = 'exe' } installation_path = { macOS = '/Users/runner/Qt', Linux = '/home/runner/Qt', Windows = 'C:\Qt' } From 4d00dd4b8f538dec18219d0ca9dc1570f002239a Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 12:06:22 +0200 Subject: [PATCH 06/25] Freeze PyInstaller version to 5.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cbc99cf7..e8ba9e9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ easyApp = { git = 'https://github.com/easyScience/easyApp.git', rev = 'polarized #[tool.poetry.dev-dependencies] # PyInstaller -pyinstaller = '^5.2' # 4.5.1 worked. 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app +pyinstaller = '5.2' # 4.5.1 worked. 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app #pyinstaller = { git = 'https://github.com/pyinstaller/pyinstaller.git', rev = 'develop' } pywin32-ctypes = { version = '^0.2.0', platform = 'win32' } pypiwin32 = { version = '^223', platform = 'win32' } From 162d47103a4175bc4c61fcda9d0e8bcb751a1fff Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 12:38:04 +0200 Subject: [PATCH 07/25] Bump pefile to 2022.5.30 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e8ba9e9b..a768960e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,11 +32,11 @@ easyApp = { git = 'https://github.com/easyScience/easyApp.git', rev = 'polarized #[tool.poetry.dev-dependencies] # PyInstaller -pyinstaller = '5.2' # 4.5.1 worked. 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app +pyinstaller = '^5.2' # 4.5.1 worked. 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app #pyinstaller = { git = 'https://github.com/pyinstaller/pyinstaller.git', rev = 'develop' } pywin32-ctypes = { version = '^0.2.0', platform = 'win32' } pypiwin32 = { version = '^223', platform = 'win32' } -pefile = { version = '^2019.4.18', platform = 'win32' } +pefile = { version = '^2022.5.30', platform = 'win32' } # Misc toml = '^0.10.2' requests = '^2.25.1' From ee37b71be43d06a09031b5d974e18df4425a74c0 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 12:54:49 +0200 Subject: [PATCH 08/25] Debug QtIFW path on ubuntu --- tools/Scripts/MakeInstaller.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/Scripts/MakeInstaller.py b/tools/Scripts/MakeInstaller.py index cc36945e..bb9fd470 100644 --- a/tools/Scripts/MakeInstaller.py +++ b/tools/Scripts/MakeInstaller.py @@ -306,6 +306,10 @@ def createInstallerSourceDir(): Functions.printSuccessMessage(message) def createOfflineInstaller(): + Functions.run('ls', '/home/runner') + Functions.run('ls', '/home/runner/Qt') + Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1') + Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1/bin') try: message = 'create installer' qtifw_bin_dir_path = os.path.join(qtifwDirPath(), 'bin') From 55a5a39661f1816f449403da2d6d0cdfe0e15338 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 13:31:31 +0200 Subject: [PATCH 09/25] More debug --- tools/Scripts/MakeInstaller.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/Scripts/MakeInstaller.py b/tools/Scripts/MakeInstaller.py index bb9fd470..f2728019 100644 --- a/tools/Scripts/MakeInstaller.py +++ b/tools/Scripts/MakeInstaller.py @@ -251,6 +251,15 @@ def installQtInstallerFramework(): Functions.printSuccessMessage(message) def createInstallerSourceDir(): + print("----------------------- 1") + Functions.run('ls', '/home/runner') + print("----------------------- 2") + Functions.run('ls', '/home/runner/Qt') + print("----------------------- 3") + Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1') + print("----------------------- 4") + Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1/bin') + print("----------------------- 5") try: message = f'create installer source directory {setupBuildDirPath()}' # base @@ -306,10 +315,6 @@ def createInstallerSourceDir(): Functions.printSuccessMessage(message) def createOfflineInstaller(): - Functions.run('ls', '/home/runner') - Functions.run('ls', '/home/runner/Qt') - Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1') - Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1/bin') try: message = 'create installer' qtifw_bin_dir_path = os.path.join(qtifwDirPath(), 'bin') From 72277bbdcb63a15128afbbbd22b80e3d4340c31c Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 13:49:46 +0200 Subject: [PATCH 10/25] More debug --- tools/Scripts/MakeInstaller.py | 38 ++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/tools/Scripts/MakeInstaller.py b/tools/Scripts/MakeInstaller.py index f2728019..e24a7870 100644 --- a/tools/Scripts/MakeInstaller.py +++ b/tools/Scripts/MakeInstaller.py @@ -233,17 +233,38 @@ def osDependentPreparation(): Functions.printNeutralMessage(f'No preparation needed for os {CONFIG.os}') def installQtInstallerFramework(): - if os.path.exists(qtifwDirPath()): - Functions.printNeutralMessage(f'QtInstallerFramework was already installed to {qtifwDirPath()}') - return + #if os.path.exists(qtifwDirPath()): + # Functions.printNeutralMessage(f'QtInstallerFramework was already installed to {qtifwDirPath()}') + # return try: + print("========================== 1") + print("----------------------- 0") + Functions.run('ls', '~') + print("----------------------- 1") + Functions.run('ls', '/home/runner') + message = f'install QtInstallerFramework to {qtifwDirPath()}' silent_script = os.path.join(CONFIG.scripts_dir, CONFIG['ci']['scripts']['silent_install']) Functions.installSilently( installer=qtifwSetupExe(), silent_script=silent_script ) - time.sleep(10) + time.sleep(30) + + print("========================== 2") + print("----------------------- 0") + Functions.run('ls', '~') + print("----------------------- 1") + Functions.run('ls', '/home/runner') + print("----------------------- 2") + Functions.run('ls', '/home/runner/Qt') + print("----------------------- 3") + Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1') + print("----------------------- 4") + Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1/bin') + print("----------------------- 5") + + except Exception as exception: Functions.printFailMessage(message, exception) sys.exit(1) @@ -251,15 +272,6 @@ def installQtInstallerFramework(): Functions.printSuccessMessage(message) def createInstallerSourceDir(): - print("----------------------- 1") - Functions.run('ls', '/home/runner') - print("----------------------- 2") - Functions.run('ls', '/home/runner/Qt') - print("----------------------- 3") - Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1') - print("----------------------- 4") - Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1/bin') - print("----------------------- 5") try: message = f'create installer source directory {setupBuildDirPath()}' # base From 591a1cf609db1d71200917e19bd64b423cdc0e7a Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 13:55:28 +0200 Subject: [PATCH 11/25] Add install libxcb-shape0 on ubuntu --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b69e17f7..e45c4de8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,7 @@ jobs: sudo apt-get -o Acquire::Retries=3 update sudo apt-get -o Acquire::Retries=3 install libxcb-xinerama0 sudo apt-get -o Acquire::Retries=3 install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xfixes0 + sudo apt-get -o Acquire::Retries=3 install libxcb-shape0 sudo apt-get -o Acquire::Retries=3 install libpulse-mainloop-glib0 # sudo apt-get install libgfortran4 # echo "QT_DEBUG_PLUGINS=1" >> $GITHUB_ENV From 627eaa501632639bbd00e5919038ba072c657787 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 14:05:59 +0200 Subject: [PATCH 12/25] Clean up MakeInstaller script after debug --- tools/Scripts/MakeInstaller.py | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/tools/Scripts/MakeInstaller.py b/tools/Scripts/MakeInstaller.py index e24a7870..f5f4fdc1 100644 --- a/tools/Scripts/MakeInstaller.py +++ b/tools/Scripts/MakeInstaller.py @@ -233,16 +233,10 @@ def osDependentPreparation(): Functions.printNeutralMessage(f'No preparation needed for os {CONFIG.os}') def installQtInstallerFramework(): - #if os.path.exists(qtifwDirPath()): - # Functions.printNeutralMessage(f'QtInstallerFramework was already installed to {qtifwDirPath()}') - # return + if os.path.exists(qtifwDirPath()): + Functions.printNeutralMessage(f'QtInstallerFramework was already installed to {qtifwDirPath()}') + return try: - print("========================== 1") - print("----------------------- 0") - Functions.run('ls', '~') - print("----------------------- 1") - Functions.run('ls', '/home/runner') - message = f'install QtInstallerFramework to {qtifwDirPath()}' silent_script = os.path.join(CONFIG.scripts_dir, CONFIG['ci']['scripts']['silent_install']) Functions.installSilently( @@ -250,21 +244,6 @@ def installQtInstallerFramework(): silent_script=silent_script ) time.sleep(30) - - print("========================== 2") - print("----------------------- 0") - Functions.run('ls', '~') - print("----------------------- 1") - Functions.run('ls', '/home/runner') - print("----------------------- 2") - Functions.run('ls', '/home/runner/Qt') - print("----------------------- 3") - Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1') - print("----------------------- 4") - Functions.run('ls', '/home/runner/Qt/QtIFW-4.4.1/bin') - print("----------------------- 5") - - except Exception as exception: Functions.printFailMessage(message, exception) sys.exit(1) @@ -328,7 +307,7 @@ def createInstallerSourceDir(): def createOfflineInstaller(): try: - message = 'create installer' + message = 'create offline installer' qtifw_bin_dir_path = os.path.join(qtifwDirPath(), 'bin') qtifw_binarycreator_path = os.path.join(qtifw_bin_dir_path, 'binarycreator') qtifw_installerbase_path = os.path.join(qtifw_bin_dir_path, 'installerbase') From 8abcda3c156250a6a486698e45280e8aa9d681b2 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 14:06:48 +0200 Subject: [PATCH 13/25] Bump opencv and ffmpeg --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a768960e..eca5c4a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,6 @@ requests = '^2.25.1' dephell_licenses = '^0.1.7' ffmpeg-python = '^0.2.0' mss = '^6.1.0' -#opencv-python = '^4.5.1' opencv-python = '4.5.1.48' google-trans-new = '^1.1.9' gTTS = '^2.2.2' @@ -174,7 +173,7 @@ file_ext = { macos = 'dmg', ubuntu = 'run', windows = 'exe' } installation_path = { macOS = '/Users/runner/Qt', Linux = '/home/runner/Qt', Windows = 'C:\Qt' } [ci.ffmpeg.macos] # https://evermeet.cx/ffmpeg/ffmpeg-4.3.zip -version = '4.3.1' +version = '5.0.1' base_url = 'https://evermeet.cx/ffmpeg' file_name_base = 'ffmpeg-' file_ext = '.zip' From ca4da76c869e07c1d16024a702689327f0382225 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 14:07:47 +0200 Subject: [PATCH 14/25] Capitalize `Easy` in `EasyDiffraction` --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eca5c4a6..e536c985 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ easyDiffraction = 'easyDiffractionApp.main:main' # CUSTOM CONFIG [release] -app_name = 'easyDiffraction' +app_name = 'EasyDiffraction' tag_template = 'v{VERSION}' title_template = 'Version {VERSION} ({DATE})' description_file = 'RELEASE.md' From 1375679083e0e7ba3412492c3c28133f665bbd6e Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 14:19:08 +0200 Subject: [PATCH 15/25] Fix package name --- tools/Scripts/Config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Scripts/Config.py b/tools/Scripts/Config.py index bcf1f093..c3b56a52 100644 --- a/tools/Scripts/Config.py +++ b/tools/Scripts/Config.py @@ -52,7 +52,7 @@ def __init__(self, branch_name=None): self.repository_dir_suffix = self.__dict__['ci']['app']['setup']['repository_dir_suffix'] # Project - self.package_name = f'{self.app_name}App' + self.package_name = self.__dict__['tool']['poetry']['name'] self.license_file = self.__dict__['ci']['project']['license_file'] def __getitem__(self, key): From 8cc20f694c9edbff728d878ed3fa375bcb1c43b9 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 14:50:56 +0200 Subject: [PATCH 16/25] Fix .desktop file name --- tools/Scripts/InstallerInstallScript.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Scripts/InstallerInstallScript.js b/tools/Scripts/InstallerInstallScript.js index 0e0fa5f0..b75dc7c7 100644 --- a/tools/Scripts/InstallerInstallScript.js +++ b/tools/Scripts/InstallerInstallScript.js @@ -97,8 +97,8 @@ Component.prototype.createOperations = function() component.addOperation( "Copy", - "@TargetDir@/easyDiffraction.desktop", - "@HomeDir@/.local/share/applications/easyDiffraction.desktop" + "@TargetDir@/@ProductName@.desktop", + "@HomeDir@/.local/share/applications/@ProductName@.desktop" ) /* From 8e2ac93663d6b4ffec7b530f4ade9642a3db090e Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 14:51:09 +0200 Subject: [PATCH 17/25] Some debug --- .github/workflows/build.yml | 12 ++++++------ tools/Scripts/InstallApp.py | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e45c4de8..d032ebf9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,13 +118,13 @@ jobs: - name: Install app run: poetry run python ${{ env.SCRIPTS_PATH }}/InstallApp.py - #- name: Run app in testmode, record screen and quit - # run: poetry run python ${{ env.SCRIPTS_PATH }}/RunApp.py --testmode + - name: Run app in testmode, record screen and quit + run: poetry run python ${{ env.SCRIPTS_PATH }}/RunApp.py --testmode - #- name: Rename test videos - # run: > - # poetry run python ${{ env.SCRIPTS_PATH }}/RenameTestVideos.py - # ${{ env.BRANCH_NAME }} + - name: Rename test videos + run: > + poetry run python ${{ env.SCRIPTS_PATH }}/RenameTestVideos.py + ${{ env.BRANCH_NAME }} - name: Sign app installer if: github.event_name == 'push' && env.BRANCH_NAME == 'master' diff --git a/tools/Scripts/InstallApp.py b/tools/Scripts/InstallApp.py index 4505cb8f..7296bd38 100644 --- a/tools/Scripts/InstallApp.py +++ b/tools/Scripts/InstallApp.py @@ -38,4 +38,7 @@ def runInstallerSilently(): if __name__ == "__main__": + Functions.run('ls', '/home/runner') + Functions.run('ls', '/home/runner/EasyDiffraction') + Functions.run('ls', '/home/runner/EasyDiffraction/EasyDiffraction') runInstallerSilently() From 55314f523fd6a7961bfc1da95947d547bfdaa6d9 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 15:34:00 +0200 Subject: [PATCH 18/25] Enable all platforms --- .github/workflows/build.yml | 3 ++- tools/Scripts/InstallApp.py | 3 --- tools/Scripts/InstallerControlScript.js | 4 ++-- tools/Scripts/InstallerInstallScript.js | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d032ebf9..ceaaf6b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - os: [ubuntu-20.04] # [macos-10.15, ubuntu-20.04, windows-2019] + os: [macos-10.15, ubuntu-20.04, windows-2019] steps: - name: Cancel previous workflow runs @@ -122,6 +122,7 @@ jobs: run: poetry run python ${{ env.SCRIPTS_PATH }}/RunApp.py --testmode - name: Rename test videos + if: runner.os != 'Linux' run: > poetry run python ${{ env.SCRIPTS_PATH }}/RenameTestVideos.py ${{ env.BRANCH_NAME }} diff --git a/tools/Scripts/InstallApp.py b/tools/Scripts/InstallApp.py index 7296bd38..4505cb8f 100644 --- a/tools/Scripts/InstallApp.py +++ b/tools/Scripts/InstallApp.py @@ -38,7 +38,4 @@ def runInstallerSilently(): if __name__ == "__main__": - Functions.run('ls', '/home/runner') - Functions.run('ls', '/home/runner/EasyDiffraction') - Functions.run('ls', '/home/runner/EasyDiffraction/EasyDiffraction') runInstallerSilently() diff --git a/tools/Scripts/InstallerControlScript.js b/tools/Scripts/InstallerControlScript.js index bc519217..4ce21d63 100644 --- a/tools/Scripts/InstallerControlScript.js +++ b/tools/Scripts/InstallerControlScript.js @@ -14,8 +14,8 @@ Controller.prototype.IntroductionPageCallback = function() if (installer.isInstaller()) { var msg = "" - msg += "

Welcome to the easyDiffraction Setup Wizard.

" - msg += "

easyDiffraction is a scientific software for modelling and analysis of diffraction data.

" + msg += "

Welcome to the EasyDiffraction Setup Wizard.

" + msg += "

EasyDiffraction is a scientific software for modelling and analysis of diffraction data.

" msg += "

For more details, please visit https://easydiffraction.org

" page.MessageLabel.setText(msg) } diff --git a/tools/Scripts/InstallerInstallScript.js b/tools/Scripts/InstallerInstallScript.js index b75dc7c7..f536a2e0 100644 --- a/tools/Scripts/InstallerInstallScript.js +++ b/tools/Scripts/InstallerInstallScript.js @@ -104,8 +104,8 @@ Component.prototype.createOperations = function() /* component.addOperation( "Copy", - "@TargetDir@/easyDiffraction.desktop", - "/usr/share/applications/easyDiffraction.desktop" + "@TargetDir@/@ProductName@.desktop", + "/usr/share/applications/@ProductName@.desktop" ) */ } From baa8c0d0e4ca40a136531e9833802b0e342ef38a Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 18:08:22 +0200 Subject: [PATCH 19/25] Back to pyinstaller 4.5.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7cae91fa..e2573b6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ easyApp = { git = 'https://github.com/easyScience/easyApp.git', rev = 'polarized #[tool.poetry.dev-dependencies] # PyInstaller -pyinstaller = '^5.2' # 4.5.1 worked. 4.6-4.7 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app +pyinstaller = '^4.5.1' # 4.6-5.2 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app #pyinstaller = { git = 'https://github.com/pyinstaller/pyinstaller.git', rev = 'develop' } pywin32-ctypes = { version = '^0.2.0', platform = 'win32' } pypiwin32 = { version = '^223', platform = 'win32' } From dc24cd53525fb3b682bae5cee3cd08407a49afff Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 18:25:35 +0200 Subject: [PATCH 20/25] Actually get back to pyinstaller 4.5.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2573b6d..f80c0da7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ easyApp = { git = 'https://github.com/easyScience/easyApp.git', rev = 'polarized #[tool.poetry.dev-dependencies] # PyInstaller -pyinstaller = '^4.5.1' # 4.6-5.2 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app +pyinstaller = '4.5.1' # 4.6-5.2 give "ModuleNotFoundError: No module named 'pip'" on Ubuntu, when run app #pyinstaller = { git = 'https://github.com/pyinstaller/pyinstaller.git', rev = 'develop' } pywin32-ctypes = { version = '^0.2.0', platform = 'win32' } pypiwin32 = { version = '^223', platform = 'win32' } From 7edb05a12ea55f0966da5c1f2295272f22677faf Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 19:13:50 +0200 Subject: [PATCH 21/25] Enable test videos on Ubuntu --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ceaaf6b8..e1fd1cc8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,7 +122,6 @@ jobs: run: poetry run python ${{ env.SCRIPTS_PATH }}/RunApp.py --testmode - name: Rename test videos - if: runner.os != 'Linux' run: > poetry run python ${{ env.SCRIPTS_PATH }}/RenameTestVideos.py ${{ env.BRANCH_NAME }} From 27c018c5c2f5c650f1b684fc2b5448fd0acb8a3b Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 13 Jul 2022 22:09:51 +0200 Subject: [PATCH 22/25] Update README.md [ci skip] --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f6bb3e95..717064da 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,26 @@ -**easyDiffraction** is a scientific software for modelling and analysis of diffraction data. Currently, **easyDiffraction** covers classical 1D unpolarized neutron powder diffraction data collected using constant wavelength (CW) or time-of-flight (TOF) diffractometers. +**EasyDiffraction** is a scientific software for modelling and analysis of diffraction data. Currently, **EasyDiffraction** covers classical 1D unpolarized neutron powder diffraction data collected using constant wavelength (CW) or time-of-flight (TOF) diffractometers. ![easyDiffraction Screenshot](./resources/images/ed_analysis_dark.png) -## What is easydiffraction for? +## What is EasyDiffraction for? -**easyDiffraction** allows simulation of diffraction patterns based on a structural model and refinement of its parameters. For refinement, the program uses a number of fitting engines (minimizers) such as [lmfit](https://lmfit.github.io/lmfit-py), [bumps](https://github.com/bumps/bumps) and [DFO-LS](https://github.com/numericalalgorithmsgroup/dfols). +**EasyDiffraction** allows simulation of diffraction patterns based on a structural model and refinement of its parameters. For refinement, the program uses a number of fitting engines (minimizers) such as [lmfit](https://lmfit.github.io/lmfit-py), [bumps](https://github.com/bumps/bumps) and [DFO-LS](https://github.com/numericalalgorithmsgroup/dfols). -**easyDiffraction** is similar to crystallographic programs like FullProf, Jana, GSAS, ShelX, etc. Unlike these programs **easyDiffraction** is based on _external_ crystallographic libraries (calculation engines) such as [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS). This allows **easyDiffraction** to cover different functionality aspects within a single, intuitive and user-friendly graphical interface. These libraries are included with the installation so there is no need to compile/install them separately. +**EasyDiffraction** is similar to crystallographic programs like FullProf, Jana, GSAS, ShelX, etc. Unlike these programs **EasyDiffraction** is based on _external_ crystallographic libraries (calculation engines) such as [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS) (experimental). This allows **EasyDiffraction** to cover different functionality aspects within a single, intuitive and user-friendly graphical interface. These libraries are included with the installation so there is no need to compile/install them separately. ## Main features -**easyDiffraction** is an open source project under the [BSD-3-Clause License](LICENSE.md). +**EasyDiffraction** is an open source project under the [BSD-3-Clause License](LICENSE.md). -**easyDiffraction** application is cross-platform, with support for Windows, macOS and Linux (Ubuntu). Its intuitive tabbed interface allows for a clear and defined data modelling and analysis workflow. There are also built-in step-by-step user guides and tutorials for new users. +**EasyDiffraction** application is cross-platform, with support for Windows, macOS and Linux (Ubuntu). Its intuitive tabbed interface allows for a clear and defined data modelling and analysis workflow. There are also built-in step-by-step user guides and tutorials for new users. -Current main features of **easydiffraction**: +Current main features of **Easydiffraction**: - Support for both constant-wavelength and time-of-flight 1D unpolarized neutron powder diffraction data. -- Simulations of diffraction pattern using [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS) calculation engines. +- Simulations of diffraction pattern using [CrysPy](https://github.com/ikibalin/cryspy), [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS) (experimental) calculation engines. - Structure refinement (yet unstable) using aforementioned engines. - Multiple minimization engines: [lmfit](https://lmfit.github.io/lmfit-py), [bumps](https://github.com/bumps/bumps) and [DFO-LS](https://github.com/numericalalgorithmsgroup/dfols). - Parameter constraints during refinement. @@ -32,7 +32,7 @@ Current main features of **easydiffraction**: - Interactive HTML and standard PDF report generation. - Undo/redo for both parameter changes and fitting. -Planned improvements / new functionality for **easydiffraction**: +Planned improvements / new functionality for **EasyDiffraction**: - Improved refinement. - Time-of-flight support using [CrysFML](https://code.ill.fr/scientific-software/crysfml) and [GSAS-II](https://subversion.xray.aps.anl.gov/trac/pyGSAS). @@ -49,25 +49,25 @@ Planned improvements / new functionality for **easydiffraction**: ### Downloading -The official **easyDiffraction** installer for Windows, macOS and Linux (Ubuntu) can be found [here](https://github.com/easyScience/easyDiffractionApp/releases): +The official **EasyDiffraction** installer for Windows, macOS and Linux (Ubuntu) can be found [here](https://github.com/easyScience/easyDiffractionApp/releases): ### Installing -Run **easyDiffraction** installer and follow the instructions. +Run **EasyDiffraction** installer and follow the instructions. ### Uninstalling -Run **MaintenanceTool** from the **easydiffraction** installation directory, select _Remove all components_ and follow the instructions. +Run **MaintenanceTool** from the **EasyDiffraction** installation directory, select _Remove all components_ and follow the instructions. ## Common Issues -- On `macOS`, if you see the message _easyDiffractionSetup.app can't be opened because it is from an unidentified developer_, do the following: -In the **Finder**, locate the **easydiffraction** installer application, then _control-click_ the installer icon, then choose _Open_ from the shortcut menu and finally click _Open_. +- On `macOS`, if you see the message _EasyDiffractionSetup.app can't be opened because it is from an unidentified developer_, do the following: +In the **Finder**, locate the **EasyDiffraction** installer application, then _control-click_ the installer icon, then choose _Open_ from the shortcut menu and finally click _Open_. - On `Linux` based system there can be the following error on startup: _Failed to create OpenGL context for format QSurfaceFormat_. This is due to a system OpenGL driver problem. Please re-install your graphics card drivers. ## Contributing -We absolutely welcome contributions. **easyDiffraction** is maintained by the [European Spallation Source ERIC (ESS)](https://europeanspallationsource.se/) and on a volunteer basis and thus we need to foster a community that can support user questions and develop new features to make this software a useful tool for all users while encouraging every member of the community to share their ideas. +We absolutely welcome contributions. **EasyDiffraction** is maintained by the [European Spallation Source ERIC (ESS)](https://europeanspallationsource.se/) and on a volunteer basis and thus we need to foster a community that can support user questions and develop new features to make this software a useful tool for all users while encouraging every member of the community to share their ideas. ## Get in touch From de6fed7999e59657cac25d78ec304dfbfd8bc954 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Thu, 14 Jul 2022 08:23:28 +0200 Subject: [PATCH 23/25] Bragg peaks display fix in EasyDiffLib --- RELEASE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 05d9f597..c69944eb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,4 +1,4 @@ -### Changes +### Bug Fixes -- The application installer on macOS is now signed. -- The Python-based backend framework has been updated from version 3.7 to 3.8. +- CI for all 3 platforms now works, including making a test video. +- CrysFML simulation now shows Bragg peaks. From 3c2b9eac1b5ca3ce1911b2e165c07ca6ac5b6696 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Thu, 14 Jul 2022 09:26:35 +0200 Subject: [PATCH 24/25] Decrease sleep time and trigger build with new EDL --- tools/Scripts/MakeInstaller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Scripts/MakeInstaller.py b/tools/Scripts/MakeInstaller.py index f5f4fdc1..e40f7020 100644 --- a/tools/Scripts/MakeInstaller.py +++ b/tools/Scripts/MakeInstaller.py @@ -243,7 +243,7 @@ def installQtInstallerFramework(): installer=qtifwSetupExe(), silent_script=silent_script ) - time.sleep(30) + time.sleep(10) except Exception as exception: Functions.printFailMessage(message, exception) sys.exit(1) From 4c1341fe96609cda3e328bef42b5a4b65401fdb1 Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Thu, 14 Jul 2022 11:03:12 +0200 Subject: [PATCH 25/25] Modify layout of the experiment group --- .../Gui/Pages/Experiment/SideBarBasic.qml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/easyDiffractionApp/Gui/Pages/Experiment/SideBarBasic.qml b/easyDiffractionApp/Gui/Pages/Experiment/SideBarBasic.qml index 758158c4..8785ca87 100644 --- a/easyDiffractionApp/Gui/Pages/Experiment/SideBarBasic.qml +++ b/easyDiffractionApp/Gui/Pages/Experiment/SideBarBasic.qml @@ -54,7 +54,7 @@ EaComponents.SideBarColumn { } EaElements.GroupBox { - title: qsTr("Instrument and experiment type") + title: qsTr("Experiment type") // qsTr("Instrument and experiment type") enabled: ExGlobals.Constants.proxy.experiment.experimentLoaded || ExGlobals.Constants.proxy.experiment.experimentSkipped @@ -116,7 +116,7 @@ EaComponents.SideBarColumn { EaElements.ComboBox { enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded - width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3 + width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2 model: ["Neutron"] } } @@ -131,7 +131,7 @@ EaComponents.SideBarColumn { property string experimentType: ExGlobals.Constants.proxy.sample.experimentType enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded - width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3 + width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2 textRole: "text" valueRole: "value" @@ -154,6 +154,11 @@ EaComponents.SideBarColumn { } } } + } + + Row { + visible: true + spacing: EaStyle.Sizes.fontPixelSize Column { EaElements.Label { @@ -163,14 +168,10 @@ EaComponents.SideBarColumn { EaElements.ComboBox { enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded - width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3 + width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2 model: ["Powder"] } } - } - Row { - visible: true - spacing: EaStyle.Sizes.fontPixelSize Column { EaElements.Label { @@ -181,7 +182,7 @@ EaComponents.SideBarColumn { EaElements.ComboBox { property bool experimentType: ExGlobals.Constants.proxy.experiment.isSpinPolarized enabled: !ExGlobals.Constants.proxy.experiment.experimentLoaded - width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize * 2 ) / 3 + width: (EaStyle.Sizes.sideBarContentWidth - EaStyle.Sizes.fontPixelSize) / 2 textRole: "text" valueRole: "value" @@ -290,6 +291,7 @@ EaComponents.SideBarColumn { EaElements.GroupBox { title: qsTr("Associated phases") + last: !ExGlobals.Constants.proxy.experiment.isSpinPolarized enabled: ExGlobals.Constants.proxy.experiment.experimentLoaded || ExGlobals.Constants.proxy.experiment.experimentSkipped