From a8aed5e3340d9576814c5c929583b48b192ca719 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Tue, 12 Aug 2025 11:25:33 -0400 Subject: [PATCH 01/12] updating nsd-conda-wrap for pixi, ironically --- src/nsd-conda-wrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nsd-conda-wrap.sh b/src/nsd-conda-wrap.sh index 37ced1c..ee47dad 100755 --- a/src/nsd-conda-wrap.sh +++ b/src/nsd-conda-wrap.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then _usage exit 0 fi - CONDA_ENVIRON="$1" + PIXI_ENVIRON="$1" shift # drop this argument else echo "Must specify a conda environment to activate" @@ -33,8 +33,8 @@ fi . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || . /bin/nsd-app-wrap.sh -# activate the environment - will be deactivated on exit -activate_conda_environment "${CONDA_ENVIRON}" - -# start the application -"$STARTUP" "$@" +# launch pixi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "$STARTUP" "$@") +# launch the tool +pixi_launch "${args[@]}" -- GitLab From d568f73fabf68e763b44e464e86b39d8b141cc0d Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Tue, 12 Aug 2025 11:26:13 -0400 Subject: [PATCH 02/12] updating nsd-conda-wrap for pixi, ironically --- 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 01201ac..dd41068 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.02 +Version: 2.03 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson -- GitLab From a8a8630ac82196fff7cf80e3d64f833e98edc738 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Wed, 20 Aug 2025 11:29:34 -0400 Subject: [PATCH 03/12] a bunch of new launchers --- src/addie | 12 ++++++------ src/drtsans | 13 +++++++------ src/gsas2 | 13 +++++++------ src/hyspecppt | 11 ++++++----- src/inspired | 25 +++++++++++-------------- src/licorne | 22 +++++++++------------- 6 files changed, 46 insertions(+), 50 deletions(-) diff --git a/src/addie b/src/addie index 496a9c2..ba8b459 100644 --- a/src/addie +++ b/src/addie @@ -5,18 +5,18 @@ unset SESSION_MANAGER # select the environment to use -CONDA_ENVIRON=addie +PIXI_ENVIRON=addie # If `dev` or `qa` version requested, default to `--mode=mantid`. mode_arg="" if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=addie-dev + PIXI_ENVIRON=addie_dev shift # drop this argument if [ -z "$1" ]; then mode_arg="--mode=mantid" fi elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=addie-qa + PIXI_ENVIRON=addie_qa shift # drop this argument if [ -z "$1" ]; then mode_arg="--mode=mantid" @@ -31,9 +31,9 @@ fi # put together arguments - conda_env, application, argv if [ -n "${mode_arg}" ]; then - args=("${CONDA_ENVIRON}" "addie" "${mode_arg}" "${@}") + args=("${PIXI_ENVIRON}" "start_gui" "${mode_arg}" "${@}") else - args=("${CONDA_ENVIRON}" "addie" "${@}") + args=("${PIXI_ENVIRON}" "start_gui" "${@}") fi # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/drtsans b/src/drtsans index 63000e4..d3a0acf 100644 --- a/src/drtsans +++ b/src/drtsans @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=sans +PIXI_ENVIRON=sans if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=sans-dev + PIXI_ENVIRON=sans_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=sans-qa + PIXI_ENVIRON=sans_qa shift # drop this argument fi fi @@ -20,9 +20,10 @@ if [ -n "$1" ] && [ "$1" == "--classic" ]; then fi # import library to do the real work -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "${STARTUP}" "$@") +args=("${PIXI_ENVIRON}" "${STARTUP}" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/gsas2 b/src/gsas2 index 5c76908..729d7e5 100644 --- a/src/gsas2 +++ b/src/gsas2 @@ -1,13 +1,14 @@ #!/bin/sh # select the environment to use -CONDA_ENVIRON=gsas2 +PIXI_ENVIRON=gsas2 # import library to do the real work -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh -# activate the environment - will be deactivated on exit -activate_conda_environment "${CONDA_ENVIRON}" +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" -# start the application -python "${CONDA_PREFIX}/GSASII/GSASII.py" diff --git a/src/hyspecppt b/src/hyspecppt index ed2574e..25d7181 100644 --- a/src/hyspecppt +++ b/src/hyspecppt @@ -2,13 +2,13 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=hyspecppt +PIXI_ENVIRON=hyspecppt if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=hyspecppt-dev + PIXI_ENVIRON=hyspecppt_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=hyspecppt-qa + PIXI_ENVIRON=hyspecppt_qa shift # drop this argument fi fi @@ -17,7 +17,8 @@ fi # shellcheck disable=SC1091 . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ || . /bin/nsd-app-wrap.sh + # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "hyspecppt" "$@") +args=("${PIXI_ENVIRON}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/inspired b/src/inspired index 705935c..6fc7660 100644 --- a/src/inspired +++ b/src/inspired @@ -2,26 +2,23 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=inspired +PIXI_ENVIRON=inspired if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=inspired-dev + PIXI_ENVIRON=inspired_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=inspired-qa + PIXI_ENVIRON=inspired_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # activate the environment - will be deactivated on exit - activate_conda_environment "${CONDA_ENVIRON}" -fi - -# start the application -inspired +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/licorne b/src/licorne index 67a465f..1a1e9a3 100644 --- a/src/licorne +++ b/src/licorne @@ -2,18 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=licorne +PIXI_ENVIRON=licorne -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# 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 - #args=("${CONDA_ENVIRON}" "pyrsplot" "$@") - args=("${CONDA_ENVIRON}" "licorne" "$@") - - # start the application - activate_and_launch "${args[@]}" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" -- GitLab From 17d3e0034fdcc3318bd5865e5b40130e32378233 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Wed, 20 Aug 2025 16:53:20 -0400 Subject: [PATCH 04/12] a bunch more new launchers --- src/ibeatles | 16 +++++++++++++++- src/mantidpythonnightly | 2 +- src/mantidpythonqa | 2 +- src/mantidtotalscattering | 16 +++++++--------- src/mantidworkbench | 17 ++++++++++------- src/mantidworkbenchnightly | 6 +++--- src/mantidworkbenchqa | 6 +++--- src/nsd-app-wrap.sh | 2 +- src/paraview | 18 ++++++++---------- src/pdfgui2 | 20 +++++++++----------- src/pyrs | 24 +++++++++++------------- 11 files changed, 69 insertions(+), 60 deletions(-) diff --git a/src/ibeatles b/src/ibeatles index bbceb52..3f07b20 100644 --- a/src/ibeatles +++ b/src/ibeatles @@ -1,2 +1,16 @@ #!/bin/bash -/opt/anaconda/envs/ibeatles/bin/python -m ibeatles "$@" + +# select the environment to use +# current default is system version +PIXI_ENVIRON=ibeatles + +# 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 +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" + diff --git a/src/mantidpythonnightly b/src/mantidpythonnightly index ab7ebe2..d00210e 100644 --- a/src/mantidpythonnightly +++ b/src/mantidpythonnightly @@ -1,2 +1,2 @@ #!/bin/bash -"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid-dev "$@" +"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid_dev "$@" diff --git a/src/mantidpythonqa b/src/mantidpythonqa index 153c18f..8905631 100644 --- a/src/mantidpythonqa +++ b/src/mantidpythonqa @@ -1,2 +1,2 @@ #!/bin/bash -"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid-qa "$@" +"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid_qa "$@" diff --git a/src/mantidtotalscattering b/src/mantidtotalscattering index 295536d..4509946 100644 --- a/src/mantidtotalscattering +++ b/src/mantidtotalscattering @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=mantidtotalscattering +PIXI_ENVIRON=mantidtotalscattering if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=mantidtotalscattering-dev + PIXI_ENVIRON=mantidtotalscattering_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=mantidtotalscattering-qa + PIXI_ENVIRON=mantidtotalscattering_qa shift fi fi @@ -17,9 +17,7 @@ fi . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || . /bin/nsd-app-wrap.sh -# activate the environment - will be deactivated on exit -activate_conda_environment "${CONDA_ENVIRON}" - -# start the application -echo "$@" -mantidtotalscattering "$@" +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/mantidworkbench b/src/mantidworkbench index 217a034..aa719f6 100644 --- a/src/mantidworkbench +++ b/src/mantidworkbench @@ -8,21 +8,24 @@ for var in "$@"; do case "$var" in --env=*) - CONDA_ENV=$(echo "${var}" | awk -F"=" '{print $2}') + PIXI_ENV=$(echo "${var}" | awk -F"=" '{print $2}') + PIXI_TASK="start_mantid" shift 1 # remove this argument ;; --env) - CONDA_ENV="$2" # look ahead by one - shift 2 # remove the flag and value + 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 "${CONDA_ENV}" ]; then - CONDA_ENV="mantid" +if [ -z "${PIXI_ENV}" ]; then + PIXI_ENV="mantid" + PIXI_TASK="start_gui" fi # put together arguments - conda_env, application, argv -args=("${CONDA_ENV}" "/opt/anaconda/envs/${CONDA_ENV}/bin/mantidworkbench" "$@") +args=("${PIXI_ENV}" "${PIXI_TASK}" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/mantidworkbenchnightly b/src/mantidworkbenchnightly index 3e261d2..6eb4827 100644 --- a/src/mantidworkbenchnightly +++ b/src/mantidworkbenchnightly @@ -5,7 +5,7 @@ . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -CONDA_ENV="mantid-dev" -args=("${CONDA_ENV}" "/opt/anaconda/envs/${CONDA_ENV}/bin/mantidworkbench" "$@") +PIXI_ENV="mantid_dev" +args=("${PIXI_ENV}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/mantidworkbenchqa b/src/mantidworkbenchqa index e6d2a99..c51b591 100644 --- a/src/mantidworkbenchqa +++ b/src/mantidworkbenchqa @@ -5,7 +5,7 @@ . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -CONDA_ENV="mantid-qa" -args=("${CONDA_ENV}" "/opt/anaconda/envs/${CONDA_ENV}/bin/mantidworkbench" "$@") +PIXI_ENV="mantid_qa" +args=("${PIXI_ENV}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index ee3ef12..6f4154b 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -114,7 +114,7 @@ pixi_launch() { pixi_run="pixi run --frozen --manifest-path $path_to_manifest $PIXI_TASK" - #echo "pixi command: $pixi_run" + echo "pixi command: $pixi_run" $pixi_run diff --git a/src/paraview b/src/paraview index eaacc4b..40ae384 100644 --- a/src/paraview +++ b/src/paraview @@ -2,15 +2,13 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=paraview -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ - || . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=paraview +# 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=("${CONDA_ENVIRON}" "paraview" "$@") +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "paraview" "$@") - # start the application - activate_and_launch "${args[@]}" -fi +# start the application +pixi_launch "${args[@]}" diff --git a/src/pdfgui2 b/src/pdfgui2 index 1788bfb..a9c248d 100644 --- a/src/pdfgui2 +++ b/src/pdfgui2 @@ -2,16 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=pdfgui2 -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=pdfgui +# 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 - args=("${CONDA_ENVIRON}" "pdfgui" "$@") +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") - # start the application - activate_and_launch "${args[@]}" -fi +# start the application +pixi_launch "${args[@]}" diff --git a/src/pyrs b/src/pyrs index 9fa8e32..56f116e 100644 --- a/src/pyrs +++ b/src/pyrs @@ -2,26 +2,24 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=pyrs +PIXI_ENVIRON=pyrs if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=pyrs-dev + PIXI_ENVIRON=pyrsi_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=pyrs-qa + PIXI_ENVIRON=pyrs_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# 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 - args=("${CONDA_ENVIRON}" "pyrsplot" "$@") +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "pyrsplot" "$@") - # start the application - activate_and_launch "${args[@]}" -fi +# start the application +pixi_launch "${args[@]}" -- GitLab From ef2894a99ada5f3a892484ccd2b8e2e60b5e8476 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Fri, 22 Aug 2025 11:52:26 -0400 Subject: [PATCH 05/12] adding refred and refl1d updates --- src/refl1d | 30 +++++++++++------------------- src/refred | 11 +++++------ 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/src/refl1d b/src/refl1d index 0ab392e..4631900 100644 --- a/src/refl1d +++ b/src/refl1d @@ -7,31 +7,23 @@ unset SESSION_MANAGER COMMAND="refl1d" # --port XXXX # select the environment to use -CONDA_ENVIRON=refl1d-qa +PIXI_ENVIRON=refl1d_qa if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=refl1d-dev + PIXI_ENVIRON=refl1d_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=refl1d-qa + PIXI_ENVIRON=refl1d_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh # Resolves to /bin/nsd-app-wrap.sh ? +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh # Resolves to /bin/nsd-app-wrap.sh ? - # override the normal call to activate_and_launch() function - activate_conda_environment "${CONDA_ENVIRON}" - - # remove and rebuild the font cache - _remove_font_cache - fc-cache -r - - # start the application - echo "Execute: ${COMMAND} $*" - "${COMMAND}" "$@" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/refred b/src/refred index f822902..f188dce 100644 --- a/src/refred +++ b/src/refred @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=refred +PIXI_ENVIRON=refred if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=refred-dev + PIXI_ENVIRON=refred_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=refred-qa + PIXI_ENVIRON=refred_qa shift # drop this argument fi fi @@ -18,7 +18,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "refred-gui" "$@") - +args=("${PIXI_ENVIRON}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" -- GitLab From 3757f639b0342fd4cf7e58a84f5dd2ef8844edcf Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Fri, 22 Aug 2025 15:39:29 -0400 Subject: [PATCH 06/12] adding sasview, shiver, snapwrap, usansred, nseplot and mpdf --- src/mpdf | 6 +++--- src/nseplot | 20 +++++++++----------- src/sasview | 20 +++++++++----------- src/shiver | 10 +++++----- src/snapwrap | 25 +++++++++++-------------- src/usansred | 24 ++++++++++++------------ 6 files changed, 49 insertions(+), 56 deletions(-) diff --git a/src/mpdf b/src/mpdf index 7e5f738..3b57701 100755 --- a/src/mpdf +++ b/src/mpdf @@ -2,7 +2,7 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=mpdf -if [ -v CONDA_ENVIRON ]; then - "$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" "$CONDA_ENVIRON" "$@" +PIXI_ENVIRON=mpdf +if [ -v PIXI_ENVIRON ]; then + "$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" "$PIXI_ENVIRON" "$@" fi diff --git a/src/nseplot b/src/nseplot index 7bd83af..e29dbb1 100755 --- a/src/nseplot +++ b/src/nseplot @@ -2,16 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=pysen -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=pysen - # put together arguments - conda_env, application, argv - args=("${CONDA_ENVIRON}" "nseplot" "$@") +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # start the application - activate_and_launch "${args[@]}" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "nseplot" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/sasview b/src/sasview index ae12414..9d85dca 100644 --- a/src/sasview +++ b/src/sasview @@ -2,16 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=sasview -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=sasview - # put together arguments - conda_env, application, argv - args=("${CONDA_ENVIRON}" "sasview" "$@") +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # start the application - activate_and_launch "${args[@]}" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/shiver b/src/shiver index 1fef813..3177800 100644 --- a/src/shiver +++ b/src/shiver @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=shiver +PIXI_ENVIRON=shiver if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=shiver-dev + PIXI_ENVIRON=shiver_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=shiver-qa + PIXI_ENVIRON=shiver_qa shift # drop this argument fi fi @@ -18,6 +18,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "shiver" "$@") +args=("${PIXI_ENVIRON}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/snapwrap b/src/snapwrap index 02eebcc..1f1a55e 100644 --- a/src/snapwrap +++ b/src/snapwrap @@ -2,26 +2,23 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=snapwrap +PIXI_ENVIRON=snapwrap if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=snapwrap-dev + PIXI_ENVIRON=snapwrap_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=snapwrap-qa + PIXI_ENVIRON=snapwrap_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh - # activate the environment - will be deactivated on exit - activate_conda_environment "${CONDA_ENVIRON}" -fi - -# start the application -python -m workbench +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "python -m workbench" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/usansred b/src/usansred index 920f576..4ff7476 100644 --- a/src/usansred +++ b/src/usansred @@ -2,24 +2,24 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=usansred +PIXI_ENVIRON=usansred if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=usansred-dev + PIXI_ENVIRON=usansred_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=usansred-qa + PIXI_ENVIRON=usansred_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh - # activate the environment - will be deactivated on exit - activate_conda_environment "${CONDA_ENVIRON}" -fi +# 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 +args=("${PIXI_ENVIRON}" "python" "$@") -# (there is no default appliation to launch) +# launch the tool +pixi_launch "${args[@]}" -- GitLab From f3fda65b79d90cd2ed97447d80a729174ba55cb5 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Fri, 22 Aug 2025 15:43:47 -0400 Subject: [PATCH 07/12] updating 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 dd41068..12dc08b 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.03 +Version: 2.04 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson -- GitLab From 0ae101810b445683f61eaeee386913e04ef9e11d Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Fri, 22 Aug 2025 15:49:08 -0400 Subject: [PATCH 08/12] somehow messed up the PIXI_TASK variable in nsd-app-wrap.sh, all fixed now --- src/nsd-app-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index 6f4154b..1f18fcb 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -104,7 +104,7 @@ pixi_launch() { shift # This grabs everything past the first argument - PIXI_TASK="${@}" + PIXI_TASK="${*}" path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" -- GitLab From a7e605499c5be48ed4414fc13c44468247427bdb Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Tue, 26 Aug 2025 13:41:31 -0400 Subject: [PATCH 09/12] adding nr_launcher --- src/nr_launcher | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/nr_launcher b/src/nr_launcher index a21a2e4..a5fabf3 100644 --- a/src/nr_launcher +++ b/src/nr_launcher @@ -1,22 +1,2 @@ #!/bin/bash - -# select the environment to use -CONDA_ENVIRON=refl1d - -# check if the conda environment exists -if ! conda env list | \grep -q "^${CONDA_ENVIRON}[[:space:]]"; then - CONDA_ENVIRON=refl1d-qa -fi - -if [ -v CONDA_ENVIRON ]; then - # 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, location, arguments passed to this script - args=("${CONDA_ENVIRON}" "source" "/SNS/REF_L/shared/launcher/nsd_app_wrap_nr_launcher.sh" "$@") - - # start the application - activate_and_launch "${args[@]}" -fi +cd /SNS/REF_L/shared/launcher; python launcher.py -- GitLab From 1798f23d42c1cc21777ecaa032c643ee5b0ca2d6 Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Thu, 28 Aug 2025 10:28:14 -0400 Subject: [PATCH 10/12] commenting out echo --- src/nsd-app-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index 1f18fcb..9b61cf4 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -114,7 +114,7 @@ pixi_launch() { pixi_run="pixi run --frozen --manifest-path $path_to_manifest $PIXI_TASK" - echo "pixi command: $pixi_run" + #echo "pixi command: $pixi_run" $pixi_run -- GitLab From 494250cc565b24b03e12f22cee263cc08eccc5fe Mon Sep 17 00:00:00 2001 From: Randall Petras Date: Thu, 28 Aug 2025 10:32:09 -0400 Subject: [PATCH 11/12] version number to 2.6 --- 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 12dc08b..b8095c9 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.04 +Version: 2.6 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson -- GitLab From d29437b8be1b0fe1e744e5f5975b7ad61f3878b4 Mon Sep 17 00:00:00 2001 From: "Petras, Randy" Date: Thu, 28 Aug 2025 14:45:49 +0000 Subject: [PATCH 12/12] Edit nsd-app-wrap.spec version 2.7 --- 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 7b731fa..40219da 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.6 +Version: 2.7 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson -- GitLab