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..b07c8ae 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -7,14 +7,16 @@ jobs: name: Build and publish Python distribution to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@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 - 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.3.0 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: password: ${{ secrets.PYPI_PASSWORD }} 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 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)