From d43c41df67ca8390dc50fc4210dc56cd16784437 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Thu, 21 Nov 2024 14:29:35 +0000 Subject: [PATCH 1/6] Bump actions/checkout to v4 --- .github/workflows/omero_plugin.yml | 2 +- .github/workflows/publish_pypi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/omero_plugin.yml b/.github/workflows/omero_plugin.yml index a739209..60d9cc0 100644 --- a/.github/workflows/omero_plugin.yml +++ b/.github/workflows/omero_plugin.yml @@ -23,7 +23,7 @@ jobs: env: STAGE: app steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Checkout omero-test-infra uses: actions/checkout@master with: diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 81eccda..436eafb 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -7,7 +7,7 @@ jobs: name: Build and publish Python distribution to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 - name: Build a binary wheel and a source tarball run: | From fb6b6e9e8af3d8dd15d3621e71fd75abd5afc0dd Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Thu, 21 Nov 2024 14:30:01 +0000 Subject: [PATCH 2/6] Bump actions/setup-python to v5 --- .github/workflows/publish_pypi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 436eafb..3781dfa 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -8,7 +8,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' - name: Build a binary wheel and a source tarball run: | python -mpip install wheel From 779dcb6cdf844994f9d242b977e4cad38857d9bd Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Thu, 21 Nov 2024 14:30:19 +0000 Subject: [PATCH 3/6] Bump pypa/gh-action-pypi-publish to 1.8.14 --- .github/workflows/publish_pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 3781dfa..666ed3d 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -17,6 +17,6 @@ jobs: python setup.py sdist bdist_wheel - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@v1.3.0 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: password: ${{ secrets.PYPI_PASSWORD }} From c84669ca960b4890f13c94f6aa75372539be9c7c Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Thu, 21 Nov 2024 14:30:48 +0000 Subject: [PATCH 4/6] Use build instead of sdist --- .github/workflows/publish_pypi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 666ed3d..b07c8ae 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -13,8 +13,8 @@ jobs: python-version: '3.10' - name: Build a binary wheel and a source tarball run: | - python -mpip install wheel - python setup.py sdist bdist_wheel + python -m pip install build + python -m build - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@v1.8.14 From 020e85775bda54e9136b3fb9e699411e0d4f8c95 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sun, 24 Nov 2024 22:26:03 +0000 Subject: [PATCH 5/6] Fix flake8 error --- omero_web_zarr/utils.py | 18 ++++++++--------- setup.py | 38 +++++++++++++++++------------------ test/integration/test_ngff.py | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/omero_web_zarr/utils.py b/omero_web_zarr/utils.py index 13242e5..077e763 100644 --- a/omero_web_zarr/utils.py +++ b/omero_web_zarr/utils.py @@ -87,12 +87,12 @@ def marshal_axes(image, version): def generate_coordinate_transformations(shapes): - data_shape = shapes[0] - transformations = [] - # calculate minimal 'scale' transform based on pyramid dims - for shape in shapes: - assert len(shape) == len(data_shape) - scale = [full / level for full, level in zip(data_shape, shape)] - transformations.append([{"type": "scale", "scale": scale}]) - - return transformations + data_shape = shapes[0] + transformations = [] + # calculate minimal 'scale' transform based on pyramid dims + for shape in shapes: + assert len(shape) == len(data_shape) + scale = [full / level for full, level in zip(data_shape, shape)] + transformations.append([{"type": "scale", "scale": scale}]) + + return transformations diff --git a/setup.py b/setup.py index 76d0126..a564621 100644 --- a/setup.py +++ b/setup.py @@ -69,25 +69,25 @@ def read(fname): version=VERSION, description=DESCRIPTION, long_description=read('README.rst'), - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Environment :: Web Environment', - 'Framework :: Django', - 'Intended Audience :: End Users/Desktop', - 'Intended Audience :: Science/Research', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: JavaScript', - 'Programming Language :: Python :: 3', - 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Internet :: WWW/HTTP :: WSGI', - 'Topic :: Scientific/Engineering :: Visualization', - 'Topic :: Software Development :: Libraries :: ' - 'Application Frameworks', - 'Topic :: Text Processing :: Markup :: HTML' - ], # Get strings from - # http://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Environment :: Web Environment', + 'Framework :: Django', + 'Intended Audience :: End Users/Desktop', + 'Intended Audience :: Science/Research', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: JavaScript', + 'Programming Language :: Python :: 3', + 'Topic :: Internet :: WWW/HTTP', + 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', + 'Topic :: Internet :: WWW/HTTP :: WSGI', + 'Topic :: Scientific/Engineering :: Visualization', + 'Topic :: Software Development :: Libraries :: ' + 'Application Frameworks', + 'Topic :: Text Processing :: Markup :: HTML' + ], # Get strings from + # http://pypi.python.org/pypi?%3Aaction=list_classifiers author=AUTHOR, author_email='ome-devel@lists.openmicroscopy.org.uk', license=LICENSE, diff --git a/test/integration/test_ngff.py b/test/integration/test_ngff.py index c962c15..0bf1b2b 100644 --- a/test/integration/test_ngff.py +++ b/test/integration/test_ngff.py @@ -83,7 +83,7 @@ def test_image_zarr(self, user1, tmpdir, version): kwargs = {"iid": image_id, "version": version} zattrs_url = reverse('zarr_image_zattrs', kwargs=kwargs) zattrs_json = get_json(django_client, zattrs_url) - assert(len(zattrs_json["multiscales"]) == 1) + assert len(zattrs_json["multiscales"]) == 1 zgroup_url = reverse('zarr_image_zgroup', kwargs=kwargs) zgroup_json = get_json(django_client, zgroup_url) From 95ff08b2a68cca22dc7cb6eb56b8b2faa53012bc Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Sat, 14 Dec 2024 19:36:09 +0000 Subject: [PATCH 6/6] Install test dependencies --- .omeroci/app-deps | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .omeroci/app-deps diff --git a/.omeroci/app-deps b/.omeroci/app-deps new file mode 100755 index 0000000..3d3d58e --- /dev/null +++ b/.omeroci/app-deps @@ -0,0 +1,12 @@ +#!/bin/bash +source /infra/utils + +set -u +set -x + +TARGET=${TARGET:-..} + +dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) +cd $TARGET + +pip install --upgrade ome_zarr