From 7a301be22eacb1a7717dc2eda19750c08af915bb Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 14:51:30 +0100 Subject: [PATCH 01/89] add build and test ci --- .github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..059f9cc --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +--- +name: CI +on: # yamllint disable-line rule:truthy + push: + branches: + - main + - 'releases/**' + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +permissions: read-all + +jobs: + build: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Build + run: | + ./admin/install_mule.sh ./_build/lib ./_build/bin + - name: Test + run: | + cd _build/lib + for name in ./*; do + python -m unittest discover -v $name.tests + done diff --git a/.gitignore b/.gitignore index 8be4a88..fcbaa4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ # Gitignore created from github template +_build/ + # Virtual environment .venv/ uv.lock From 55a9c1014ed10ae393a736a94956a30b2e2d6a87 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 14:57:24 +0100 Subject: [PATCH 02/89] try removing quotes --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 15a149a..f0d81df 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -358,7 +358,7 @@ function unpack_and_copy(){ # The egg might be zipped - if it is unzip it in place if [ ! -d $egg ] ; then - egg="$SCRATCHLIB/$module*.egg" + egg=$SCRATCHLIB/$module*.egg fi if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." From fa91750e18e628a843e9cddce2b8689be523aecc Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 14:59:30 +0100 Subject: [PATCH 03/89] test --- admin/install_mule.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index f0d81df..625f51b 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -388,6 +388,7 @@ function unpack_and_copy(){ fi } +echo $MODULE_LIST for module in $MODULE_LIST ; do unpack_and_copy $module done From 04c12b59eed605a343aa09d95682fd15d3753775 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:00:39 +0100 Subject: [PATCH 04/89] test --- admin/install_mule.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 625f51b..5cdcbb7 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -358,10 +358,11 @@ function unpack_and_copy(){ # The egg might be zipped - if it is unzip it in place if [ ! -d $egg ] ; then - egg=$SCRATCHLIB/$module*.egg + egg="$SCRATCHLIB/$module*.egg" fi if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." + ls $SCRATCHLIB unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From 0cc7a9e7a0c42d700ac412e82ffb0bdd8fe31782 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:02:58 +0100 Subject: [PATCH 05/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 5cdcbb7..9594327 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -362,7 +362,7 @@ function unpack_and_copy(){ fi if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." - ls $SCRATCHLIB + echo $egg unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From 982391b8d0ae0c9c6c89310b23bfa1df5b1d7a5a Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:05:22 +0100 Subject: [PATCH 06/89] test --- admin/install_mule.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 9594327..870d3b1 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -363,6 +363,7 @@ function unpack_and_copy(){ if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." echo $egg + echo $SCRATCHLIB unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From cfd321216e50fe08e3cf817e9036697607c5f886 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:06:04 +0100 Subject: [PATCH 07/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 870d3b1..cb29c0b 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -363,7 +363,7 @@ function unpack_and_copy(){ if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." echo $egg - echo $SCRATCHLIB + ls $SCRATCHLIB unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From 570c12812d316001368a4d56e6c734c7c77163f1 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:06:54 +0100 Subject: [PATCH 08/89] test --- admin/install_mule.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index cb29c0b..306762f 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -363,6 +363,7 @@ function unpack_and_copy(){ if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." echo $egg + echo $SCRATCHLIB ls $SCRATCHLIB unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir From 73b9c4efa287cd233055f64f7673f15a08f685ba Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:08:15 +0100 Subject: [PATCH 09/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 306762f..82d7758 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -364,7 +364,7 @@ function unpack_and_copy(){ echo "[INFO] Unpacking zipped egg..." echo $egg echo $SCRATCHLIB - ls $SCRATCHLIB + echo $(ls $SCRATCHLIB) unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From ebf591572cb23bb09b4259d71e7245b9843045fb Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:10:39 +0100 Subject: [PATCH 10/89] test --- admin/install_mule.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 82d7758..0eb425b 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -364,7 +364,10 @@ function unpack_and_copy(){ echo "[INFO] Unpacking zipped egg..." echo $egg echo $SCRATCHLIB - echo $(ls $SCRATCHLIB) + ls $SCRATCHLIB + if [ ! -f $SCRATCHLIB ] + echo "HERE" + fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From 8101b86a1a621b011d9172240dc74703d71e9bb6 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:11:38 +0100 Subject: [PATCH 11/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 0eb425b..817130b 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,7 +365,7 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -f $SCRATCHLIB ] + if [ ! -f $SCRATCHLIB ]; then echo "HERE" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg From 12b58222161609ca024a6764d66cf55414f75289 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:13:04 +0100 Subject: [PATCH 12/89] test --- admin/install_mule.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 817130b..8178b4f 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,7 +365,8 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -f $SCRATCHLIB ]; then + if [ ! -f $(dirname $SCRATCHLIB) ]; then + echo $(dirname $SCRATCHLIB) echo "HERE" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg From 46ecb97eda364eeac07073ca987b7b09e497cc36 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:13:55 +0100 Subject: [PATCH 13/89] test --- admin/install_mule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 8178b4f..638ea28 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,8 +365,8 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -f $(dirname $SCRATCHLIB) ]; then - echo $(dirname $SCRATCHLIB) + if [ ! -f $(dirname $(dirname $SCRATCHLIB)) ]; then + echo $(dirname $(dirname $SCRATCHLIB)) echo "HERE" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg From 9010fc88766e50955a29dd236706a423bae7a1b7 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:14:46 +0100 Subject: [PATCH 14/89] test --- admin/install_mule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 638ea28..da34909 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,8 +365,8 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -f $(dirname $(dirname $SCRATCHLIB)) ]; then - echo $(dirname $(dirname $SCRATCHLIB)) + if [ ! -f $(dirname $(dirname $(dirname $SCRATCHLIB))) ]; then + echo $(dirname $(dirname $(dirname $SCRATCHLIB))) echo "HERE" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg From 2711ef5cf6c36a886147b401e6e82921362405e7 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:16:25 +0100 Subject: [PATCH 15/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index da34909..b456d04 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,7 +365,7 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -f $(dirname $(dirname $(dirname $SCRATCHLIB))) ]; then + if [ ! -d $(dirname $(dirname $(dirname $SCRATCHLIB))) ]; then echo $(dirname $(dirname $(dirname $SCRATCHLIB))) echo "HERE" fi From 5cb5537022d84d0e201f1fab16e80aa653527600 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:17:05 +0100 Subject: [PATCH 16/89] test --- admin/install_mule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index b456d04..c22a381 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,8 +365,8 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -d $(dirname $(dirname $(dirname $SCRATCHLIB))) ]; then - echo $(dirname $(dirname $(dirname $SCRATCHLIB))) + if [ ! -d $(dirname $(dirname $SCRATCHLIB)) ]; then + echo $(dirname $(dirname $SCRATCHLIB)) echo "HERE" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg From d1d1c8931c71262b13aa45bb371321ff543deca9 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:18:17 +0100 Subject: [PATCH 17/89] test --- admin/install_mule.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index c22a381..2431e90 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,8 +365,9 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -d $(dirname $(dirname $SCRATCHLIB)) ]; then - echo $(dirname $(dirname $SCRATCHLIB)) + if [ ! -d $(dirname $SCRATCHLIB) ]; then + echo $(dirname $SCRATCHLIB) + ls $(dirname $SCRATCHLIB) echo "HERE" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg From c97177e2492dfe9197542d8cd8868b782aebc12c Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:19:21 +0100 Subject: [PATCH 18/89] test --- admin/install_mule.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 2431e90..aa383c8 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,9 +365,9 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB ls $SCRATCHLIB - if [ ! -d $(dirname $SCRATCHLIB) ]; then - echo $(dirname $SCRATCHLIB) - ls $(dirname $SCRATCHLIB) + if [ ! -d $SCRATCHLIB ]; then + echo $SCRATCHLIB + ls $SCRATCHLIB echo "HERE" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg From 217d6d4d78cb709913e4a1477918c69f61b0dd4d Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:20:23 +0100 Subject: [PATCH 19/89] test --- admin/install_mule.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index aa383c8..d28ad3e 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -369,6 +369,8 @@ function unpack_and_copy(){ echo $SCRATCHLIB ls $SCRATCHLIB echo "HERE" + else + echo "EXISTS" fi unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir From 4cf7114e8f830ae7789d67d9858c9fc61729812d Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:21:18 +0100 Subject: [PATCH 20/89] test --- admin/install_mule.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index d28ad3e..ff6c080 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -367,7 +367,8 @@ function unpack_and_copy(){ ls $SCRATCHLIB if [ ! -d $SCRATCHLIB ]; then echo $SCRATCHLIB - ls $SCRATCHLIB + cd $SCRATCHLIB + ls echo "HERE" else echo "EXISTS" From eaa5b057a694249270b4b8fad10e66ce94646aad Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:22:43 +0100 Subject: [PATCH 21/89] test --- admin/install_mule.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index ff6c080..5b2f098 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -364,11 +364,11 @@ function unpack_and_copy(){ echo "[INFO] Unpacking zipped egg..." echo $egg echo $SCRATCHLIB - ls $SCRATCHLIB + cd $SCRATCHLIB + pwd + ls if [ ! -d $SCRATCHLIB ]; then echo $SCRATCHLIB - cd $SCRATCHLIB - ls echo "HERE" else echo "EXISTS" From bf0fa5642d01705da9ca289911f30005ca3fd649 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:23:34 +0100 Subject: [PATCH 22/89] test --- admin/install_mule.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 5b2f098..e6515ce 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -365,6 +365,11 @@ function unpack_and_copy(){ echo $egg echo $SCRATCHLIB cd $SCRATCHLIB + echo "pwd1" + pwd + ls + cd .. + echo "pwd2" pwd ls if [ ! -d $SCRATCHLIB ]; then From 24a7db64fdadd181f25ae0cf3c6bb1f232565b90 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:24:28 +0100 Subject: [PATCH 23/89] test --- admin/install_mule.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index e6515ce..14ed6f1 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -371,13 +371,7 @@ function unpack_and_copy(){ cd .. echo "pwd2" pwd - ls - if [ ! -d $SCRATCHLIB ]; then - echo $SCRATCHLIB - echo "HERE" - else - echo "EXISTS" - fi + ls ./site-packages unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From bd4b25b63fdaceb1637ca069fd88faf036f03438 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:28:12 +0100 Subject: [PATCH 24/89] test --- admin/install_mule.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 14ed6f1..276e362 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -342,6 +342,7 @@ function install(){ echo "[INFO] Installing $module module to $SCRATCHDIR" # $mule_python_exec -m pip install . --prefix $SCRATCHDIR + echo $PYTHONPATH $mule_python_exec setup.py install --prefix $SCRATCHDIR } @@ -362,16 +363,6 @@ function unpack_and_copy(){ fi if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." - echo $egg - echo $SCRATCHLIB - cd $SCRATCHLIB - echo "pwd1" - pwd - ls - cd .. - echo "pwd2" - pwd - ls ./site-packages unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir @@ -398,7 +389,6 @@ function unpack_and_copy(){ fi } -echo $MODULE_LIST for module in $MODULE_LIST ; do unpack_and_copy $module done From 64a7f1fd1448194fadc0c1723f1c51324400de08 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:31:08 +0100 Subject: [PATCH 25/89] test --- admin/install_mule.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 276e362..2e597a4 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -140,7 +140,7 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) -SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/dist-packages # Make relative paths absolute if [ ! ${LIB_DEST:0:1} == "/" ] ; then @@ -343,6 +343,7 @@ function install(){ echo "[INFO] Installing $module module to $SCRATCHDIR" # $mule_python_exec -m pip install . --prefix $SCRATCHDIR echo $PYTHONPATH + echo $SCRATCHDIR $mule_python_exec setup.py install --prefix $SCRATCHDIR } From 281c1e30b91f3d5b4b0a588eb139f232c8824be6 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:32:14 +0100 Subject: [PATCH 26/89] test --- admin/install_mule.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 2e597a4..9c64d65 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -204,6 +204,8 @@ ln -s $SCRATCHDIR/lib $SCRATCHDIR/lib64 # The install command will complain if this directory isn't on the path # so add it to the path here +echo "here" +echo $SCRATCHLIB export PYTHONPATH=${PYTHONPATH-""}:$SCRATCHLIB # Save a reference to the top-level directory From 0fa5ec75cfa69a31c9a5ab46ae91f7247994ec1d Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:33:46 +0100 Subject: [PATCH 27/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 9c64d65..54daa01 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -140,7 +140,7 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) -SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/dist-packages +SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages # Make relative paths absolute if [ ! ${LIB_DEST:0:1} == "/" ] ; then From 54af5c105f0fd114a1aa8713a65790d85a11291a Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:36:30 +0100 Subject: [PATCH 28/89] test --- admin/install_mule.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 54daa01..8b062c7 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -140,7 +140,7 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) -SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/dist-packages # Make relative paths absolute if [ ! ${LIB_DEST:0:1} == "/" ] ; then @@ -204,8 +204,6 @@ ln -s $SCRATCHDIR/lib $SCRATCHDIR/lib64 # The install command will complain if this directory isn't on the path # so add it to the path here -echo "here" -echo $SCRATCHLIB export PYTHONPATH=${PYTHONPATH-""}:$SCRATCHLIB # Save a reference to the top-level directory @@ -344,8 +342,6 @@ function install(){ echo "[INFO] Installing $module module to $SCRATCHDIR" # $mule_python_exec -m pip install . --prefix $SCRATCHDIR - echo $PYTHONPATH - echo $SCRATCHDIR $mule_python_exec setup.py install --prefix $SCRATCHDIR } @@ -366,6 +362,7 @@ function unpack_and_copy(){ fi if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." + find -name *.egg* $SCRATCHDIR unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From 1ae1521776c565ef6742b9fafae5e7fe1d939a7a Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:39:04 +0100 Subject: [PATCH 29/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 8b062c7..e63707b 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -362,7 +362,7 @@ function unpack_and_copy(){ fi if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." - find -name *.egg* $SCRATCHDIR + find $SCRATCHDIR -name '*.egg*' unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From 42e9077167ff527e5aa2c2e3c5e307a6bfabab50 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:45:50 +0100 Subject: [PATCH 30/89] test --- admin/install_mule.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index e63707b..1bc3b3d 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -342,7 +342,8 @@ function install(){ echo "[INFO] Installing $module module to $SCRATCHDIR" # $mule_python_exec -m pip install . --prefix $SCRATCHDIR - $mule_python_exec setup.py install --prefix $SCRATCHDIR + + $mule_python_exec setup.py install --prefix $SCRATCHLIB } for module in $MODULE_LIST ; do From c528b1a7e5802fe7ff853d7551fa0445a9c44e61 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:52:50 +0100 Subject: [PATCH 31/89] test --- admin/install_mule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 1bc3b3d..08818d0 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -201,6 +201,7 @@ fi # Make a temporary directory to hold the installs mkdir -p $SCRATCHLIB ln -s $SCRATCHDIR/lib $SCRATCHDIR/lib64 +ln -s $SCRATCHDIR $SCRATCHDIR/local # The install command will complain if this directory isn't on the path # so add it to the path here @@ -342,8 +343,7 @@ function install(){ echo "[INFO] Installing $module module to $SCRATCHDIR" # $mule_python_exec -m pip install . --prefix $SCRATCHDIR - - $mule_python_exec setup.py install --prefix $SCRATCHLIB + $mule_python_exec setup.py install --prefix $SCRATCHDIR } for module in $MODULE_LIST ; do From 6af77df7e3c512901e29ec7df73515d8044100d1 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:54:10 +0100 Subject: [PATCH 32/89] test --- admin/install_mule.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 08818d0..a69ae5a 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -364,6 +364,7 @@ function unpack_and_copy(){ if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." find $SCRATCHDIR -name '*.egg*' + ls $SCRATCHDIR unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From a57fec45ae065f758ae9c9a712247e63e28df778 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:56:50 +0100 Subject: [PATCH 33/89] test --- admin/install_mule.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index a69ae5a..0495a64 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -364,12 +364,13 @@ function unpack_and_copy(){ if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." find $SCRATCHDIR -name '*.egg*' - ls $SCRATCHDIR unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir fi + ls $SCRATCHDIR + destdir=$LIB_DEST/$module echo "[INFO] Installing $module to $destdir" mkdir -p $destdir From b7b630eb6320a7f6ecfcacce50a4eff7b3c3be04 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 15:59:05 +0100 Subject: [PATCH 34/89] test --- admin/install_mule.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 0495a64..ac279d9 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -369,6 +369,7 @@ function unpack_and_copy(){ egg=$unzip_dir fi + echo "HERE" ls $SCRATCHDIR destdir=$LIB_DEST/$module From 47b31dd623533c57ded7ee851dbc9d82a3993822 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 16:01:17 +0100 Subject: [PATCH 35/89] test --- .github/workflows/ci.yaml | 2 ++ admin/install_mule.sh | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 059f9cc..4c8be1e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,8 @@ jobs: ./admin/install_mule.sh ./_build/lib ./_build/bin - name: Test run: | + pwd + ls cd _build/lib for name in ./*; do python -m unittest discover -v $name.tests diff --git a/admin/install_mule.sh b/admin/install_mule.sh index ac279d9..08818d0 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -369,9 +369,6 @@ function unpack_and_copy(){ egg=$unzip_dir fi - echo "HERE" - ls $SCRATCHDIR - destdir=$LIB_DEST/$module echo "[INFO] Installing $module to $destdir" mkdir -p $destdir From 482b0397db27ce90529f24e10fdfa9e7fcdb1216 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 16:02:13 +0100 Subject: [PATCH 36/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4c8be1e..1a749ec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,9 +24,9 @@ jobs: ./admin/install_mule.sh ./_build/lib ./_build/bin - name: Test run: | + cd _build/lib pwd ls - cd _build/lib for name in ./*; do python -m unittest discover -v $name.tests done From d86ab998315ba7cc574c89106802fba4ca1a0778 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 16:03:06 +0100 Subject: [PATCH 37/89] test --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1a749ec..f7ebfc5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,7 @@ jobs: cd _build/lib pwd ls + ls mule for name in ./*; do python -m unittest discover -v $name.tests done From 48ed6ea92f094bcdd3c30fd2ce6ef49cd6b48045 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 16:10:39 +0100 Subject: [PATCH 38/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f7ebfc5..a26bd35 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: cd _build/lib pwd ls - ls mule + ls mule/tests for name in ./*; do python -m unittest discover -v $name.tests done From 07f7e405e89286c2659c974c402e02cf8e4a0d61 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 16:15:43 +0100 Subject: [PATCH 39/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 08818d0..ff99b36 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -140,7 +140,7 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) -SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/dist-packages +SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages # Make relative paths absolute if [ ! ${LIB_DEST:0:1} == "/" ] ; then From f08c15c05c21a09670883044a8c5ab9ed92be1d7 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 16:50:36 +0100 Subject: [PATCH 40/89] test --- admin/install_mule.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index ff99b36..b5f55e5 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -201,7 +201,6 @@ fi # Make a temporary directory to hold the installs mkdir -p $SCRATCHLIB ln -s $SCRATCHDIR/lib $SCRATCHDIR/lib64 -ln -s $SCRATCHDIR $SCRATCHDIR/local # The install command will complain if this directory isn't on the path # so add it to the path here From 0760f5db4b8680b33750cc6a8b3df74574f19355 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 17:03:40 +0100 Subject: [PATCH 41/89] test --- admin/install_mule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index b5f55e5..5ca01f4 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -341,8 +341,8 @@ function install(){ cd $wc_root/$module echo "[INFO] Installing $module module to $SCRATCHDIR" - # $mule_python_exec -m pip install . --prefix $SCRATCHDIR - $mule_python_exec setup.py install --prefix $SCRATCHDIR + $mule_python_exec -m pip install . --prefix $SCRATCHDIR + # $mule_python_exec setup.py install --prefix $SCRATCHDIR } for module in $MODULE_LIST ; do From 83f4fa5b12d15a6bf7f21010d0bde28e7dfb6c9a Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 17:05:20 +0100 Subject: [PATCH 42/89] test --- admin/install_mule.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 5ca01f4..5f859fe 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -356,6 +356,8 @@ function unpack_and_copy(){ module=$1 egg=$SCRATCHLIB/$module + ls $SCRATCHDIR + # The egg might be zipped - if it is unzip it in place if [ ! -d $egg ] ; then egg="$SCRATCHLIB/$module*.egg" From 4d64bc5ba36a14721e1ba786e28d2a1ca4945594 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 17:22:50 +0100 Subject: [PATCH 43/89] test --- admin/install_mule.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 5f859fe..51b1b56 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -140,7 +140,12 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) -SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") +if [[ $pkg_loc == *"site-packages"* ]]; then + SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +else + SCRATCHLIB=$SCRATCHDIR/loc/lib/$PYTHONEXEC/dist-packages +fi # Make relative paths absolute if [ ! ${LIB_DEST:0:1} == "/" ] ; then @@ -341,8 +346,8 @@ function install(){ cd $wc_root/$module echo "[INFO] Installing $module module to $SCRATCHDIR" - $mule_python_exec -m pip install . --prefix $SCRATCHDIR - # $mule_python_exec setup.py install --prefix $SCRATCHDIR + # $mule_python_exec -m pip install . --prefix $SCRATCHDIR + $mule_python_exec setup.py install --prefix $SCRATCHDIR } for module in $MODULE_LIST ; do From 281466d4252bbaf17aad2560373cd5bf13ba1db1 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Wed, 1 Oct 2025 17:23:43 +0100 Subject: [PATCH 44/89] test --- admin/install_mule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 51b1b56..54e8fea 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -144,7 +144,7 @@ pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") if [[ $pkg_loc == *"site-packages"* ]]; then SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages else - SCRATCHLIB=$SCRATCHDIR/loc/lib/$PYTHONEXEC/dist-packages + SCRATCHLIB=$SCRATCHDIR/local/lib/$PYTHONEXEC/dist-packages fi # Make relative paths absolute From b6fa17f8ffb7e72125793a9c13eeb05cff3ad001 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 08:00:55 +0100 Subject: [PATCH 45/89] test --- admin/install_mule.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 54e8fea..17d80c2 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -141,11 +141,17 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") -if [[ $pkg_loc == *"site-packages"* ]]; then - SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +if [[ $pkg_loc == *"dist-packages"* ]]; then + debian_like=true else + debian_like=false +fi +if $debian_like; then SCRATCHLIB=$SCRATCHDIR/local/lib/$PYTHONEXEC/dist-packages +else + SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages fi +echo "SCRATCHLIB $SCRATCHLIB" # Make relative paths absolute if [ ! ${LIB_DEST:0:1} == "/" ] ; then @@ -392,6 +398,9 @@ function unpack_and_copy(){ else cp -vr $egg*.*-info $BIN_DEST fi + echo "Trying to copy" + ls $SCRATCHDIR + ls $SCRATCHDIR/local cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ fi } From deede5ec380d57aeb4582401a7ff8c400baa25f3 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 08:03:34 +0100 Subject: [PATCH 46/89] test --- admin/install_mule.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 17d80c2..198e6c7 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -400,6 +400,7 @@ function unpack_and_copy(){ fi echo "Trying to copy" ls $SCRATCHDIR + echo "HERE" ls $SCRATCHDIR/local cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ fi From 2170b172cbee12f76d870cbb434758a1e8f606ba Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 08:04:45 +0100 Subject: [PATCH 47/89] test --- admin/install_mule.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 198e6c7..c4ce2b2 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -398,11 +398,11 @@ function unpack_and_copy(){ else cp -vr $egg*.*-info $BIN_DEST fi - echo "Trying to copy" - ls $SCRATCHDIR - echo "HERE" - ls $SCRATCHDIR/local - cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ + if $debian_like; then + cp -vr $SCRATCHDIR/local/bin/* $BIN_DEST/ + else + cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ + fi fi } From 75d49cd06be363712bab2971df204a4d5abe3c92 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 08:27:01 +0100 Subject: [PATCH 48/89] test --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a26bd35..50f3cff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,7 @@ jobs: cd _build/lib pwd ls + echo "HERE" ls mule/tests for name in ./*; do python -m unittest discover -v $name.tests From e524a527a143e697dc8b9e01ae5c159b860829f4 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 08:29:35 +0100 Subject: [PATCH 49/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 50f3cff..e7438ae 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,7 +28,7 @@ jobs: pwd ls echo "HERE" - ls mule/tests + ls -lh mule/tests for name in ./*; do python -m unittest discover -v $name.tests done From 3e0bbb9c32db9e31a8ddc67525f8000d88b60ebf Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:02:30 +0100 Subject: [PATCH 50/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e7438ae..8320ff2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ permissions: read-all jobs: build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 timeout-minutes: 5 steps: From 6d031b3d84379b91d5088367e8946034228da8bb Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:04:38 +0100 Subject: [PATCH 51/89] test --- admin/install_mule.sh | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index c4ce2b2..4a57f36 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -140,17 +140,18 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) -pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") -if [[ $pkg_loc == *"dist-packages"* ]]; then - debian_like=true -else - debian_like=false -fi -if $debian_like; then - SCRATCHLIB=$SCRATCHDIR/local/lib/$PYTHONEXEC/dist-packages -else - SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages -fi +# pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") +# if [[ $pkg_loc == *"dist-packages"* ]]; then +# debian_like=true +# else +# debian_like=false +# fi +# if $debian_like; then +# SCRATCHLIB=$SCRATCHDIR/local/lib/$PYTHONEXEC/dist-packages +# else +# SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +# fi +SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages echo "SCRATCHLIB $SCRATCHLIB" # Make relative paths absolute @@ -398,11 +399,12 @@ function unpack_and_copy(){ else cp -vr $egg*.*-info $BIN_DEST fi - if $debian_like; then - cp -vr $SCRATCHDIR/local/bin/* $BIN_DEST/ - else - cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ - fi + # if $debian_like; then + # cp -vr $SCRATCHDIR/local/bin/* $BIN_DEST/ + # else + # cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ + # fi + cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ fi } From 9a938fa14d9f6e15e4182ab327636ede509e4aaa Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:12:03 +0100 Subject: [PATCH 52/89] test --- admin/install_mule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 4a57f36..8f7a51a 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -353,8 +353,8 @@ function install(){ cd $wc_root/$module echo "[INFO] Installing $module module to $SCRATCHDIR" - # $mule_python_exec -m pip install . --prefix $SCRATCHDIR - $mule_python_exec setup.py install --prefix $SCRATCHDIR + $mule_python_exec -m pip install . --prefix $SCRATCHDIR + # $mule_python_exec setup.py install --prefix $SCRATCHDIR } for module in $MODULE_LIST ; do From 5fa642b5101eaf65e531b41c7e1db6ad7709431e Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:13:23 +0100 Subject: [PATCH 53/89] test --- admin/install_mule.sh | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 8f7a51a..4cc8a52 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -140,18 +140,17 @@ echo "[INFO] Installing against Python $PYTHONVER" # Setup a temporary directory where the install will be initially created SCRATCHDIR=$(mktemp -d) -# pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") -# if [[ $pkg_loc == *"dist-packages"* ]]; then -# debian_like=true -# else -# debian_like=false -# fi -# if $debian_like; then -# SCRATCHLIB=$SCRATCHDIR/local/lib/$PYTHONEXEC/dist-packages -# else -# SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages -# fi -SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") +if [[ $pkg_loc == *"dist-packages"* ]]; then + debian_like=true +else + debian_like=false +fi +if $debian_like; then + SCRATCHLIB=$SCRATCHDIR/local/lib/$PYTHONEXEC/dist-packages +else + SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages +fi echo "SCRATCHLIB $SCRATCHLIB" # Make relative paths absolute @@ -399,12 +398,11 @@ function unpack_and_copy(){ else cp -vr $egg*.*-info $BIN_DEST fi - # if $debian_like; then - # cp -vr $SCRATCHDIR/local/bin/* $BIN_DEST/ - # else - # cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ - # fi - cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ + if $debian_like; then + cp -vr $SCRATCHDIR/local/bin/* $BIN_DEST/ + else + cp -vr $SCRATCHDIR/bin/* $BIN_DEST/ + fi fi } From d1ea913f591044862eafa66ca83e240e5879dc80 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:14:31 +0100 Subject: [PATCH 54/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8320ff2..e7438ae 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ permissions: read-all jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 5 steps: From 9cbeeaf04c027a8afc15850ccbff3323d3e502a8 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:16:46 +0100 Subject: [PATCH 55/89] test --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e7438ae..41dc48b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,5 +30,7 @@ jobs: echo "HERE" ls -lh mule/tests for name in ./*; do - python -m unittest discover -v $name.tests + cd $name/tests + python -m unittest discover -v . + cd ../.. done From ab22a61c3c65173af179a31960dd9a2022e0c07d Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:17:57 +0100 Subject: [PATCH 56/89] test --- admin/install_mule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 4cc8a52..c4ce2b2 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -352,8 +352,8 @@ function install(){ cd $wc_root/$module echo "[INFO] Installing $module module to $SCRATCHDIR" - $mule_python_exec -m pip install . --prefix $SCRATCHDIR - # $mule_python_exec setup.py install --prefix $SCRATCHDIR + # $mule_python_exec -m pip install . --prefix $SCRATCHDIR + $mule_python_exec setup.py install --prefix $SCRATCHDIR } for module in $MODULE_LIST ; do From 0008999c00924415ea0f698e8714b4ef6384d760 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:26:11 +0100 Subject: [PATCH 57/89] test --- .github/workflows/ci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 41dc48b..7d171d3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,6 +17,12 @@ jobs: timeout-minutes: 5 steps: + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: '3.13' + cache: 'pip' + run: pip install numpy - name: Checkout repository uses: actions/checkout@v4 - name: Build From bbea4aefcf6e54836a8f8af0c184cfc84916b6b4 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:30:28 +0100 Subject: [PATCH 58/89] test --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7d171d3..22bda4b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,9 @@ jobs: with: python-version: '3.13' cache: 'pip' - run: pip install numpy + - name: Install Numpy + run: | + pip install numpy - name: Checkout repository uses: actions/checkout@v4 - name: Build From 13c15a3536d1c13b98c693b16152d26607bdbdef Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:33:20 +0100 Subject: [PATCH 59/89] test --- mule/requirements.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mule/requirements.txt diff --git a/mule/requirements.txt b/mule/requirements.txt new file mode 100644 index 0000000..e69de29 From 522088f6b5cfb3936e00b23e89b3701007b1e7c7 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:34:12 +0100 Subject: [PATCH 60/89] test --- .github/workflows/ci.yaml | 4 ++-- mule/requirements.txt | 0 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 mule/requirements.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 22bda4b..5110d43 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,6 +17,8 @@ jobs: timeout-minutes: 5 steps: + - name: Checkout repository + uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v6 with: @@ -25,8 +27,6 @@ jobs: - name: Install Numpy run: | pip install numpy - - name: Checkout repository - uses: actions/checkout@v4 - name: Build run: | ./admin/install_mule.sh ./_build/lib ./_build/bin diff --git a/mule/requirements.txt b/mule/requirements.txt deleted file mode 100644 index e69de29..0000000 From d1d57cc784d7a19f82669e698f3151bbee693b75 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:38:33 +0100 Subject: [PATCH 61/89] test --- .github/workflows/ci.yaml | 4 ++-- pyproject.toml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5110d43..e903d51 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,9 +24,9 @@ jobs: with: python-version: '3.13' cache: 'pip' - - name: Install Numpy + - name: Install Python Dependencies run: | - pip install numpy + pip install . - name: Build run: | ./admin/install_mule.sh ./_build/lib ./_build/bin diff --git a/pyproject.toml b/pyproject.toml index 31d57c7..61d30e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,8 @@ description = "API for interacting with UM output files" readme = "README.md" requires-python = ">=3.12.9" dependencies = [ + "numpy == 2.2.6", + "setuptools", "cpplint == 2.0.2", "ruff==0.12.1", "shellcheck-py==0.10.0.1", From ff747bac3bd8aeaac964ef142f415b98363f5dde Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:39:32 +0100 Subject: [PATCH 62/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e903d51..7129c2c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: cache: 'pip' - name: Install Python Dependencies run: | - pip install . + pip install -r pyproject.toml - name: Build run: | ./admin/install_mule.sh ./_build/lib ./_build/bin From 2bb28b45e74fe2af3e9ae1d9fc86c3dfd95462b0 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:41:05 +0100 Subject: [PATCH 63/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7129c2c..5c82117 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: cache: 'pip' - name: Install Python Dependencies run: | - pip install -r pyproject.toml + pip install -r requirements.txt - name: Build run: | ./admin/install_mule.sh ./_build/lib ./_build/bin From d6d119f81571773bc425f54782e6766f2b02230c Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:41:41 +0100 Subject: [PATCH 64/89] test --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b6e6ed0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +numpy==2.2.6 +setuptools From b452d9d7a89ebb7af0888229ecfb337293a1d1ee Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:42:28 +0100 Subject: [PATCH 65/89] test --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b6e6ed0..e065b95 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ numpy==2.2.6 setuptools +six From 6c536f81521cbc3a87c1360b205a283991718032 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:43:53 +0100 Subject: [PATCH 66/89] test --- .github/workflows/ci.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5c82117..fa46aef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,5 @@ jobs: echo "HERE" ls -lh mule/tests for name in ./*; do - cd $name/tests - python -m unittest discover -v . - cd ../.. + python -m unittest discover -v $name.tests done From 41425e75040391114323fe2496ea5017d896913e Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:49:42 +0100 Subject: [PATCH 67/89] test --- .github/workflows/ci.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fa46aef..b06d8da 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,6 +37,4 @@ jobs: ls echo "HERE" ls -lh mule/tests - for name in ./*; do - python -m unittest discover -v $name.tests - done + python -c "import mule ; print(mule.__version__)" From 935c1e17050e040f511f76d45d112008e4a7cc0e Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:54:03 +0100 Subject: [PATCH 68/89] test --- .github/workflows/ci.yaml | 12 ++++-------- pyproject.toml | 2 ++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b06d8da..f41cfde 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,14 +19,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v6 - with: - python-version: '3.13' - cache: 'pip' - - name: Install Python Dependencies - run: | - pip install -r requirements.txt + - name: Setup uv + uses: astral-sh/setup-uv@v6 + - name: Install dependencies + run: uv sync - name: Build run: | ./admin/install_mule.sh ./_build/lib ./_build/bin diff --git a/pyproject.toml b/pyproject.toml index 61d30e5..740e2d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,10 @@ description = "API for interacting with UM output files" readme = "README.md" requires-python = ">=3.12.9" dependencies = [ + "python == 3.13", "numpy == 2.2.6", "setuptools", + "six", "cpplint == 2.0.2", "ruff==0.12.1", "shellcheck-py==0.10.0.1", From 71b784d139d0dc6af5b989701d8f072d6a7a7f17 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:55:21 +0100 Subject: [PATCH 69/89] test --- .github/workflows/ci.yaml | 12 ++++++++---- pyproject.toml | 4 ---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f41cfde..b06d8da 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,14 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup uv - uses: astral-sh/setup-uv@v6 - - name: Install dependencies - run: uv sync + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: '3.13' + cache: 'pip' + - name: Install Python Dependencies + run: | + pip install -r requirements.txt - name: Build run: | ./admin/install_mule.sh ./_build/lib ./_build/bin diff --git a/pyproject.toml b/pyproject.toml index 740e2d9..31d57c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,10 +5,6 @@ description = "API for interacting with UM output files" readme = "README.md" requires-python = ">=3.12.9" dependencies = [ - "python == 3.13", - "numpy == 2.2.6", - "setuptools", - "six", "cpplint == 2.0.2", "ruff==0.12.1", "shellcheck-py==0.10.0.1", From 0fbc5c42c375b71aeabe624bccf1819d0e44c937 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 09:59:01 +0100 Subject: [PATCH 70/89] test --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b06d8da..5a43cf0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,3 +38,6 @@ jobs: echo "HERE" ls -lh mule/tests python -c "import mule ; print(mule.__version__)" + for name in ./*; do + python -m unittest discover -v $name.tests + done From 400bb212d07c6751e1ada49b9e94993876cb03aa Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 10:00:40 +0100 Subject: [PATCH 71/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5a43cf0..5606e4a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,5 +39,5 @@ jobs: ls -lh mule/tests python -c "import mule ; print(mule.__version__)" for name in ./*; do - python -m unittest discover -v $name.tests + python -m unittest discover -v mule.tests done From 5ea69cc16cd5f93e6f4a0d4bec6955b9e1fe16e3 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 10:01:49 +0100 Subject: [PATCH 72/89] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5606e4a..e649759 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,5 +39,5 @@ jobs: ls -lh mule/tests python -c "import mule ; print(mule.__version__)" for name in ./*; do - python -m unittest discover -v mule.tests + python -m unittest discover -v ${name##*/}.tests done From 8d2355a188c1fcfc3401abaec2886f2abfd05ecb Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 10:12:56 +0100 Subject: [PATCH 73/89] test --- .github/workflows/ci.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e649759..9ef2c52 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,11 @@ jobs: timeout-minutes: 5 steps: - - name: Checkout repository + - name: Checkout Shumlib + uses: actions/checkout@v4 + with: + repository: "MetOffice/Shumlib" + - name: Checkout Mule uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v6 From d39cf389dbd9241e3855849127b7a4b719123f2b Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 10:15:29 +0100 Subject: [PATCH 74/89] test --- .github/workflows/ci.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9ef2c52..1f6be71 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,10 +17,6 @@ jobs: timeout-minutes: 5 steps: - - name: Checkout Shumlib - uses: actions/checkout@v4 - with: - repository: "MetOffice/Shumlib" - name: Checkout Mule uses: actions/checkout@v4 - name: Setup Python From 248139ce85cd8333309afc33fec831f5d5a8236d Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 10:34:49 +0100 Subject: [PATCH 75/89] update unit tests --- .../tests/integration/test_DataOperator.py | 21 +++++++++++-------- mule/lib/mule/tests/unit/test_pp.py | 18 ++++++++++------ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/mule/lib/mule/tests/integration/test_DataOperator.py b/mule/lib/mule/tests/integration/test_DataOperator.py index d65c01f..c97907a 100644 --- a/mule/lib/mule/tests/integration/test_DataOperator.py +++ b/mule/lib/mule/tests/integration/test_DataOperator.py @@ -59,15 +59,18 @@ def test(self): ff.integer_constants.num_cols = num_cols // 4 ff.real_constants.col_spacing = col_spacing*4 with self.temp_filename() as temp_path: - ff.to_file(temp_path) - ff_back = FieldsFile.from_file(temp_path) - self.assertEqual(ff_back.integer_constants.num_cols, num_cols // 4) - self.assertEqual(ff_back.real_constants.col_spacing, col_spacing*4) - self.assertEqual(ff_back.fields[0].lbnpt, num_cols // 4) - self.assertEqual(ff_back.fields[0].bdx, col_spacing*4) - self.assertEqual(ff_back.fields[1].lbnpt, num_cols//4) - self.assertEqual(ff_back.fields[1].bdx, col_spacing*4) - self.assertEqual(ff_back.fields[1].get_data().shape, (73, 24)) + try: + ff.to_file(temp_path) + ff_back = FieldsFile.from_file(temp_path) + self.assertEqual(ff_back.integer_constants.num_cols, num_cols // 4) + self.assertEqual(ff_back.real_constants.col_spacing, col_spacing*4) + self.assertEqual(ff_back.fields[0].lbnpt, num_cols // 4) + self.assertEqual(ff_back.fields[0].bdx, col_spacing*4) + self.assertEqual(ff_back.fields[1].lbnpt, num_cols//4) + self.assertEqual(ff_back.fields[1].bdx, col_spacing*4) + self.assertEqual(ff_back.fields[1].get_data().shape, (73, 24)) + except NotImplementedError: + self.skipTest("Skipping tests as WGDOS packing library unavailable") if __name__ == '__main__': diff --git a/mule/lib/mule/tests/unit/test_pp.py b/mule/lib/mule/tests/unit/test_pp.py index 376f244..9744021 100644 --- a/mule/lib/mule/tests/unit/test_pp.py +++ b/mule/lib/mule/tests/unit/test_pp.py @@ -67,9 +67,12 @@ def test_read_ppfile_fix_grid(self, fname=None): self.assertEqual(field.lbrel, rel) self.assertEqual(field.lbvc, vc) - data = field.get_data() - self.assertEqual(data.shape[0], field.lbrow) - self.assertEqual(data.shape[1], field.lbnpt) + try: + data = field.get_data() + self.assertEqual(data.shape[0], field.lbrow) + self.assertEqual(data.shape[1], field.lbnpt) + except NotImplementedError: + self.skipTest("Skipping tests as WGDOS packing library unavailable") def test_read_ppfile_var_grid(self, fname=None): @@ -85,9 +88,12 @@ def test_read_ppfile_var_grid(self, fname=None): self.assertEqual(field.lbrel, 3) self.assertEqual(field.lbvc, 65) - data = field.get_data() - self.assertEqual(data.shape[0], field.lbrow) - self.assertEqual(data.shape[1], field.lbnpt) + try: + data = field.get_data() + self.assertEqual(data.shape[0], field.lbrow) + self.assertEqual(data.shape[1], field.lbnpt) + except NotImplementedError: + print("Skipping tests as WGDOS packing library unavailable") expected_extra = [1, 2, 12, 13, 14, 15] self.assertEqual(len(field.pp_extra_data), 6) From 8ab60d7732f225c30b909f4c61f3ced7e9444b80 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 10:37:48 +0100 Subject: [PATCH 76/89] working unit tests --- .github/workflows/ci.yaml | 5 ----- admin/install_mule.sh | 2 -- 2 files changed, 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f6be71..5fa328c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,11 +33,6 @@ jobs: - name: Test run: | cd _build/lib - pwd - ls - echo "HERE" - ls -lh mule/tests - python -c "import mule ; print(mule.__version__)" for name in ./*; do python -m unittest discover -v ${name##*/}.tests done diff --git a/admin/install_mule.sh b/admin/install_mule.sh index c4ce2b2..982a9f8 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -367,8 +367,6 @@ function unpack_and_copy(){ module=$1 egg=$SCRATCHLIB/$module - ls $SCRATCHDIR - # The egg might be zipped - if it is unzip it in place if [ ! -d $egg ] ; then egg="$SCRATCHLIB/$module*.egg" From fa71ba94841751f256af011f3c8c8017515d5024 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 10:38:10 +0100 Subject: [PATCH 77/89] save file --- admin/install_mule.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 982a9f8..0a8d488 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -373,7 +373,6 @@ function unpack_and_copy(){ fi if [ ! -d $egg ] ; then echo "[INFO] Unpacking zipped egg..." - find $SCRATCHDIR -name '*.egg*' unzip_dir=$SCRATCHLIB/${module}_unzipped_egg unzip $egg -d $unzip_dir egg=$unzip_dir From 664b43b0692fd6a692fc6141c0e6741f749bb20a Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 11:56:36 +0100 Subject: [PATCH 78/89] update urls --- um_packing/pyproject.toml | 2 +- um_packing/setup.py | 2 +- um_ppibm/pyproject.toml | 2 +- um_ppibm/setup.py | 2 +- um_spiral_search/pyproject.toml | 2 +- um_spiral_search/setup.py | 2 +- um_sstpert/pyproject.toml | 2 +- um_sstpert/setup.py | 2 +- um_utils/pyproject.toml | 2 +- um_utils/setup.py | 2 +- um_wafccb/pyproject.toml | 2 +- um_wafccb/setup.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/um_packing/pyproject.toml b/um_packing/pyproject.toml index 0abe9ac..8e5ff69 100644 --- a/um_packing/pyproject.toml +++ b/um_packing/pyproject.toml @@ -1,4 +1,4 @@ # pyproject.toml [build-system] requires = ["setuptools >= 42.0.0", "numpy"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/um_packing/setup.py b/um_packing/setup.py index 9dc9cdb..5b4229c 100644 --- a/um_packing/setup.py +++ b/um_packing/setup.py @@ -55,7 +55,7 @@ def run(self): version="2024.11.1", description="Unified Model packing library extension", author="UM Systems Team", - url="https://code.metoffice.gov.uk/trac/um", + url="https://github.com/metoffice/mule", cmdclass={"clean": CleanCommand}, package_dir={"": "lib"}, packages=["um_packing", "um_packing.tests"], diff --git a/um_ppibm/pyproject.toml b/um_ppibm/pyproject.toml index 0abe9ac..8e5ff69 100644 --- a/um_ppibm/pyproject.toml +++ b/um_ppibm/pyproject.toml @@ -1,4 +1,4 @@ # pyproject.toml [build-system] requires = ["setuptools >= 42.0.0", "numpy"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/um_ppibm/setup.py b/um_ppibm/setup.py index be62a7c..919daf2 100644 --- a/um_ppibm/setup.py +++ b/um_ppibm/setup.py @@ -55,7 +55,7 @@ def run(self): version="2024.11.1", description="Unified Model pp conversion utility with IBM number format", author="UM Systems Team", - url="https://code.metoffice.gov.uk/trac/um", + url="https://github.com/metoffice/mule", cmdclass={"clean": CleanCommand}, package_dir={"": "lib"}, packages=[ diff --git a/um_spiral_search/pyproject.toml b/um_spiral_search/pyproject.toml index 0abe9ac..8e5ff69 100644 --- a/um_spiral_search/pyproject.toml +++ b/um_spiral_search/pyproject.toml @@ -1,4 +1,4 @@ # pyproject.toml [build-system] requires = ["setuptools >= 42.0.0", "numpy"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/um_spiral_search/setup.py b/um_spiral_search/setup.py index fe4f107..2159484 100644 --- a/um_spiral_search/setup.py +++ b/um_spiral_search/setup.py @@ -55,7 +55,7 @@ def run(self): version="2024.11.1", description="Unified Model Spiral Search extension", author="UM Systems Team", - url="https://code.metoffice.gov.uk/trac/um", + url="https://github.com/metoffice/mule", cmdclass={"clean": CleanCommand}, package_dir={"": "lib"}, packages=["um_spiral_search", "um_spiral_search.tests"], diff --git a/um_sstpert/pyproject.toml b/um_sstpert/pyproject.toml index 0abe9ac..8e5ff69 100644 --- a/um_sstpert/pyproject.toml +++ b/um_sstpert/pyproject.toml @@ -1,4 +1,4 @@ # pyproject.toml [build-system] requires = ["setuptools >= 42.0.0", "numpy"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/um_sstpert/setup.py b/um_sstpert/setup.py index 6d9e7d4..3ad04e7 100644 --- a/um_sstpert/setup.py +++ b/um_sstpert/setup.py @@ -55,7 +55,7 @@ def run(self): version="2024.11.1", description="Unified Model SST-perturbation extension and utility", author="UM Systems Team", - url="https://code.metoffice.gov.uk/trac/um", + url="https://github.com/metoffice/mule", cmdclass={"clean": CleanCommand}, package_dir={"": "lib"}, packages=["um_sstpert"], diff --git a/um_utils/pyproject.toml b/um_utils/pyproject.toml index 0abe9ac..8e5ff69 100644 --- a/um_utils/pyproject.toml +++ b/um_utils/pyproject.toml @@ -1,4 +1,4 @@ # pyproject.toml [build-system] requires = ["setuptools >= 42.0.0", "numpy"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/um_utils/setup.py b/um_utils/setup.py index 0052b0e..65dd4ce 100644 --- a/um_utils/setup.py +++ b/um_utils/setup.py @@ -51,7 +51,7 @@ def run(self): version="2024.11.1", description="Unified Model Fields File utilities", author="UM Systems Team", - url="https://code.metoffice.gov.uk/trac/um", + url="https://github.com/metoffice/mule", cmdclass={"clean": CleanCommand}, package_dir={"": "lib"}, packages=[ diff --git a/um_wafccb/pyproject.toml b/um_wafccb/pyproject.toml index 0abe9ac..8e5ff69 100644 --- a/um_wafccb/pyproject.toml +++ b/um_wafccb/pyproject.toml @@ -1,4 +1,4 @@ # pyproject.toml [build-system] requires = ["setuptools >= 42.0.0", "numpy"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/um_wafccb/setup.py b/um_wafccb/setup.py index d1fd17e..a0f51b6 100644 --- a/um_wafccb/setup.py +++ b/um_wafccb/setup.py @@ -55,7 +55,7 @@ def run(self): version="2024.11.1", description="Unified Model WAFC CB extension", author="UM Systems Team", - url="https://code.metoffice.gov.uk/trac/um", + url="https://github.com/metoffice/mule", cmdclass={"clean": CleanCommand}, package_dir={"": "lib"}, packages=["um_wafccb"], From 28fcbe44060809d2a359c9e747614599aad45708 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 13:12:30 +0100 Subject: [PATCH 79/89] update ci --- .github/workflows/ci.yaml | 23 +++++++++++++++-------- requirements.txt | 3 --- 2 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 requirements.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5fa328c..a9a8066 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,22 +15,29 @@ jobs: build: runs-on: ubuntu-24.04 timeout-minutes: 5 + strategy: + max-parallel: 4 + matrix: + python-version: ['3.12', '3.13'] + numpy-version: ['1.26.4', '2.2.6'] steps: - name: Checkout Mule uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v6 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 with: - python-version: '3.13' - cache: 'pip' - - name: Install Python Dependencies + python-version: ${{ matrix.python-version }} + cache: pip + - name: Install Python Dependencies ${{ matrix.numpy-version }} run: | - pip install -r requirements.txt - - name: Build + pip install setuptools + pip install six + pip install ${{ matrix.numpy-version }} + - name: Build python-${{ matrix.python-version }}_numpy-${{ matrix.numpy-version }} run: | ./admin/install_mule.sh ./_build/lib ./_build/bin - - name: Test + - name: Test python-${{ matrix.python-version }}_numpy-${{ matrix.numpy-version }} run: | cd _build/lib for name in ./*; do diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e065b95..0000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -numpy==2.2.6 -setuptools -six From defb21839572721d2bfe2bbaeb88669ad5c0e428 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 13:16:28 +0100 Subject: [PATCH 80/89] update ci --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a9a8066..b441971 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,7 +33,7 @@ jobs: run: | pip install setuptools pip install six - pip install ${{ matrix.numpy-version }} + pip install numpy==${{ matrix.numpy-version }} - name: Build python-${{ matrix.python-version }}_numpy-${{ matrix.numpy-version }} run: | ./admin/install_mule.sh ./_build/lib ./_build/bin From 6300eae3aee409c0cfa3136fdc33762a30e60203 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 13:27:12 +0100 Subject: [PATCH 81/89] exclude matric --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b441971..a226a25 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,9 @@ jobs: matrix: python-version: ['3.12', '3.13'] numpy-version: ['1.26.4', '2.2.6'] + exclude: + - python-version: "3.13" + - numpy-version: "1.26.4" steps: - name: Checkout Mule From fe9a01d10bbee4687b22d5ad67f68d66217ba87b Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 13:28:41 +0100 Subject: [PATCH 82/89] exclude matric --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a226a25..2487f9e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,8 +21,8 @@ jobs: python-version: ['3.12', '3.13'] numpy-version: ['1.26.4', '2.2.6'] exclude: - - python-version: "3.13" - - numpy-version: "1.26.4" + - python-version: '3.13' + - numpy-version: '1.26.4' steps: - name: Checkout Mule From cb3cabcf897e8e81eaa67aa9cbb887ab37fb669a Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 13:29:44 +0100 Subject: [PATCH 83/89] exclude matric --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2487f9e..0e74955 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: numpy-version: ['1.26.4', '2.2.6'] exclude: - python-version: '3.13' - - numpy-version: '1.26.4' + numpy-version: '1.26.4' steps: - name: Checkout Mule From 5082655bc1d1db056942bff223442fcdf32dd020 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 14:09:18 +0100 Subject: [PATCH 84/89] rename ci --- .github/workflows/checks.yaml | 2 +- .github/workflows/ci.yaml | 2 +- .github/workflows/docs.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index d1cf75b..889e038 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -14,7 +14,7 @@ permissions: read-all jobs: - checks: + mule-checks: runs-on: ubuntu-latest timeout-minutes: 5 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e74955..91fdf7c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ on: # yamllint disable-line rule:truthy permissions: read-all jobs: - build: + build-test-mule: runs-on: ubuntu-24.04 timeout-minutes: 5 strategy: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index bfb7730..6adf492 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -17,7 +17,7 @@ permissions: read-all jobs: - build: + mule-build-docs: runs-on: ubuntu-latest timeout-minutes: 3 From 7336486727344bd4cd2c26b48851b89d6ccfdd83 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 14:10:20 +0100 Subject: [PATCH 85/89] update docs --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6adf492..57349cf 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -51,7 +51,7 @@ jobs: deploy: if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' # Add a dependency to the build job - needs: build + needs: mule-build-docs permissions: pages: write # to deploy to Pages id-token: write # to verify the deployment originates from an appropriate source From 918db32a0929f79c924ca7c5426018c143966c93 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 14:18:02 +0100 Subject: [PATCH 86/89] rename docs --- .github/workflows/docs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 57349cf..809eb27 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -17,7 +17,7 @@ permissions: read-all jobs: - mule-build-docs: + build-docs: runs-on: ubuntu-latest timeout-minutes: 3 @@ -51,7 +51,7 @@ jobs: deploy: if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' # Add a dependency to the build job - needs: mule-build-docs + needs: build-docs permissions: pages: write # to deploy to Pages id-token: write # to verify the deployment originates from an appropriate source From 31f0c16d78622683cc48e29714f4e89875fdd67c Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 2 Oct 2025 15:26:41 +0100 Subject: [PATCH 87/89] Update admin/install_mule.sh Co-authored-by: Yaswant Pradhan <2984440+yaswant@users.noreply.github.com> --- admin/install_mule.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/admin/install_mule.sh b/admin/install_mule.sh index 0a8d488..1fb313c 100755 --- a/admin/install_mule.sh +++ b/admin/install_mule.sh @@ -143,12 +143,9 @@ SCRATCHDIR=$(mktemp -d) pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])") if [[ $pkg_loc == *"dist-packages"* ]]; then debian_like=true -else - debian_like=false -fi -if $debian_like; then SCRATCHLIB=$SCRATCHDIR/local/lib/$PYTHONEXEC/dist-packages else + debian_like=false SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages fi echo "SCRATCHLIB $SCRATCHLIB" From 21c268bce1eb0731a033bd0a1be3bdcf050ba6d4 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 15:52:26 +0100 Subject: [PATCH 88/89] try without path --- .github/workflows/ci.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91fdf7c..0c9c058 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,7 +42,9 @@ jobs: ./admin/install_mule.sh ./_build/lib ./_build/bin - name: Test python-${{ matrix.python-version }}_numpy-${{ matrix.numpy-version }} run: | - cd _build/lib - for name in ./*; do - python -m unittest discover -v ${name##*/}.tests - done + # cd _build/lib + # for name in ./*; do + # python -m unittest discover -v ${name##*/}.tests + # done + python -m unittest discover -b mule.tests + python -m unittest discover -b um_utils.tests From 61aaba5adfaed65e8905a63c09bbca0a229772cb Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 2 Oct 2025 15:54:57 +0100 Subject: [PATCH 89/89] revert tests back --- .github/workflows/ci.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0c9c058..91fdf7c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,9 +42,7 @@ jobs: ./admin/install_mule.sh ./_build/lib ./_build/bin - name: Test python-${{ matrix.python-version }}_numpy-${{ matrix.numpy-version }} run: | - # cd _build/lib - # for name in ./*; do - # python -m unittest discover -v ${name##*/}.tests - # done - python -m unittest discover -b mule.tests - python -m unittest discover -b um_utils.tests + cd _build/lib + for name in ./*; do + python -m unittest discover -v ${name##*/}.tests + done