Skip to content

Commit

Permalink
Merge pull request #1411 from girder/cleanup-old-version
Browse files Browse the repository at this point in the history
Clean up some old python version code.
  • Loading branch information
manthey authored Dec 18, 2023
2 parents eb7f658 + fed6eb1 commit 7d579ca
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ girder-jobs>=3.0.3
-e sources/dicom
-e sources/dummy
-e sources/gdal
-e sources/multi
-e sources/multi[all]
-e sources/nd2
-e sources/openjpeg
-e sources/openslide
Expand Down
2 changes: 1 addition & 1 deletion requirements-test-core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sources/deepzoom
sources/dicom
sources/dummy
sources/gdal
sources/multi
sources/multi[all]
sources/nd2
sources/openjpeg
sources/openslide
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sources/deepzoom
sources/dicom
sources/dummy
sources/gdal
sources/multi
sources/multi[all]
sources/nd2
sources/openjpeg
sources/openslide
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def prerelease_local_scheme(version):
extraReqs.update(sources)
extraReqs['sources'] = list(set(itertools.chain.from_iterable(sources.values())))
extraReqs['all'] = list(set(itertools.chain.from_iterable(extraReqs.values())) | {
f'large-image-source-multi[all]{limit_version}',
f'large-image-source-pil[all]{limit_version}',
f'large-image-source-rasterio[all]{limit_version}',
})
Expand Down
13 changes: 9 additions & 4 deletions sources/multi/large_image_source_multi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,6 @@ def _addSourceToTile(self, tile, sourceEntry, corners, scale):
x = y = 0
# If there is no transform or the diagonals are positive and there is
# no sheer, use getRegion with an appropriate size (be wary of edges)
# TODO: when affine is generalized, only use this if scale is 1
if (transform is None or
transform[0][0] > 0 and transform[0][1] == 0 and
transform[1][0] == 0 and transform[1][1] > 0):
Expand Down Expand Up @@ -1006,10 +1005,16 @@ def _addSourceToTile(self, tile, sourceEntry, corners, scale):
sourceTile, _ = ts.getRegion(
region=region, output=output, frame=sourceEntry.get('frame', 0),
format=TILE_FORMAT_NUMPY)
# Otherwise, get an area twice as big as needed and use
# scipy.ndimage.affine_transform to transform it
# Otherwise, determine where the target tile's corners are located on
# the source; fetch that so that we have at least sqrt(2) more
# resolution, then use scikit-image warp to transform it. scikit-image
# does a better job than scipy.ndimage.affine_transform.
else:
# TODO
# try:
# import skimge.transform
# except ImportError:
# msg = 'scikit-image is required for affine transforms.'
# raise TileSourceError(msg)
msg = 'Not implemented'
raise TileSourceError(msg)
# Crop
Expand Down
7 changes: 3 additions & 4 deletions sources/multi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def prerelease_local_scheme(version):
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand All @@ -56,10 +54,11 @@ def prerelease_local_scheme(version):
'jsonschema',
f'large-image{limit_version}',
'pyyaml',
'scipy',
'importlib-metadata<5 ; python_version < "3.8"',
],
extras_require={
'all': [
'scikit-image',
],
'girder': f'girder-large-image{limit_version}',
},
keywords='large_image, tile source',
Expand Down
5 changes: 1 addition & 4 deletions sources/zarr/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def prerelease_local_scheme(version):
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand All @@ -53,9 +52,7 @@ def prerelease_local_scheme(version):
],
install_requires=[
f'large-image{limit_version}',
'zarr ; python_version >= "3.8"',
'zarr<2.11 ; python_version < "3.8"',
'importlib-metadata<5 ; python_version < "3.8"',
'zarr',
],
extras_require={
'girder': f'girder-large-image{limit_version}',
Expand Down

0 comments on commit 7d579ca

Please sign in to comment.