From 3ca9a04717fd61357fbfb87764fa970271aa24c5 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 11 Dec 2025 13:29:11 -0500 Subject: [PATCH 1/7] Do not use pre-defined tasks to allow for working on read-only filesystems --- src/mantidworkbench | 13 ++-- src/nsd-app-wrap.sh | 147 +++++++++++++----------------------------- src/nsd-conda-wrap.sh | 7 +- src/paraview | 2 +- 4 files changed, 54 insertions(+), 115 deletions(-) mode change 100644 => 100755 src/mantidworkbench mode change 100644 => 100755 src/paraview diff --git a/src/mantidworkbench b/src/mantidworkbench old mode 100644 new mode 100755 index aa719f6..51350f2 --- a/src/mantidworkbench +++ b/src/mantidworkbench @@ -4,28 +4,25 @@ . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || . /bin/nsd-app-wrap.sh +# default conda environment if it was not specified +PIXI_ENV="mantid" + # look for a supplied argument for var in "$@"; do case "$var" in --env=*) PIXI_ENV=$(echo "${var}" | awk -F"=" '{print $2}') - PIXI_TASK="start_mantid" shift 1 # remove this argument ;; --env) PIXI_ENV="$2" # look ahead by one - PIXI_TASK="start_mantid" shift 2 # remove the flag and value ;; esac done -# default conda environment if it was not specified -if [ -z "${PIXI_ENV}" ]; then - PIXI_ENV="mantid" - PIXI_TASK="start_gui" -fi +PIXI_TASK="mantidworkbench" # put together arguments - conda_env, application, argv args=("${PIXI_ENV}" "${PIXI_TASK}" "$@") # launch the tool -pixi_launch "${args[@]}" +activate_pixi_and_launch "${args[@]}" diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index cbcd315..bd5cd89 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -1,9 +1,8 @@ #!/bin/bash -CONDA_PREFIX_CENTRAL="/opt/anaconda" -CONDA_ACTIVATE_SCRIPT="${CONDA_PREFIX_CENTRAL}/bin/activate" -# several places have conda installed in /usr/local and link it over -CONDA_PREFIX_ALT="/usr/local/anaconda" +# overwrite this value with environment injection e.g. +# PIXI_PREFIX=/path/to/pixitoml/parent/dir nsd-app-wrap.sh +PIXI_PREFIX="${PIXI_PREFIX:=/usr/local/pixi}" ########## Utility functions _remove_font_cache() { @@ -14,114 +13,58 @@ _remove_font_cache() { fi } -########## Connect to central conda command -_activate_conda_cmd() { - if [ -f "${CONDA_ACTIVATE_SCRIPT}" ]; then - # shellcheck disable=SC1090,SC1091,SC2039 - . "${CONDA_ACTIVATE_SCRIPT}" "" # don't let command line arguments in - else - echo "\"${CONDA_ACTIVATE_SCRIPT}\" not found" - exit 255 - fi -} - -_activate_central_anaconda() { - if [ "$(command -v conda)" ]; then - if [ "${CONDA_ACTIVATE_SCRIPT}" != "$(which conda)" ]; then - echo "Switching to central anaconda install in \"${CONDA_PREFIX_CENTRAL}\"" - _activate_conda_cmd - fi - else - echo "Activating central anaconda install in \"${CONDA_PREFIX_CENTRAL}\"" - _activate_conda_cmd - fi - - # make sure that conda is found in the correct place - if [ "${CONDA_PREFIX}" != "${CONDA_PREFIX_CENTRAL}" ] && [ "${CONDA_PREFIX}" != "${CONDA_PREFIX_ALT}" ]; then - echo "Found conda at \"${CONDA_PREFIX}\" rather than \"${CONDA_PREFIX_CENTRAL}\"" - exit 255 - fi -} +########## Generate the path to the manifest directory +# if the +_get_pixi_manifest_path() { + # pixi environment + PIXI_ENV="${1}" -# this should be included in scripts after activate_conda_environment -# but before the actual command to be activated using a trap -# -# trap deactivate_conda_environment EXIT -# -# this will preserve the exit code from the main command -_deactivate_conda_environment() { - echo "Deactivate conda environment" - conda deactivate + echo "${PIXI_PREFIX%/}/${PIXI_ENV}" } -########## Activate the environment in the central conda install -activate_conda_environment () { - CONDA_EXP_ENV="${1}" - - # verify that central conda install is the one being used - _activate_central_anaconda - - # activate the environment - conda activate "${CONDA_EXP_ENV}" - - # verify that the correct one was activated - if [ ! "$CONDA_DEFAULT_ENV" == "$CONDA_EXP_ENV" ]; then - echo "Failed to activate \"${CONDA_EXP_ENV}\" conda environment" - exit 255 - else - echo "Activated \"$CONDA_EXP_ENV\" conda environment" +########## Activate the environment in the central pixi install +# this assumes that "pixi" is in the user's path +activate_pixi_environment () { + # pixi environment + PIXI_ENV="${1}" + + _path_to_manifest=$(_get_pixi_manifest_path "${PIXI_ENV}") + # check the directory exists + if [ ! -d "${_path_to_manifest}" ]; then + echo "Manfest path does not exist: ${_path_to_manifest}" + exit 1 # error ends the script fi - # unload the environment on exit - trap _deactivate_conda_environment EXIT + # activate the environment + pixi shell --frozen --manifest-path "${_path_to_manifest}" } ########## Activate the environment and start the application -# The arguments are (conda_env, command, argv) and can be put +# The arguments are (pixi_env, command, argv) and can be put # together and supplied like # # args=("mantid-dev" "mantidworkbench" "$@") -# activate_and_launch "${args[@]}" -activate_and_launch() { - # first argument is conda environment - CONDA_EXP_ENV="${1}" - shift - # second argument is startup command - COMMAND="${1}" - shift - # the rest is passed to the command being started - - _remove_font_cache - activate_conda_environment "${CONDA_EXP_ENV}" - - echo "Execute: ${COMMAND} $*" - "${COMMAND}" "$@" -} - -pixi_launch() { - PIXI_PREFIX="/usr/local/pixi" - PIXI_ENV="${1}" - shift - # This grabs everything past the first argument - PIXI_TASK="${*}" - - path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" - - # Verify path_to_manifest directory exists - if [ ! -d "${path_to_manifest}" ]; then - echo "No pixi environment found at ${path_to_manifest}" - exit 1 - fi - - #echo "P: $PIXI_PREFIX, E: $PIXI_ENV, T: $PIXI_TASK - ptm: $path_to_manifest." - - _remove_font_cache - - pixi_run="pixi run --frozen --manifest-path $path_to_manifest $PIXI_TASK" - - #echo "pixi command: $pixi_run" - - $pixi_run +# activate_pixi_and_launch "${args[@]}" +# +# This assumes that "pixi" is in the user's path +activate_pixi_and_launch() { + # first argument is pixi environment + PIXI_ENV="${1}" + shift + # second argument is startup command + COMMAND="${1}" + shift + # the rest is passed to the command being started + + _path_to_manifest=$(_get_pixi_manifest_path "${PIXI_ENV}") + # check the directory exists + if [ ! -d "${_path_to_manifest}" ]; then + echo "Manfest path does not exist: ${_path_to_manifest}" + exit 1 # error ends the script + fi + _remove_font_cache + # activate the environment and run the command + echo "run \"${COMMAND} $*\" in the \"${PIXI_ENV}\" pixi environment" + pixi run --frozen --manifest-path "${_path_to_manifest}" "${COMMAND}" "$@" } - diff --git a/src/nsd-conda-wrap.sh b/src/nsd-conda-wrap.sh index ee47dad..6897db1 100755 --- a/src/nsd-conda-wrap.sh +++ b/src/nsd-conda-wrap.sh @@ -33,8 +33,7 @@ fi . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || . /bin/nsd-app-wrap.sh -# launch pixi # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "$STARTUP" "$@") -# launch the tool -pixi_launch "${args[@]}" +args=("${PIXI_ENVIRON}" "$STARTUP" "$@") +# launch pixi +activate_pixi_and_launch "${args[@]}" diff --git a/src/paraview b/src/paraview old mode 100644 new mode 100755 index 40ae384..d60db56 --- a/src/paraview +++ b/src/paraview @@ -11,4 +11,4 @@ PIXI_ENVIRON=paraview args=("${PIXI_ENVIRON}" "paraview" "$@") # start the application -pixi_launch "${args[@]}" +activate_pixi_and_launch "${args[@]}" -- GitLab From af630e84383fef38532c4345cbd6e9b0250acba6 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 11 Dec 2025 14:06:22 -0500 Subject: [PATCH 2/7] Stop installing the neutron-imaging launcher Currently, the imaging users are using a different approach for using the appropriate software. --- rpm/nsd-app-wrap.spec | 3 ++- src/neutron-imaging | 61 +++++++++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/rpm/nsd-app-wrap.spec b/rpm/nsd-app-wrap.spec index 3cf8a52..6122206 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -41,7 +41,8 @@ install -m 755 mantidpython %{buildroot}%{_bindir}/ install -m 755 mantidworkbench %{buildroot}%{_bindir}/ install -m 755 mantidtotalscattering %{buildroot}%{_bindir}/ install -m 755 mcstas %{buildroot}%{_bindir}/ -install -m 755 neutron-imaging %{buildroot}%{_bindir}/ +# not used right now - things that look like scriptlets cannot be in comments +#install -m 755 neutron-imaging {buildroot}{_bindir}/ install -m 755 nr_launcher %{buildroot}%{_bindir}/ install -m 755 nsd-app-wrap.sh %{buildroot}%{_bindir}/ install -m 755 nsd-conda-wrap.sh %{buildroot}%{_bindir}/ diff --git a/src/neutron-imaging b/src/neutron-imaging index d1f4793..a09e712 100644 --- a/src/neutron-imaging +++ b/src/neutron-imaging @@ -1,29 +1,38 @@ #!/bin/sh -# select the environment to use -CONDA_ENVIRON=neutron-imaging -NOTEBOOK_DIR=~/notebooks/IPTS_notebooks -if [ -n "$1" ]; then - if [ "--dev" = "$1" ]; then - CONDA_ENVIRON=neutron-imaging-dev - NOTEBOOK_DIR=~/notebooks/IPTS_notebooks_testing - shift # drop this argument - fi -fi +###################################################################### +# Currently this scipt is not used +###################################################################### +echo "Contact Jean Bilheux for alternate method of running the notebooks" +exit 1 -# import library to do the real work -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" - -# activate the environment - will be deactivated on exit -activate_conda_environment "${CONDA_ENVIRON}" - -# start the application -echo "Update the notebooks..." -rsync --exclude '.git*' -a /SNS/software/share/jupyter/notebooks/ ~/notebooks/ -echo "Done!" - -cd $NOTEBOOK_DIR || exit 1 - -echo "Starting Jupyter... (be patient please while we set up your system!)" -# assumes the correct jupyter is in the path -jupyter notebook notebooks +###################################################################### +# remove a single # from each of the following lines +###################################################################### +## select the environment to use +#CONDA_ENVIRON=neutron-imaging +#NOTEBOOK_DIR=~/notebooks/IPTS_notebooks +#if [ -n "$1" ]; then +# if [ "--dev" = "$1" ]; then +# CONDA_ENVIRON=neutron-imaging-dev +# NOTEBOOK_DIR=~/notebooks/IPTS_notebooks_testing +# shift # drop this argument +# fi +#fi +# +## import library to do the real work +#. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" +# +## activate the environment - will be deactivated on exit +#activate_conda_environment "${CONDA_ENVIRON}" +# +## start the application +#echo "Update the notebooks..." +#rsync --exclude '.git*' -a /SNS/software/share/jupyter/notebooks/ ~/notebooks/ +#echo "Done!" +# +#cd $NOTEBOOK_DIR || exit 1 +# +#echo "Starting Jupyter... (be patient please while we set up your system!)" +## assumes the correct jupyter is in the path +#jupyter notebook notebooks -- GitLab From 9f63d7a9b8b3a5e456621b4eae231b431d91b712 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 11 Dec 2025 14:44:19 -0500 Subject: [PATCH 3/7] gsas2 doesn't have a pixi deploy environment --- rpm/nsd-app-wrap.spec | 3 ++- src/gsas2 | 21 +++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/rpm/nsd-app-wrap.spec b/rpm/nsd-app-wrap.spec index 6122206..a8e928d 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -27,7 +27,8 @@ mkdir -p %{buildroot}%{_bindir}/ install -m 755 addie %{buildroot}%{_bindir}/ install -m 755 data2config %{buildroot}%{_bindir}/ install -m 755 drtsans %{buildroot}%{_bindir}/ -install -m 755 gsas2 %{buildroot}%{_bindir}/ +# no pixi environment exists yet +#install -m 755 gsas2 {buildroot}{_bindir}/ install -m 755 hyspecppt %{buildroot}%{_bindir}/ install -m 755 ibeatles %{buildroot}%{_bindir}/ install -m 755 inspired %{buildroot}%{_bindir}/ diff --git a/src/gsas2 b/src/gsas2 index 729d7e5..65168c9 100644 --- a/src/gsas2 +++ b/src/gsas2 @@ -1,14 +1,11 @@ #!/bin/sh -# select the environment to use -PIXI_ENVIRON=gsas2 - -# import library to do the real work -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ - || . /bin/nsd-app-wrap.sh - -# put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") -# launch the tool -pixi_launch "${args[@]}" - +###################################################################### +# Currently this scipt is not used +###################################################################### +exit 1 + +###################################################################### +# remove a single # from each of the following lines +###################################################################### +#"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" gsas2 --classic /path/to/GSASII.py -- GitLab From 2c370e34c615d2d1d932ca2c7f19f4f50252b356 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 11 Dec 2025 14:53:57 -0500 Subject: [PATCH 4/7] Copy start_gui command from the toml files --- src/addie | 4 ++-- src/hyspecppt | 2 +- src/ibeatles | 3 +-- src/inspired | 2 +- src/licorne | 2 +- src/mantidtotalscattering | 2 +- src/mantidworkbench | 2 +- src/mantidworkbenchnightly | 2 +- src/mantidworkbenchqa | 2 +- src/mcstas | 2 +- src/nsd-app-wrap.sh | 4 ++-- src/nsd-conda-wrap.sh | 2 +- src/paraview | 2 +- src/pdfgui2 | 2 +- src/quicknxs | 3 +-- src/refl1d | 2 +- src/refred | 2 +- src/sasview | 2 +- src/shiver | 2 +- 19 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/addie b/src/addie index ba8b459..0010035 100644 --- a/src/addie +++ b/src/addie @@ -31,9 +31,9 @@ fi # put together arguments - conda_env, application, argv if [ -n "${mode_arg}" ]; then - args=("${PIXI_ENVIRON}" "start_gui" "${mode_arg}" "${@}") + args=("${PIXI_ENVIRON}" "addie" "${mode_arg}" "${@}") else - args=("${PIXI_ENVIRON}" "start_gui" "${@}") + args=("${PIXI_ENVIRON}" "addie" "${@}") fi # launch the tool pixi_launch "${args[@]}" diff --git a/src/hyspecppt b/src/hyspecppt index 25d7181..10d02d3 100644 --- a/src/hyspecppt +++ b/src/hyspecppt @@ -19,6 +19,6 @@ fi || . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "hyspecppt" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/ibeatles b/src/ibeatles index 3f07b20..567f899 100644 --- a/src/ibeatles +++ b/src/ibeatles @@ -10,7 +10,6 @@ PIXI_ENVIRON=ibeatles || . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "start" "$@") # launch the tool pixi_launch "${args[@]}" - diff --git a/src/inspired b/src/inspired index 6fc7660..c50ccae 100644 --- a/src/inspired +++ b/src/inspired @@ -19,6 +19,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "inspired" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/licorne b/src/licorne index 1a1e9a3..756a3a7 100644 --- a/src/licorne +++ b/src/licorne @@ -10,6 +10,6 @@ PIXI_ENVIRON=licorne . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "licorne" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/mantidtotalscattering b/src/mantidtotalscattering index 4509946..fadeffa 100644 --- a/src/mantidtotalscattering +++ b/src/mantidtotalscattering @@ -18,6 +18,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "mantidtotalscattering" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/mantidworkbench b/src/mantidworkbench index 51350f2..5489bc8 100755 --- a/src/mantidworkbench +++ b/src/mantidworkbench @@ -25,4 +25,4 @@ PIXI_TASK="mantidworkbench" # put together arguments - conda_env, application, argv args=("${PIXI_ENV}" "${PIXI_TASK}" "$@") # launch the tool -activate_pixi_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/mantidworkbenchnightly b/src/mantidworkbenchnightly index 6eb4827..82dc02e 100644 --- a/src/mantidworkbenchnightly +++ b/src/mantidworkbenchnightly @@ -6,6 +6,6 @@ # put together arguments - conda_env, application, argv PIXI_ENV="mantid_dev" -args=("${PIXI_ENV}" "start_gui" "$@") +args=("${PIXI_ENV}" "mantidworkbench" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/mantidworkbenchqa b/src/mantidworkbenchqa index c51b591..765422f 100644 --- a/src/mantidworkbenchqa +++ b/src/mantidworkbenchqa @@ -6,6 +6,6 @@ # put together arguments - conda_env, application, argv PIXI_ENV="mantid_qa" -args=("${PIXI_ENV}" "start_gui" "$@") +args=("${PIXI_ENV}" "mantidworkbench" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/mcstas b/src/mcstas index 08387a6..a2c2e2d 100644 --- a/src/mcstas +++ b/src/mcstas @@ -10,6 +10,6 @@ PIXI_ENVIRON=mctsas || . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "mcgui" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index bd5cd89..c75a94e 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -44,10 +44,10 @@ activate_pixi_environment () { # together and supplied like # # args=("mantid-dev" "mantidworkbench" "$@") -# activate_pixi_and_launch "${args[@]}" +# pixi_launch "${args[@]}" # # This assumes that "pixi" is in the user's path -activate_pixi_and_launch() { +pixi_launch() { # first argument is pixi environment PIXI_ENV="${1}" shift diff --git a/src/nsd-conda-wrap.sh b/src/nsd-conda-wrap.sh index 6897db1..f6e7c63 100755 --- a/src/nsd-conda-wrap.sh +++ b/src/nsd-conda-wrap.sh @@ -36,4 +36,4 @@ fi # put together arguments - conda_env, application, argv args=("${PIXI_ENVIRON}" "$STARTUP" "$@") # launch pixi -activate_pixi_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/paraview b/src/paraview index d60db56..40ae384 100755 --- a/src/paraview +++ b/src/paraview @@ -11,4 +11,4 @@ PIXI_ENVIRON=paraview args=("${PIXI_ENVIRON}" "paraview" "$@") # start the application -activate_pixi_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/pdfgui2 b/src/pdfgui2 index a9c248d..af8209f 100644 --- a/src/pdfgui2 +++ b/src/pdfgui2 @@ -9,7 +9,7 @@ PIXI_ENVIRON=pdfgui . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "pdfgui" "$@") # start the application pixi_launch "${args[@]}" diff --git a/src/quicknxs b/src/quicknxs index c01d79c..0559990 100644 --- a/src/quicknxs +++ b/src/quicknxs @@ -18,7 +18,6 @@ fi . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ || . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "quicknxs-gui" "$@") # launch the tool pixi_launch "${args[@]}" - diff --git a/src/refl1d b/src/refl1d index 97b2d46..728c657 100644 --- a/src/refl1d +++ b/src/refl1d @@ -24,6 +24,6 @@ fi . /bin/nsd-app-wrap.sh # Resolves to /bin/nsd-app-wrap.sh ? # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "refl1d" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/refred b/src/refred index f188dce..2987cb9 100644 --- a/src/refred +++ b/src/refred @@ -18,6 +18,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "refred-gui" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/sasview b/src/sasview index 9d85dca..7114989 100644 --- a/src/sasview +++ b/src/sasview @@ -10,6 +10,6 @@ PIXI_ENVIRON=sasview . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "sasview" "$@") # launch the tool pixi_launch "${args[@]}" diff --git a/src/shiver b/src/shiver index 3177800..dec673f 100644 --- a/src/shiver +++ b/src/shiver @@ -18,6 +18,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${PIXI_ENVIRON}" "start_gui" "$@") +args=("${PIXI_ENVIRON}" "shiver" "$@") # launch the tool pixi_launch "${args[@]}" -- GitLab From 802d5740b99942005dd925c6f8309b180f447612 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 11 Dec 2025 14:57:53 -0500 Subject: [PATCH 5/7] Call main mantidworkbench with a named environment --- src/mantidworkbenchnightly | 11 ++--------- src/mantidworkbenchqa | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/mantidworkbenchnightly b/src/mantidworkbenchnightly index 82dc02e..02cb331 100644 --- a/src/mantidworkbenchnightly +++ b/src/mantidworkbenchnightly @@ -1,11 +1,4 @@ #!/bin/bash -# import library to do the real work -# shellcheck disable=SC1091 -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh - -# put together arguments - conda_env, application, argv +# call the main mantidworkbench with an environment PIXI_ENV="mantid_dev" -args=("${PIXI_ENV}" "mantidworkbench" "$@") -# launch the tool -pixi_launch "${args[@]}" +"$(dirname "$(realpath "$0")")/mantidworkbench" --env "${PIXI_ENV}" diff --git a/src/mantidworkbenchqa b/src/mantidworkbenchqa index 765422f..9c0acee 100644 --- a/src/mantidworkbenchqa +++ b/src/mantidworkbenchqa @@ -1,11 +1,4 @@ #!/bin/bash -# import library to do the real work -# shellcheck disable=SC1091 -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh - -# put together arguments - conda_env, application, argv +# call the main mantidworkbench with an environment PIXI_ENV="mantid_qa" -args=("${PIXI_ENV}" "mantidworkbench" "$@") -# launch the tool -pixi_launch "${args[@]}" +"$(dirname "$(realpath "$0")")/mantidworkbench" --env "${PIXI_ENV}" -- GitLab From 2bc104d4c344e33c0222b15a64cca6aae900812e Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 11 Dec 2025 15:08:48 -0500 Subject: [PATCH 6/7] Fix shellcheck issue --- src/paraview | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/paraview b/src/paraview index 40ae384..8da3521 100755 --- a/src/paraview +++ b/src/paraview @@ -4,8 +4,9 @@ # current default is system version PIXI_ENVIRON=paraview # import library to do the real work -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ - || . /bin/nsd-app-wrap.sh +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv args=("${PIXI_ENVIRON}" "paraview" "$@") -- GitLab From 35ff57b06ee06ea1b5ea96040266356bde36de46 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Thu, 11 Dec 2025 15:39:02 -0500 Subject: [PATCH 7/7] Bump version number --- rpm/nsd-app-wrap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/nsd-app-wrap.spec b/rpm/nsd-app-wrap.spec index a8e928d..d6a7bf2 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.11 +Version: 2.12 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson -- GitLab