From 079a240924f07e2b894f822d6315d47ccb34833e Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 08:38:44 -0700 Subject: [PATCH 01/30] first attempt at adding micromamba to windows --- .github/workflows/tests-windows.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index a53631b3..09214265 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -40,21 +40,18 @@ jobs: run: echo "JDK_HOME=${JAVA_HOME}" >> $GITHUB_ENV shell: bash - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2 + + - name: Setup Micromamba + uses: mamba-org/setup-micromamba@v1 with: - auto-activate-base: false - activate-environment: pathml + micromamba-version: '1.5.6-0' + environment-name: pathml environment-file: environment.yml - # environment-file: '.github/ci-environments/env-py39.yml' - # environment-file: .github/ci-environments/env-py${{ matrix.python-version == '3.10' && '310' || matrix.python-version == '3.9' && '39' || '38' }}.yml - mamba-version: "*" - python-version: ${{ matrix.python-version }} - - # - name: Install JavaBridge and other dependencies - # shell: bash -l {0} - # run: | - # pip install python-javabridge + init-shell: >- + bash + create-args: >- + python=${{ matrix.python-version }} + - name: Run Python script to find JVM path shell: bash -l {0} From b92b153b4a3c515f40070893ac35e87d5807e98b Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 08:56:52 -0700 Subject: [PATCH 02/30] replace conda info step with mamba info --- .github/workflows/tests-windows.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 09214265..f85dca42 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -51,7 +51,7 @@ jobs: bash create-args: >- python=${{ matrix.python-version }} - + - name: Run Python script to find JVM path shell: bash -l {0} @@ -88,11 +88,12 @@ jobs: env: OPENSLIDE_PATH: ${{ env.OPENSLIDE_PATH }} - - name: Conda info + - name: Mamba info shell: bash -l {0} run: | - conda info - conda list + micromamba info + micromamba config + micromamba list - name: Install PathML shell: bash -l {0} From e3645194d92ab6eff894f1fb64cc7533f4bfff13 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 10:09:20 -0700 Subject: [PATCH 03/30] testing changed linux file --- .github/workflows/tests-linux.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 3b60d160..34f9aa61 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -34,17 +34,16 @@ jobs: sudo apt-get update sudo apt-get install openslide-tools sudo apt-get install pandoc - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2 + - name: Setup Micromamba + uses: mamba-org/setup-micromamba@v1 with: - auto-activate-base: false - activate-environment: pathml - environment-file: requirements/environment_test.yml - # mamba-version: "*" - miniforge-version: latest - use-mamba: true - channels: conda-forge - python-version: ${{ matrix.python-version }} + micromamba-version: '1.5.6-0' + environment-name: pathml + environment-file: environment.yml + init-shell: >- + bash + create-args: >- + python=${{ matrix.python-version }} - name: Debugging run: | echo "Printing the environment.yml file..." @@ -56,12 +55,14 @@ jobs: - name: Install dependencies with mamba shell: bash -l {0} - run: mamba env update --file requirements/environment_test.yml --name pathml - - name: Conda info + run: micromamba env update --file requirements/environment_test.yml --name pathml + + - name: Mamba info shell: bash -l {0} run: | - conda info - conda list + micromamba info + micromamba config + micromamba list - name: Set default Temurin JDK 17 run: | From de956c7b64f0011d633ce46808be0e9ef3a29439 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 10:27:48 -0700 Subject: [PATCH 04/30] fixing mamba command for linux file --- .github/workflows/tests-linux.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 34f9aa61..777f7013 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -48,16 +48,16 @@ jobs: run: | echo "Printing the environment.yml file..." cat requirements/environment_test.yml - echo "Checking the status of mamba..." - mamba --version + echo "Checking the status of micro mamba..." + micromamba config echo "Checking the available disk space..." df -h - - name: Install dependencies with mamba + - name: Install dependencies with micromamba shell: bash -l {0} run: micromamba env update --file requirements/environment_test.yml --name pathml - - name: Mamba info + - name: Micromamba info shell: bash -l {0} run: | micromamba info From cc5af8835076cc42bd5a39511acd8e00cfaf1a27 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 10:38:52 -0700 Subject: [PATCH 05/30] getting rid of redundant job in linux file --- .github/workflows/tests-linux.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 777f7013..1d862fd6 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -53,9 +53,9 @@ jobs: echo "Checking the available disk space..." df -h - - name: Install dependencies with micromamba - shell: bash -l {0} - run: micromamba env update --file requirements/environment_test.yml --name pathml + # - name: Install dependencies with micromamba + # shell: bash -l {0} + # run: micromamba env update --file requirements/environment_test.yml --name pathml - name: Micromamba info shell: bash -l {0} From 040e1b59f80a8c14efedd6fc055a38aa3ccad01c Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 11:03:07 -0700 Subject: [PATCH 06/30] changing reference envi file linux --- .github/workflows/tests-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 1d862fd6..77750fcc 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -39,7 +39,7 @@ jobs: with: micromamba-version: '1.5.6-0' environment-name: pathml - environment-file: environment.yml + environment-file: requirements/environment_test.yml init-shell: >- bash create-args: >- From e0d33c632d919576c7f2e39053279605473ae13a Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 11:29:23 -0700 Subject: [PATCH 07/30] first changes to mac test file --- .github/workflows/tests-macos.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index e3283443..a33a1631 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -4,9 +4,13 @@ on: workflow_dispatch: pull_request: branches: + - dev + - master - dev_graph push: branches: + - dev + - master - dev_graph jobs: @@ -26,24 +30,23 @@ jobs: shell: bash -l {0} run: brew install openslide - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v3 + - name: Setup Micromamba + uses: mamba-org/setup-micromamba@v1 with: - auto-update-conda: true - miniforge-version: latest - use-mamba: true - python-version: ${{ matrix.python-version }} - activate-environment: pathml + micromamba-version: '1.5.6-0' + environment-name: pathml environment-file: requirements/environment_mac.yml - channels: conda-forge + init-shell: >- + bash + create-args: >- + python=${{ matrix.python-version }} - - name: Conda info + - name: Micromamba info shell: bash -l {0} - run: conda info - - - name: Conda Version - shell: bash -l {0} - run: conda --version + run: | + micromamba info + micromamba config + micromamba list - name: Set default Temurin JDK 17 run: | From 74b6f28e3c49cb99a7ffc96277eec8c5320866c3 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 11:41:08 -0700 Subject: [PATCH 08/30] adjusting environment file for mac --- requirements/environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index ce968ed9..ac7d709a 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -19,10 +19,10 @@ dependencies: - pre-commit<=3.6.0 - coverage==7.3.4 - networkx<=3.2.1 + - python-javabridge==4.0.3 - pip: - torch==1.13.1 - python-bioformats==4.0.7 - - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From aa196f0cf59c8c95914d8d6f5f28026d8b04545f Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 12:01:28 -0700 Subject: [PATCH 09/30] trying java fix --- .github/workflows/tests-macos.yml | 16 ++++++++++++++++ requirements/environment_mac.yml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index a33a1631..0371c64e 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -29,6 +29,22 @@ jobs: - name: Install openslide shell: bash -l {0} run: brew install openslide + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'temurin' + + - name: Print JAVA_HOME and PATH + run: | + echo "JAVA_HOME: $env:JAVA_HOME" + echo "PATH: $env:PATH" + shell: pwsh + + - name: Set JDK_HOME environment variable + run: echo "JDK_HOME=${JAVA_HOME}" >> $GITHUB_ENV + shell: bash - name: Setup Micromamba uses: mamba-org/setup-micromamba@v1 diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index ac7d709a..ce968ed9 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -19,10 +19,10 @@ dependencies: - pre-commit<=3.6.0 - coverage==7.3.4 - networkx<=3.2.1 - - python-javabridge==4.0.3 - pip: - torch==1.13.1 - python-bioformats==4.0.7 + - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From 330f7443fea7562f3ff43a33183c00471adcae11 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 12:32:47 -0700 Subject: [PATCH 10/30] trying pep517 to load python javabridge --- .github/workflows/tests-macos.yml | 4 ++++ requirements/environment_mac.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 0371c64e..cab790ed 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -57,6 +57,10 @@ jobs: create-args: >- python=${{ matrix.python-version }} + - name: Install python-javabridge + shell: bash -l {0} + run: pip install --use-pep517 python-javabridge==4.0.3 + - name: Micromamba info shell: bash -l {0} run: | diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index ce968ed9..8685a874 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -22,7 +22,7 @@ dependencies: - pip: - torch==1.13.1 - python-bioformats==4.0.7 - - python-javabridge==4.0.3 + # - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From b298226008e800fea6ffbd9a03a1d33d8523730b Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 12:40:37 -0700 Subject: [PATCH 11/30] adjusting setuptools depen --- .github/workflows/tests-macos.yml | 6 +++--- requirements/environment_mac.yml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index cab790ed..73a52575 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -57,9 +57,9 @@ jobs: create-args: >- python=${{ matrix.python-version }} - - name: Install python-javabridge - shell: bash -l {0} - run: pip install --use-pep517 python-javabridge==4.0.3 + # - name: Install python-javabridge + # shell: bash -l {0} + # run: pip install --use-pep517 python-javabridge==4.0.3 - name: Micromamba info shell: bash -l {0} diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index 8685a874..ebf44eb1 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -20,9 +20,10 @@ dependencies: - coverage==7.3.4 - networkx<=3.2.1 - pip: + - setuptools==58.2.0 - torch==1.13.1 - python-bioformats==4.0.7 - # - python-javabridge==4.0.3 + - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From e37e868c1737cc8d4801bd8bbdcfcec9b809a09f Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 12:58:27 -0700 Subject: [PATCH 12/30] installing bioformats and javabridge sep --- .github/workflows/tests-macos.yml | 10 +++++++--- requirements/environment_mac.yml | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 73a52575..5f5c3090 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -57,9 +57,13 @@ jobs: create-args: >- python=${{ matrix.python-version }} - # - name: Install python-javabridge - # shell: bash -l {0} - # run: pip install --use-pep517 python-javabridge==4.0.3 + - name: Install python-javabridge + shell: bash -l {0} + run: pip install --use-pep517 python-javabridge==4.0.3 + + - name: Install python-bioformats + shell: bash -l {0} + run: pip install python-bioformats==4.0.7 - name: Micromamba info shell: bash -l {0} diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index ebf44eb1..6b0f0a7a 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -20,10 +20,10 @@ dependencies: - coverage==7.3.4 - networkx<=3.2.1 - pip: - - setuptools==58.2.0 + # - setuptools==58.2.0 - torch==1.13.1 - - python-bioformats==4.0.7 - - python-javabridge==4.0.3 + # - python-bioformats==4.0.7 + # - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From 401a28487ccc9cf4c62f347d82c76c167b7c228f Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 13:08:27 -0700 Subject: [PATCH 13/30] trying new way to install javabridge --- .github/workflows/tests-macos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 5f5c3090..c249da62 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -59,7 +59,8 @@ jobs: - name: Install python-javabridge shell: bash -l {0} - run: pip install --use-pep517 python-javabridge==4.0.3 + # run: pip install --use-pep517 python-javabridge==4.0.3 + run: pip install python-javabridge==4.0.3 - name: Install python-bioformats shell: bash -l {0} From 76d780fba00908bdfaa469e4c8157e7f493c55a6 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 13:14:01 -0700 Subject: [PATCH 14/30] trying adding numpy to pep517 statement --- .github/workflows/tests-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index c249da62..9ff2d694 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -59,8 +59,8 @@ jobs: - name: Install python-javabridge shell: bash -l {0} - # run: pip install --use-pep517 python-javabridge==4.0.3 - run: pip install python-javabridge==4.0.3 + run: pip install --use-pep517 numpy==1.23.5 python-javabridge==4.0.3 + # run: pip install python-javabridge==4.0.3 - name: Install python-bioformats shell: bash -l {0} From ba805b32013330a478e61a448aa00ed2f24e4779 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 13:19:52 -0700 Subject: [PATCH 15/30] taking out initial java jobs --- .github/workflows/tests-macos.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 9ff2d694..ea550250 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -30,21 +30,6 @@ jobs: shell: bash -l {0} run: brew install openslide - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - java-version: '17' - distribution: 'temurin' - - - name: Print JAVA_HOME and PATH - run: | - echo "JAVA_HOME: $env:JAVA_HOME" - echo "PATH: $env:PATH" - shell: pwsh - - - name: Set JDK_HOME environment variable - run: echo "JDK_HOME=${JAVA_HOME}" >> $GITHUB_ENV - shell: bash - name: Setup Micromamba uses: mamba-org/setup-micromamba@v1 @@ -59,8 +44,8 @@ jobs: - name: Install python-javabridge shell: bash -l {0} - run: pip install --use-pep517 numpy==1.23.5 python-javabridge==4.0.3 - # run: pip install python-javabridge==4.0.3 + # run: pip install --use-pep517 numpy==1.23.5 python-javabridge==4.0.3 + run: pip install python-javabridge==4.0.3 - name: Install python-bioformats shell: bash -l {0} From cf00acc4541781ee68513ea318ab327a031ef88a Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 13:28:33 -0700 Subject: [PATCH 16/30] adding 3.9 and .10 to python --- .github/workflows/tests-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index ea550250..2d791197 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: os: [macos-latest] - python-version: ["3.8"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 From 36208e2db97fe0088432b844bd43f94c8e9efde0 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 13:46:11 -0700 Subject: [PATCH 17/30] trying javabridge instead of python-javabridge --- .github/workflows/tests-macos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 2d791197..12d875f5 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -45,7 +45,8 @@ jobs: - name: Install python-javabridge shell: bash -l {0} # run: pip install --use-pep517 numpy==1.23.5 python-javabridge==4.0.3 - run: pip install python-javabridge==4.0.3 + # run: pip install python-javabridge==4.0.3 + run: pip install javabridge==1.0.19 - name: Install python-bioformats shell: bash -l {0} From 0c3212c026af5b9eefea16921d0e9f12736c721f Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Thu, 15 Aug 2024 13:58:22 -0700 Subject: [PATCH 18/30] trying download of python-javabridge from git --- .github/workflows/tests-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 12d875f5..3f945134 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -46,7 +46,7 @@ jobs: shell: bash -l {0} # run: pip install --use-pep517 numpy==1.23.5 python-javabridge==4.0.3 # run: pip install python-javabridge==4.0.3 - run: pip install javabridge==1.0.19 + run: pip install git+https://github.com/LeeKamentsky/python-javabridge - name: Install python-bioformats shell: bash -l {0} From e41ad3ef924b9df2119148ba1d1271bfccc10ef1 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 09:17:55 -0700 Subject: [PATCH 19/30] adding javabridge back to main environment file --- .github/workflows/tests-macos.yml | 10 ---------- requirements/environment_mac.yml | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 3f945134..a7223c23 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -42,16 +42,6 @@ jobs: create-args: >- python=${{ matrix.python-version }} - - name: Install python-javabridge - shell: bash -l {0} - # run: pip install --use-pep517 numpy==1.23.5 python-javabridge==4.0.3 - # run: pip install python-javabridge==4.0.3 - run: pip install git+https://github.com/LeeKamentsky/python-javabridge - - - name: Install python-bioformats - shell: bash -l {0} - run: pip install python-bioformats==4.0.7 - - name: Micromamba info shell: bash -l {0} run: | diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index 6b0f0a7a..1006b518 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -22,8 +22,8 @@ dependencies: - pip: # - setuptools==58.2.0 - torch==1.13.1 - # - python-bioformats==4.0.7 - # - python-javabridge==4.0.3 + - python-bioformats==4.0.7 + - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From ef32ccec8c6e22ad81a139babea2172b3535c015 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 09:47:19 -0700 Subject: [PATCH 20/30] adding new readme --- README.md | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 97fd5a38..ad2086f3 100644 --- a/README.md +++ b/README.md @@ -56,13 +56,25 @@ View the official [PathML Documentation on readthedocs](https://pathml.readthedo ## 1.1 Prerequisites -We recommend using [Conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#) for managing your environments. +We recommend using [Micromamba](https://mamba.readthedocs.io/en/latest/index.html) for managing your environments. We provide instructions on how to install PathML via Micromamba below. In addition, we also provide instructions on how to install via [Miniconda](https://docs.conda.io/en/latest/miniconda.html) should you have a license. -#### Installing Conda +#### Installation -If you don't have Conda installed, you can download Miniconda [here](https://docs.conda.io/en/latest/miniconda.html). +If you don't have Miniconda installed, you can download Miniconda [here](https://docs.conda.io/en/latest/miniconda.html). -#### Updating Conda and Using libmamba (Optional) + +#### Upating Micromamba + +Make sure you have the recent version of Micromamba by using the following command: +``` +micromamba update +``` + +##### Updating Conda and Using libmamba (Optional) + +**If you are using Micromamba, you can skip to the next [section](#Platform-Specific-External-Dependencies).** + + We recommend that Anaconda/Microconda users complete the following steps to update your Conda version and use `libmamba` to resolve dependency conflicts. Recent versions of Conda have integrated `libmamba`, a faster dependency solver. To benefit from this improvement, first ensure your Conda is updated: @@ -80,7 +92,7 @@ conda config --set solver libmamba #### Platform-Specific External Dependencies -For installation methods [1)](#2.1-Install-with-pip-(Recommended-for-Users)) and [2)](#2.2-Install-from-Source-(Recommended-for-Developers)), you will need to install the following platform-specific packages. +For installation methods [1)](#1.2.2-Install-with-Anaconda and-pip) and [2)](#1.2.3-Install-from Source-(Recommended-for-Developers)), you will need to install the following platform-specific packages. * Linux: Install external dependencies with [Apt](https://ubuntu.com/server/docs/package-management): ```` @@ -108,7 +120,20 @@ For Windows users, an alternative to using `vcpkg` is to download and use pre-bu ## 1.2 PathML Installation Methods -### 1.2.1 Install with pip (Recommended for Users) +### 1.2.1 Install with Micromamba and pip (Recommended for Users) + +#### Create and Activate Micromamba Environment and install openjdk +```` +micromamba create -n pathml 'openjdk<=18.0' -c conda-forge python=3.9 +micromamba activate pathml +```` + +#### Install `PathML` from PyPI +```` +pip install pathml +```` + +### 1.2.2 Install with Anaconda and pip #### Create and Activate Conda Environment ```` @@ -125,7 +150,7 @@ conda install -c conda-forge 'openjdk<=18.0' pip install pathml ```` -### 1.2.2 Install from Source (Recommended for Developers) +### 1.2.3 Install from Source (Recommended for Developers) #### Clone repository ```` @@ -155,7 +180,7 @@ conda activate pathml pip install -e . ```` -### 1.2.3 Use Docker Container +### 1.2.4 Use Docker Container First, download or build the PathML Docker container: @@ -192,7 +217,7 @@ Note that these instructions assume that there are no other processes using port Please refer to the `Docker run` [documentation](https://docs.docker.com/engine/reference/run/) for further instructions on accessing the container, e.g. for mounting volumes to access files on a local machine from within the container. -### 1.2.4 Use Google Colab +### 1.2.5 Use Google Colab To get PathML running in a Colab environment: From f153b4eddc8636196b7f22fec64e02ad384b49af Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 09:49:14 -0700 Subject: [PATCH 21/30] adjusting sections --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad2086f3..f016a178 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Make sure you have the recent version of Micromamba by using the following comma micromamba update ``` -##### Updating Conda and Using libmamba (Optional) +#### Updating Conda and Using libmamba (Optional) **If you are using Micromamba, you can skip to the next [section](#Platform-Specific-External-Dependencies).** From b6c66cb55ee2e9095d2e98fa2c16b89faae9102f Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 09:53:44 -0700 Subject: [PATCH 22/30] adjusting links --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f016a178..01998ad5 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ conda config --set solver libmamba #### Platform-Specific External Dependencies -For installation methods [1)](#1.2.2-Install-with-Anaconda and-pip) and [2)](#1.2.3-Install-from Source-(Recommended-for-Developers)), you will need to install the following platform-specific packages. +For installation methods [1)](#2.1-Install-with-Micromamba-and-pip-(Recommended-for-Users)) and [2)](#2.2-Install-from-Source-(Recommended-for-Developers)), you will need to install the following platform-specific packages. * Linux: Install external dependencies with [Apt](https://ubuntu.com/server/docs/package-management): ```` From e78468c009dfacb3495f1519383b6738dc49983b Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 10:31:12 -0700 Subject: [PATCH 23/30] trying to install numpy first --- .github/workflows/tests-macos.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index a7223c23..4b2ac07d 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -42,6 +42,14 @@ jobs: create-args: >- python=${{ matrix.python-version }} + - name: Install NumPy + shell: bash -l {0} + run: pip install numpy==1.23.5 + + - name: Install Python-Javabridge + shell: bash -l {0} + run: pip install python-javabridge==4.0.3 + - name: Micromamba info shell: bash -l {0} run: | From 783d780621c60615af4bd4b78e9c61038ad26b21 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 10:36:05 -0700 Subject: [PATCH 24/30] changing order in the environment file --- requirements/environment_mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index 1006b518..99f4bbcb 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -23,7 +23,7 @@ dependencies: # - setuptools==58.2.0 - torch==1.13.1 - python-bioformats==4.0.7 - - python-javabridge==4.0.3 + # - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From 34d87475ffa19ca2871478dd4c6e90a7ef6b32b3 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 10:43:48 -0700 Subject: [PATCH 25/30] reordering pip statements --- .github/workflows/tests-macos.yml | 8 -------- requirements/environment_mac.yml | 5 +++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 4b2ac07d..a7223c23 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -42,14 +42,6 @@ jobs: create-args: >- python=${{ matrix.python-version }} - - name: Install NumPy - shell: bash -l {0} - run: pip install numpy==1.23.5 - - - name: Install Python-Javabridge - shell: bash -l {0} - run: pip install python-javabridge==4.0.3 - - name: Micromamba info shell: bash -l {0} run: | diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index 99f4bbcb..f715ceb5 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -7,7 +7,7 @@ channels: dependencies: - python<=3.10 - pip==23.3.2 - - numpy==1.23.5 + # - numpy==1.23.5 - scipy<=1.11.4 - scikit-image<=0.22.0 - matplotlib<=3.8.2 @@ -21,9 +21,10 @@ dependencies: - networkx<=3.2.1 - pip: # - setuptools==58.2.0 + - numpy==1.23.5 - torch==1.13.1 - python-bioformats==4.0.7 - # - python-javabridge==4.0.3 + - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From fbaf12c2c18f1142d9adae549acb946b232901f0 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 10:50:45 -0700 Subject: [PATCH 26/30] taking bioformats and javabridge out of main environment file mac --- .github/workflows/tests-macos.yml | 4 ++++ requirements/environment_mac.yml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index a7223c23..a37f3d72 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -42,6 +42,10 @@ jobs: create-args: >- python=${{ matrix.python-version }} + - name: Install python-javabridge and python-bioformats + shell: bash -l {0} + run: pip install python-javabridge==4.0.3 python-bioformats==4.0.7 + - name: Micromamba info shell: bash -l {0} run: | diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index f715ceb5..5ddc2aa7 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -23,8 +23,8 @@ dependencies: # - setuptools==58.2.0 - numpy==1.23.5 - torch==1.13.1 - - python-bioformats==4.0.7 - - python-javabridge==4.0.3 + # - python-bioformats==4.0.7 + # - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 - onnxruntime==1.16.3 From 185909582ed999622ab5bfbe5a9355c69696ff16 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 10:58:41 -0700 Subject: [PATCH 27/30] trying to install javabridge from github --- .github/workflows/tests-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index a37f3d72..f7858b69 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -44,7 +44,7 @@ jobs: - name: Install python-javabridge and python-bioformats shell: bash -l {0} - run: pip install python-javabridge==4.0.3 python-bioformats==4.0.7 + run: pip install git+https://github.com/LeeKamentsky/python-javabridge.git python-javabridge==4.0.3 python-bioformats==4.0.7 - name: Micromamba info shell: bash -l {0} From 4772b462c606d273917779221a46c36200e71f36 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 11:43:23 -0700 Subject: [PATCH 28/30] changing channel for javabridge --- .github/workflows/tests-macos.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index f7858b69..7c85b3b9 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -44,7 +44,11 @@ jobs: - name: Install python-javabridge and python-bioformats shell: bash -l {0} - run: pip install git+https://github.com/LeeKamentsky/python-javabridge.git python-javabridge==4.0.3 python-bioformats==4.0.7 + run: micromamba install python-javabridge==4.0.3 -c conda-forge/osx-64/ + + - name: Install python-bioformats + shell: bash -l {0} + run: pip install python-bioformats==4.0.7 - name: Micromamba info shell: bash -l {0} From dc0847cea5d283e6254822aa917d961ddc17fc83 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Fri, 16 Aug 2024 11:55:27 -0700 Subject: [PATCH 29/30] changing which packages are pulled from pip --- .github/workflows/tests-macos.yml | 7 ------- requirements/environment_mac.yml | 7 ++++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 7c85b3b9..11425207 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -42,13 +42,6 @@ jobs: create-args: >- python=${{ matrix.python-version }} - - name: Install python-javabridge and python-bioformats - shell: bash -l {0} - run: micromamba install python-javabridge==4.0.3 -c conda-forge/osx-64/ - - - name: Install python-bioformats - shell: bash -l {0} - run: pip install python-bioformats==4.0.7 - name: Micromamba info shell: bash -l {0} diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index 5ddc2aa7..851adc99 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -7,7 +7,8 @@ channels: dependencies: - python<=3.10 - pip==23.3.2 - # - numpy==1.23.5 + - numpy==1.23.5 + - python-javabridge==4.0.3 - scipy<=1.11.4 - scikit-image<=0.22.0 - matplotlib<=3.8.2 @@ -21,9 +22,9 @@ dependencies: - networkx<=3.2.1 - pip: # - setuptools==58.2.0 - - numpy==1.23.5 + # - numpy==1.23.5 - torch==1.13.1 - # - python-bioformats==4.0.7 + - python-bioformats==4.0.7 # - python-javabridge==4.0.3 - protobuf==3.20.3 - onnx==1.15.0 From 42cba7da3fc5641a248fc69e368aef9783e7b970 Mon Sep 17 00:00:00 2001 From: jamesgwen Date: Mon, 19 Aug 2024 10:14:14 -0700 Subject: [PATCH 30/30] adjusting test file macos --- .github/workflows/tests-macos.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 11425207..348a044c 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -4,13 +4,9 @@ on: workflow_dispatch: pull_request: branches: - - dev - - master - dev_graph push: branches: - - dev - - master - dev_graph jobs: