From 3f5d922396e7c3ec3e1c897736c37990dae00b54 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Tue, 16 Apr 2024 08:55:29 -0700 Subject: [PATCH 01/27] test conda packages in a test environment as part of CI --- .github/workflows/build_manual.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index d3216b0be..e7a9b4aaa 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -11,8 +11,8 @@ on: - '.github/workflows/build_manual.yml' branches: # - develop - - fakebranch - # - talmo/fix-mac-v140 + # - fakebranch + - elizabeth/Fix-ubuntu-conda-build jobs: build: @@ -98,6 +98,15 @@ jobs: run: | conda build .conda_mac --output-folder build + # Test + - name: Test built conda package + shell: bash -l {0} + run: | + conda deactivate + mamba create -y -n sleap_test -c conda-forge -c nvidia -c file://$(pwd)/build -c sleap/label/dev -c anaconda sleap + conda activate sleap_test + python -c "import sleap; print(sleap.__version__)" + # # Login to conda (Ubuntu) # - name: Login to Anaconda (Ubuntu) # if: matrix.os == 'ubuntu-22.04' From 30692dc5a05be51016e50c314242dac88cef6175 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Tue, 16 Apr 2024 08:55:50 -0700 Subject: [PATCH 02/27] do not test sleap import using conda build --- .conda/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index a9aa5fea1..c7ec40c90 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -91,6 +91,6 @@ requirements: - conda-forge::ndx-pose - conda-forge::importlib-metadata ==4.11.4 -test: - imports: - - sleap \ No newline at end of file +# test: +# imports: +# - sleap \ No newline at end of file From bb5403a83b6648cf81695d223fc04d5689f5188d Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Tue, 16 Apr 2024 10:21:45 -0700 Subject: [PATCH 03/27] use github environment variables to define build path for each OS in the matrix and add print statements for testing --- .github/workflows/build_manual.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index e7a9b4aaa..2b600bb82 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -83,6 +83,8 @@ jobs: shell: bash -l {0} run: | conda build .conda --output-folder build + echo "BUILD_PATH=$(pwd)/build" >> $GITHUB_ENV + echo "Build path set for Ubuntu: $BUILD_PATH" # Build conda package (Windows) - name: Build conda package (Windows) @@ -90,6 +92,8 @@ jobs: shell: powershell run: | conda build .conda --output-folder build + echo "BUILD_PATH=$(pwd -PathType Unix)/build" >> $GITHUB_ENV + echo "Build path set for Windows: $BUILD_PATH" # Build conda package (Mac) - name: Build conda package (Mac) @@ -97,15 +101,18 @@ jobs: shell: bash -l {0} run: | conda build .conda_mac --output-folder build + echo "BUILD_PATH=$(pwd)/build" >> $GITHUB_ENV + echo "Build path set for Mac: $BUILD_PATH" # Test - name: Test built conda package shell: bash -l {0} run: | conda deactivate - mamba create -y -n sleap_test -c conda-forge -c nvidia -c file://$(pwd)/build -c sleap/label/dev -c anaconda sleap + mamba create -y -n sleap_test -c conda-forge -c nvidia -c file://$BUILD_PATH -c sleap/label/dev -c anaconda sleap conda activate sleap_test python -c "import sleap; print(sleap.__version__)" + echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" # # Login to conda (Ubuntu) # - name: Login to Anaconda (Ubuntu) From 4d435421d22031a6d375748433e5bc95eccd6a88 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 16 Apr 2024 13:21:28 -0700 Subject: [PATCH 04/27] figure out paths one OS at a time --- .github/workflows/build_manual.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index 2b600bb82..fdf4786d7 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -83,17 +83,19 @@ jobs: shell: bash -l {0} run: | conda build .conda --output-folder build + echo "Listing contents of the build directory:" + ls -l $(pwd)/build echo "BUILD_PATH=$(pwd)/build" >> $GITHUB_ENV echo "Build path set for Ubuntu: $BUILD_PATH" - # Build conda package (Windows) - - name: Build conda package (Windows) - if: matrix.os == 'windows-2022' - shell: powershell - run: | - conda build .conda --output-folder build - echo "BUILD_PATH=$(pwd -PathType Unix)/build" >> $GITHUB_ENV - echo "Build path set for Windows: $BUILD_PATH" + # # Build conda package (Windows) + # - name: Build conda package (Windows) + # if: matrix.os == 'windows-2022' + # shell: powershell + # run: | + # conda build .conda --output-folder build + # echo "BUILD_PATH=%(pwd)/build%" + # Build conda package (Mac) - name: Build conda package (Mac) @@ -101,6 +103,8 @@ jobs: shell: bash -l {0} run: | conda build .conda_mac --output-folder build + echo "Listing contents of the build directory:" + ls -l $(pwd)/build echo "BUILD_PATH=$(pwd)/build" >> $GITHUB_ENV echo "Build path set for Mac: $BUILD_PATH" From 6ceb574951862afa8bfa04a12408340dcb87f66e Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 16 Apr 2024 14:09:36 -0700 Subject: [PATCH 05/27] github environment variables work in subsequent steps not current step --- .github/workflows/build_manual.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index fdf4786d7..c0ac2f344 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -78,24 +78,21 @@ jobs: twine upload -u __token__ -p "$PYPI_TOKEN" dist/* --non-interactive --skip-existing --disable-progress-bar # Build conda package (Ubuntu) + # echo "{environment_variable_name}={value}" >> "$GITHUB_ENV" - name: Build conda package (Ubuntu) if: matrix.os == 'ubuntu-22.04' shell: bash -l {0} run: | conda build .conda --output-folder build - echo "Listing contents of the build directory:" - ls -l $(pwd)/build - echo "BUILD_PATH=$(pwd)/build" >> $GITHUB_ENV - echo "Build path set for Ubuntu: $BUILD_PATH" - - # # Build conda package (Windows) - # - name: Build conda package (Windows) - # if: matrix.os == 'windows-2022' - # shell: powershell - # run: | - # conda build .conda --output-folder build - # echo "BUILD_PATH=%(pwd)/build%" + echo "BUILD_PATH=$(pwd)/build" >> "$GITHUB_ENV" + # Build conda package (Windows) + - name: Build conda package (Windows) + if: matrix.os == 'windows-2022' + shell: powershell + run: | + conda build .conda --output-folder build + echo "BUILD_PATH=$(pwd)/build" >> "$env:GITHUB_ENV" # Build conda package (Mac) - name: Build conda package (Mac) @@ -103,17 +100,15 @@ jobs: shell: bash -l {0} run: | conda build .conda_mac --output-folder build - echo "Listing contents of the build directory:" - ls -l $(pwd)/build - echo "BUILD_PATH=$(pwd)/build" >> $GITHUB_ENV - echo "Build path set for Mac: $BUILD_PATH" + echo "BUILD_PATH=$(pwd)/build" >> "$GITHUB_ENV" # Test - name: Test built conda package shell: bash -l {0} run: | + echo "$BUILD_PATH" conda deactivate - mamba create -y -n sleap_test -c conda-forge -c nvidia -c file://$BUILD_PATH -c sleap/label/dev -c anaconda sleap + mamba create -y -n sleap_test -c sleap/label/dev -c conda-forge -c nvidia -c file://$BUILD_PATH -c anaconda sleap conda activate sleap_test python -c "import sleap; print(sleap.__version__)" echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" From 2a6b9d86d6b1cf775403d28880464363c493d153 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 16 Apr 2024 14:46:33 -0700 Subject: [PATCH 06/27] use local builds first --- .github/workflows/build_manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index c0ac2f344..c8c4c8497 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -108,7 +108,7 @@ jobs: run: | echo "$BUILD_PATH" conda deactivate - mamba create -y -n sleap_test -c sleap/label/dev -c conda-forge -c nvidia -c file://$BUILD_PATH -c anaconda sleap + mamba create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap conda activate sleap_test python -c "import sleap; print(sleap.__version__)" echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" From 31d1618a8a981aa515adb1ad9b3072e9cc38d182 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Wed, 17 Apr 2024 09:27:35 -0700 Subject: [PATCH 07/27] print env info --- .github/workflows/build_manual.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index c8c4c8497..ef77cbe7a 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -106,10 +106,11 @@ jobs: - name: Test built conda package shell: bash -l {0} run: | - echo "$BUILD_PATH" + echo "Build path is: $BUILD_PATH" conda deactivate mamba create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap conda activate sleap_test + echo conda list python -c "import sleap; print(sleap.__version__)" echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" From 10537aaf7dae073ce9de1772a2c9954b5def19d8 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Thu, 18 Apr 2024 12:01:58 -0700 Subject: [PATCH 08/27] try simple environment creation --- .github/workflows/build_manual.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index ef77cbe7a..9dc01cf74 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -108,9 +108,13 @@ jobs: run: | echo "Build path is: $BUILD_PATH" conda deactivate + echo $(conda info) + echo "Testing conda package with numpy" + mamba create -y -n numpy_test numpy + echo "Testing conda package with sleap" mamba create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap conda activate sleap_test - echo conda list + echo $(conda list) python -c "import sleap; print(sleap.__version__)" echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" From 67c2a24def1f8d7e39495eb98027b112b46bdf52 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Fri, 19 Apr 2024 12:26:13 -0700 Subject: [PATCH 09/27] try conda instead of mamba --- .github/workflows/build_manual.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index 9dc01cf74..000020d7f 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -109,10 +109,8 @@ jobs: echo "Build path is: $BUILD_PATH" conda deactivate echo $(conda info) - echo "Testing conda package with numpy" - mamba create -y -n numpy_test numpy echo "Testing conda package with sleap" - mamba create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap + conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap conda activate sleap_test echo $(conda list) python -c "import sleap; print(sleap.__version__)" From de8d3fb60d0d05362f0ea13bbbb9dab4647a3d4c Mon Sep 17 00:00:00 2001 From: eberrigan Date: Fri, 19 Apr 2024 13:36:21 -0700 Subject: [PATCH 10/27] fix windows build path --- .github/workflows/build_manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index 000020d7f..a223cd813 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -92,7 +92,7 @@ jobs: shell: powershell run: | conda build .conda --output-folder build - echo "BUILD_PATH=$(pwd)/build" >> "$env:GITHUB_ENV" + echo "BUILD_PATH=$\(pwd)\build" >> "$env:GITHUB_ENV" # Build conda package (Mac) - name: Build conda package (Mac) From 980271794995cf2d33736288bc11d3e92c03c493 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Fri, 19 Apr 2024 13:38:12 -0700 Subject: [PATCH 11/27] fix windows build path --- .github/workflows/build_manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index a223cd813..d48740bd4 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -92,7 +92,7 @@ jobs: shell: powershell run: | conda build .conda --output-folder build - echo "BUILD_PATH=$\(pwd)\build" >> "$env:GITHUB_ENV" + echo "BUILD_PATH=\$(pwd)\build" >> "$env:GITHUB_ENV" # Build conda package (Mac) - name: Build conda package (Mac) From f9f88879437f1f63a7a701b4da0a987f0ea6f660 Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Sun, 21 Apr 2024 15:47:56 -0700 Subject: [PATCH 12/27] add comment to reference pull request --- .conda/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.conda/meta.yaml b/.conda/meta.yaml index c7ec40c90..55a08c091 100644 --- a/.conda/meta.yaml +++ b/.conda/meta.yaml @@ -91,6 +91,8 @@ requirements: - conda-forge::ndx-pose - conda-forge::importlib-metadata ==4.11.4 +# This no longer works so we have moved it to the build workflow +# https://github.com/talmolab/sleap/pull/1744 # test: # imports: # - sleap \ No newline at end of file From 92d10a925c9c5d1eca0ae7c4d74fac6a7c9fe64c Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Mon, 22 Apr 2024 15:11:38 -0700 Subject: [PATCH 13/27] remove test stage from conda build for macs and test instead by creating the environment in a workflow --- .conda_mac/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index bb115c4f2..a0d92061e 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -89,6 +89,6 @@ requirements: - conda-forge::albumentations - conda-forge::ndx-pose -test: - imports: - - sleap +# test: +# imports: +# - sleap From b4fdc74e15f92ea87ff68bc2b62f9c622dc7874a Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Mon, 22 Apr 2024 15:15:52 -0700 Subject: [PATCH 14/27] test workflow by pushing to current branch --- .github/workflows/build_manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index d48740bd4..cf5308ff8 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -12,7 +12,7 @@ on: branches: # - develop # - fakebranch - - elizabeth/Fix-ubuntu-conda-build + - elizabeth/fix-mac-conda-build jobs: build: From 72bc341a4fa75232406092a89ca51374739aeeb8 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Mon, 22 Apr 2024 18:03:12 -0700 Subject: [PATCH 15/27] test conda package on macos runner --- .conda_mac/condarc.yaml | 1 - .github/workflows/build_manual.yml | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.conda_mac/condarc.yaml b/.conda_mac/condarc.yaml index df2727c74..c1be41bf1 100644 --- a/.conda_mac/condarc.yaml +++ b/.conda_mac/condarc.yaml @@ -1,4 +1,3 @@ -# This file is not used at the moment, but when github actions can be used to build the package, it needs to be listed. # https://github.com/github/roadmap/issues/528 channels: diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index cf5308ff8..f464c65c2 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -102,8 +102,9 @@ jobs: conda build .conda_mac --output-folder build echo "BUILD_PATH=$(pwd)/build" >> "$GITHUB_ENV" - # Test - - name: Test built conda package + # Test built conda package (Ubuntu and Windows) + - name: Test built conda package (Ubuntu and Windows) + if: matrix.os != 'macos-14' shell: bash -l {0} run: | echo "Build path is: $BUILD_PATH" @@ -116,6 +117,21 @@ jobs: python -c "import sleap; print(sleap.__version__)" echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" + # Test built conda package (Mac) + - name: Test built conda package (Mac) + if: matrix.os == 'macos-14' + shell: bash -l {0} + run: | + echo "Build path is: $BUILD_PATH" + conda deactivate + echo $(conda info) + echo "Testing conda package with sleap" + conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c nvidia -c anaconda sleap + conda activate sleap_test + echo $(conda list) + python -c "import sleap; print(sleap.__version__)" + echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" + # # Login to conda (Ubuntu) # - name: Login to Anaconda (Ubuntu) # if: matrix.os == 'ubuntu-22.04' From 967838abd5a26ab8df095ea00535b575cd579222 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 23 Apr 2024 11:51:47 -0700 Subject: [PATCH 16/27] Mac build does not need nvidia channel --- .github/workflows/build_manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index f464c65c2..b63b4ab83 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -126,7 +126,7 @@ jobs: conda deactivate echo $(conda info) echo "Testing conda package with sleap" - conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c nvidia -c anaconda sleap + conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c anaconda sleap conda activate sleap_test echo $(conda list) python -c "import sleap; print(sleap.__version__)" From 26526c56f6441ff95344b45ce32c32164751ef15 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 23 Apr 2024 14:36:45 -0700 Subject: [PATCH 17/27] qudida and albumentations are conda installed now --- .conda_mac/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.conda_mac/build.sh b/.conda_mac/build.sh index 85c488903..a68193560 100644 --- a/.conda_mac/build.sh +++ b/.conda_mac/build.sh @@ -2,11 +2,10 @@ # Install anything that didn't get conda installed via pip. # We need to turn pip index back on because Anaconda turns it off for some reason. - export PIP_NO_INDEX=False export PIP_NO_DEPENDENCIES=False export PIP_IGNORE_INSTALLED=False -pip install --no-cache-dir -r requirements.txt --no-binary qudida,albumentations +pip install --no-cache-dir -r requirements.txt python setup.py install --single-version-externally-managed --record=record.txt \ No newline at end of file From 61ba13d1d3eff5c98b3ec341961af71875bcdc45 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 23 Apr 2024 14:36:55 -0700 Subject: [PATCH 18/27] add comment with original issue --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3b919fceb..5db435ec8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # This file contains the minimal requirements to be installed via pip when using conda. # No conda packages for these -imgstore<0.3.0 # 0.3.3 results in https://github.com/O365/python-o365/issues/591 +imgstore<0.3.0 # 0.3.3 results in https://github.com/O365/python-o365/issues/591 which is from https://github.com/regebro/tzlocal/issues/112 when tzlocal is v3.0 nixio>=1.5.3 # Constrain put on by @jgrewe from G-Node qimage2ndarray # ==1.9.0 segmentation-models From c26cc564331e3078989552072740ac9e7063d8aa Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 23 Apr 2024 15:24:40 -0700 Subject: [PATCH 19/27] use python 3.9 --- .conda_mac/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index a0d92061e..eef8c262f 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -23,7 +23,7 @@ source: requirements: host: - - conda-forge::python ~=3.9 + - conda-forge::python =3.9 - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::setuptools - conda-forge::packaging @@ -59,7 +59,7 @@ requirements: - conda-forge::ndx-pose run: - - conda-forge::python ~=3.9 + - conda-forge::python =3.9 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py From 9c31c287afc8bbf7e4722e03b6da155b903ba61f Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 23 Apr 2024 15:53:40 -0700 Subject: [PATCH 20/27] use conda match specifications syntax --- .conda_mac/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.conda_mac/meta.yaml b/.conda_mac/meta.yaml index eef8c262f..ccfc399c0 100644 --- a/.conda_mac/meta.yaml +++ b/.conda_mac/meta.yaml @@ -23,7 +23,7 @@ source: requirements: host: - - conda-forge::python =3.9 + - conda-forge::python >=3.9.0, <3.10.0 - anaconda::numpy >=1.19.5,<1.23.0 - conda-forge::setuptools - conda-forge::packaging @@ -59,7 +59,7 @@ requirements: - conda-forge::ndx-pose run: - - conda-forge::python =3.9 + - conda-forge::python >=3.9.0, <3.10.0 - conda-forge::attrs >=21.2.0 - conda-forge::cattrs ==1.1.1 - conda-forge::h5py From e8d3f35010a3ae0a8a10a3c3df886c1648d3ebd6 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Tue, 23 Apr 2024 16:03:10 -0700 Subject: [PATCH 21/27] make print statements more readable for troubleshooting python versioning --- .github/workflows/build_manual.yml | 32 ++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index b63b4ab83..abf6b5030 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -122,15 +122,35 @@ jobs: if: matrix.os == 'macos-14' shell: bash -l {0} run: | - echo "Build path is: $BUILD_PATH" + echo "Current build path: $BUILD_PATH" conda deactivate - echo $(conda info) - echo "Testing conda package with sleap" + + echo "Python executable before activating environment:" + which python + echo "Python version before activating environment:" + python --version + echo "Conda info before activating environment:" + conda info + + echo "Creating and testing conda environment with sleap package..." conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c anaconda sleap conda activate sleap_test - echo $(conda list) - python -c "import sleap; print(sleap.__version__)" - echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" + + echo "Python executable after activating sleap_test environment:" + which python + echo "Python version after activating sleap_test environment:" + python --version + echo "Conda info after activating sleap_test environment:" + conda info + + echo "List of installed conda packages in the sleap_test environment:" + conda list + + echo "Testing sleap package installation..." + python -c "import sleap; print('sleap version:', sleap.__version__)" + + sleap_version=$(python -c "import sleap; print(sleap.__version__)") + echo "Test completed using sleap version: $sleap_version" # # Login to conda (Ubuntu) # - name: Login to Anaconda (Ubuntu) From 5d576ace522cdc4148e7001ab9178a24a23e6a94 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Wed, 24 Apr 2024 08:43:43 -0700 Subject: [PATCH 22/27] clean up build file --- .github/workflows/build_manual.yml | 37 ++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index abf6b5030..ffca3666f 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -78,7 +78,6 @@ jobs: twine upload -u __token__ -p "$PYPI_TOKEN" dist/* --non-interactive --skip-existing --disable-progress-bar # Build conda package (Ubuntu) - # echo "{environment_variable_name}={value}" >> "$GITHUB_ENV" - name: Build conda package (Ubuntu) if: matrix.os == 'ubuntu-22.04' shell: bash -l {0} @@ -107,15 +106,34 @@ jobs: if: matrix.os != 'macos-14' shell: bash -l {0} run: | - echo "Build path is: $BUILD_PATH" + echo "Current build path: $BUILD_PATH" conda deactivate - echo $(conda info) - echo "Testing conda package with sleap" + + echo "Python executable before activating environment:" + which python + echo "Python version before activating environment:" + python --version + echo "Conda info before activating environment:" + conda info + + echo "Creating and testing conda environment with sleap package..." conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap conda activate sleap_test - echo $(conda list) - python -c "import sleap; print(sleap.__version__)" - echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')" + + echo "Python executable after activating sleap_test environment:" + which python + echo "Python version after activating sleap_test environment:" + python --version + echo "Conda info after activating sleap_test environment:" + conda info + echo "List of installed conda packages in the sleap_test environment:" + conda list + echo "List of installed pip packages in the sleap_test environment:" + pip list + + echo "Testing sleap package installation..." + sleap_version=$(python -c "import sleap; print(sleap.__version__)") + echo "Test completed using sleap version: $sleap_version" # Test built conda package (Mac) - name: Test built conda package (Mac) @@ -142,13 +160,12 @@ jobs: python --version echo "Conda info after activating sleap_test environment:" conda info - echo "List of installed conda packages in the sleap_test environment:" conda list + echo "List of installed pip packages in the sleap_test environment:" + pip list echo "Testing sleap package installation..." - python -c "import sleap; print('sleap version:', sleap.__version__)" - sleap_version=$(python -c "import sleap; print(sleap.__version__)") echo "Test completed using sleap version: $sleap_version" From 4b841715bfc5dad746a3a5ef4c865f54a1e0df04 Mon Sep 17 00:00:00 2001 From: eberrigan Date: Thu, 16 May 2024 16:53:18 -0700 Subject: [PATCH 23/27] update version for pre-release --- sleap/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleap/version.py b/sleap/version.py index 6b9223a46..077594506 100644 --- a/sleap/version.py +++ b/sleap/version.py @@ -12,7 +12,7 @@ """ -__version__ = "1.4.0" +__version__ = "1.4.0a0" def versions(): From b6cbdbaa39466229557bb0d39379ca9ac710e07d Mon Sep 17 00:00:00 2001 From: eberrigan Date: Thu, 16 May 2024 16:54:51 -0700 Subject: [PATCH 24/27] add TODO --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57b96efec..ff2f44a39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,7 +84,9 @@ jobs: run: | conda build .conda_mac --output-folder build - # Login to conda (Ubuntu) + #TODO: ADD TESTS BEFORE UPLOADING + + # Login to conda (Ubuntu) - name: Login to Anaconda (Ubuntu) if: matrix.os == 'ubuntu-22.04' env: From a72202a8c654da8df492ad7e1b41484904cd67ab Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 17 May 2024 11:16:45 -0700 Subject: [PATCH 25/27] add tests for conda packages before uploading --- .github/workflows/build.yml | 70 +++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff2f44a39..e427cfdea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,9 +84,75 @@ jobs: run: | conda build .conda_mac --output-folder build - #TODO: ADD TESTS BEFORE UPLOADING + # Test built conda package (Ubuntu and Windows) + - name: Test built conda package (Ubuntu and Windows) + if: matrix.os != 'macos-14' + shell: bash -l {0} + run: | + echo "Current build path: $BUILD_PATH" + conda deactivate + + echo "Python executable before activating environment:" + which python + echo "Python version before activating environment:" + python --version + echo "Conda info before activating environment:" + conda info + + echo "Creating and testing conda environment with sleap package..." + conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap + conda activate sleap_test + + echo "Python executable after activating sleap_test environment:" + which python + echo "Python version after activating sleap_test environment:" + python --version + echo "Conda info after activating sleap_test environment:" + conda info + echo "List of installed conda packages in the sleap_test environment:" + conda list + echo "List of installed pip packages in the sleap_test environment:" + pip list + + echo "Testing sleap package installation..." + sleap_version=$(python -c "import sleap; print(sleap.__version__)") + echo "Test completed using sleap version: $sleap_version" + + # Test built conda package (Mac) + - name: Test built conda package (Mac) + if: matrix.os == 'macos-14' + shell: bash -l {0} + run: | + echo "Current build path: $BUILD_PATH" + conda deactivate + + echo "Python executable before activating environment:" + which python + echo "Python version before activating environment:" + python --version + echo "Conda info before activating environment:" + conda info + + echo "Creating and testing conda environment with sleap package..." + conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c anaconda sleap + conda activate sleap_test + + echo "Python executable after activating sleap_test environment:" + which python + echo "Python version after activating sleap_test environment:" + python --version + echo "Conda info after activating sleap_test environment:" + conda info + echo "List of installed conda packages in the sleap_test environment:" + conda list + echo "List of installed pip packages in the sleap_test environment:" + pip list + + echo "Testing sleap package installation..." + sleap_version=$(python -c "import sleap; print(sleap.__version__)") + echo "Test completed using sleap version: $sleap_version" - # Login to conda (Ubuntu) + # Login to conda (Ubuntu) - name: Login to Anaconda (Ubuntu) if: matrix.os == 'ubuntu-22.04' env: From b98594cc51b1e9912f0a0b56d7b0f2cd66e661cd Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 17 May 2024 11:40:56 -0700 Subject: [PATCH 26/27] update ci comments and branches --- .github/workflows/build_ci.yml | 2 +- .github/workflows/build_manual.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index f008cdf29..79af26233 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -1,4 +1,4 @@ -# Run tests using built conda packages and wheels. +# Run tests using built wheels. name: Build CI (no upload) # Run when changes to pip wheel diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml index ffca3666f..d798bc15a 100644 --- a/.github/workflows/build_manual.yml +++ b/.github/workflows/build_manual.yml @@ -11,8 +11,7 @@ on: - '.github/workflows/build_manual.yml' branches: # - develop - # - fakebranch - - elizabeth/fix-mac-conda-build + - fakebranch jobs: build: From d084f7418d4fb31750fcef4e7af38c84ccd54c4f Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Fri, 17 May 2024 16:43:14 -0700 Subject: [PATCH 27/27] remove macos test of pip wheel since python 3.9 is not supported by setup-python action --- .github/workflows/build_ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_ci.yml b/.github/workflows/build_ci.yml index 79af26233..619da1c2f 100644 --- a/.github/workflows/build_ci.yml +++ b/.github/workflows/build_ci.yml @@ -79,7 +79,8 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-22.04", "windows-2022", "macos-14"] + os: ["ubuntu-22.04", "windows-2022"] + # os: ["ubuntu-22.04", "windows-2022", "macos-14"] # removing macos-14 for now since the setup-python action only support py>=3.10, which is breaking this CI. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude include: # Default values