From eba44fba73b2be9021a30924dc03eb0ca6296abd Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Mon, 7 Oct 2024 09:54:35 +1100 Subject: [PATCH 01/10] Add recipe for core package --- core/meta.yaml | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 core/meta.yaml diff --git a/core/meta.yaml b/core/meta.yaml new file mode 100644 index 00000000..c42eab4e --- /dev/null +++ b/core/meta.yaml @@ -0,0 +1,69 @@ +# Note: this is the conda package config file, not to be confused with the Python package config file `pyproject.toml` +{% set name = "lls_core" %} +{% set version = "0.2.7" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + path: . + +build: + entry_points: + - napari_lattice = napari_lattice.cmds.__main__:main + noarch: python + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + number: 0 + +requirements: + host: + - python >=3.8 + - setuptools + - wheel + - pip + run: + - python >=3.8 + - aicsimageio >=4.6.3 + - aicspylibczi >=3.1.1 + - click + - dask-core + - fsspec >=2022.8.2 + - importlib_resources + - napari-workflows >=0.2.8 + - npy2bdv + - numpy + - pandas + - pyclesperanto-prototype >=0.20.0 + - pyopencl + - pydantic >=1.10.17,<3 + - pyyaml + - read-roi + - rich + - resource_backed_dask_array >=0.1.0 + - scikit-image + - strenum + - tifffile >=2023.3.15 + - toolz + - tqdm + - typer + - typing_extensions >=4.7.0 + - xarray + +test: + imports: + - napari_lattice + commands: + - pip check + - napari_lattice --help + requires: + - pip + +about: + home: https://github.com/BioimageAnalysisCoreWEHI/napari_lattice + license: GPL-3.0 + license_file: LICENSE + +extra: + recipe-maintainers: + - multimeric From 0c4fdfa92a17b5dc2390830bfb8ec184f8928c03 Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Fri, 11 Oct 2024 16:29:16 +1100 Subject: [PATCH 02/10] Build conda package on each push --- .github/workflows/test_and_deploy.yml | 10 ++++++++++ core/meta.yaml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 71ae1b9e..0a2ea4c9 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -78,6 +78,16 @@ jobs: - name: Coverage uses: codecov/codecov-action@v3 + build_conda: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cascode-labs/build-conda-action/action.yml@v0 + with: + recipe_path: core + package_artifact_name: lls_core_conda + + deploy: # this will run when you have tagged a commit, starting with "v*" # and requires that you have put your twine API key in your diff --git a/core/meta.yaml b/core/meta.yaml index c42eab4e..ecac9070 100644 --- a/core/meta.yaml +++ b/core/meta.yaml @@ -62,7 +62,7 @@ test: about: home: https://github.com/BioimageAnalysisCoreWEHI/napari_lattice license: GPL-3.0 - license_file: LICENSE + license_file: ../LICENSE extra: recipe-maintainers: From 7ed784ad00e7311e6b17a18e808641e59caf8bd0 Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Fri, 11 Oct 2024 16:31:42 +1100 Subject: [PATCH 03/10] Fix build-conda-action version --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 0a2ea4c9..9bfc3232 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cascode-labs/build-conda-action/action.yml@v0 + - uses: cascode-labs/build-conda-action/action.yml@v0.1.4 with: recipe_path: core package_artifact_name: lls_core_conda From f7a08e29edd5b636e4526c358166f04df306bc5c Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Fri, 11 Oct 2024 16:39:10 +1100 Subject: [PATCH 04/10] Rework to remove conda-build action --- .github/workflows/test_and_deploy.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 9bfc3232..93585357 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -82,11 +82,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: cascode-labs/build-conda-action/action.yml@v0.1.4 + - uses: mamba-org/setup-micromamba@v1 with: - recipe_path: core - package_artifact_name: lls_core_conda - + environment-name: conda-build-env + create-args: >- + conda-build + init-shell: bash + - run: | + mkdir output/ + conda-build build core --output-folder output + name: Build conda package + - uses: actions/upload-artifact@v4 + with: + name: lls-core-conda + path: output/ deploy: # this will run when you have tagged a commit, starting with "v*" From dc1e4a9dc341d8318b8aec90fabf73531ee0d949 Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Fri, 11 Oct 2024 16:40:15 +1100 Subject: [PATCH 05/10] Fix the conda test package name --- core/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/meta.yaml b/core/meta.yaml index ecac9070..caf7d42c 100644 --- a/core/meta.yaml +++ b/core/meta.yaml @@ -52,10 +52,10 @@ requirements: test: imports: - - napari_lattice + - lls_core commands: - pip check - - napari_lattice --help + - lls-pipeline --help requires: - pip From e62f203749363cd412630321cd32a0406f0be28f Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Fri, 11 Oct 2024 16:43:30 +1100 Subject: [PATCH 06/10] Use conda-compatible shell --- .github/workflows/test_and_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 93585357..7ca7daaa 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -91,6 +91,7 @@ jobs: - run: | mkdir output/ conda-build build core --output-folder output + shell: bash -leo pipefail {0} name: Build conda package - uses: actions/upload-artifact@v4 with: From 79d7ecfbbfad2d28524fddc63f7f1b6f5a7007e7 Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Mon, 14 Oct 2024 13:10:08 +1100 Subject: [PATCH 07/10] Fix conda-build CI --- .github/workflows/test_and_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 7ca7daaa..e7d66141 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -87,10 +87,11 @@ jobs: environment-name: conda-build-env create-args: >- conda-build + conda-verify init-shell: bash - run: | mkdir output/ - conda-build build core --output-folder output + conda-build core --output-folder output shell: bash -leo pipefail {0} name: Build conda package - uses: actions/upload-artifact@v4 From d50fc839de06ea09fb58c447a92b42ad1fae771e Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Wed, 23 Oct 2024 10:37:33 +1100 Subject: [PATCH 08/10] Constrain ome-types --- core/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/meta.yaml b/core/meta.yaml index caf7d42c..35abdc89 100644 --- a/core/meta.yaml +++ b/core/meta.yaml @@ -50,6 +50,9 @@ requirements: - typing_extensions >=4.7.0 - xarray + run_constrained: + - ome-types >=0.3.4 + test: imports: - lls_core From 6bc67020fb4635e941b61d0cb70febe50a426ceb Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Wed, 23 Oct 2024 10:57:17 +1100 Subject: [PATCH 09/10] Conda package build tweaks --- .github/workflows/test_and_deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index e7d66141..0ec01af1 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -89,15 +89,18 @@ jobs: conda-build conda-verify init-shell: bash + + # We don't want the whole repo (recipe), since that includes some test data - run: | mkdir output/ - conda-build core --output-folder output + conda-build core --output-folder output --no-include-recipe shell: bash -leo pipefail {0} name: Build conda package - uses: actions/upload-artifact@v4 with: name: lls-core-conda - path: output/ + # Upload the actual conda package + path: output/**/lls-core*.tar.bz2 deploy: # this will run when you have tagged a commit, starting with "v*" From f4f3bbf9facb10fa829550a34cbf9cd05e9fb96f Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Wed, 23 Oct 2024 11:01:44 +1100 Subject: [PATCH 10/10] Fix upload wildcard --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 0ec01af1..6579bad2 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -100,7 +100,7 @@ jobs: with: name: lls-core-conda # Upload the actual conda package - path: output/**/lls-core*.tar.bz2 + path: output/**/lls_core*.tar.bz2 deploy: # this will run when you have tagged a commit, starting with "v*"