Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build #17

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/omero_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
12 changes: 12 additions & 0 deletions .omeroci/app-deps
Original file line number Diff line number Diff line change
@@ -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
18 changes: 9 additions & 9 deletions omero_web_zarr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 19 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
license=LICENSE,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_ngff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading