Skip to content

Commit

Permalink
Merge branch 'master' into merge-annotation-permissions-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffbaumes committed Nov 12, 2024
2 parents fe1eed3 + a71b018 commit eefa9d8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@
- Format dates in item lists ([#1707](../../pull/1707))
- Guard dtype types ([#1711](../../pull/1711), [#1714](../../pull/1714), [#1716](../../pull/1716))
- Better handle IndicaLabs tiff files ([#1717](../../pull/1717))
- Better detect files with geotransform data that aren't geospatial ([#1718](../../pull/1718))

### Changes

- Openslide now requires the binary wheel on appropriate platforms ([#1709](../../pull/1709), [#1710](../../pull/1710))

### Bug Fixes

- Fix an issue searching for annotation metadata on items that a user doesn't have permissions to view ([#1723](../../pull/1723))

## 1.30.2

### Features
Expand Down
7 changes: 6 additions & 1 deletion girder/girder_large_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,12 @@ def metadataSearchHandler( # noqa
if id in foundIds:
continue
foundIds.add(id)
entry = resultModelInst.load(id=id, user=user, level=level, exc=False)
try:
entry = resultModelInst.load(id=id, user=user, level=level, exc=False)
except Exception:
# We might have permission to view an annotation but not
# the item
continue
if entry is not None and offset:
offset -= 1
continue
Expand Down
8 changes: 7 additions & 1 deletion sources/gdal/large_image_source_gdal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,13 @@ def isGeospatial(path):
if ds.GetProjection():
return True
if ds.GetGeoTransform(can_return_null=True):
return True
w = ds.RasterXSize
h = ds.RasterYSize
trans = ds.GetGeoTransform(can_return_null=True)
cornersy = [trans[3] + x * trans[4] + y * trans[5]
for x, y in {(0, 0), (0, h), (w, 0), (w, h)}]
if min(cornersy) >= -90 and max(cornersy) <= 90:
return True
if ds.GetDriver().ShortName in {'NITF', 'netCDF'}:
return True
return False
Expand Down
11 changes: 9 additions & 2 deletions test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,20 @@ RUN apt-get update && \
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash && \
find / -xdev -name __pycache__ -type d -exec rm -r {} \+ && \
rm -r /etc/ssh/ssh_host* && \
rm -rf /usr/share/vim/vim91/{doc,tutor}/* /usr/share/doc && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/*

RUN git clone "https://github.com/universal-ctags/ctags.git" "./ctags" && \
cd ./ctags && \
./autogen.sh && \
./configure && \
export CFLAGS="-g0 -Os -DNDEBUG" && \
export LDFLAGS="-Wl,--strip-debug,--strip-discarded,--discard-locals" && \
make -j `nproc` && \
make install -j `nproc` && \
cd .. && \
rm -rf ./ctags
rm -rf ./ctags && \
rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /usr/local/bin

RUN pyenv update && \
pyenv install --list && \
Expand All @@ -95,7 +99,9 @@ RUN pyenv update && \
find $PYENV_ROOT/versions -type f '(' -name '*.py[co]' -o -name '*.exe' ')' -exec rm -fv '{}' + >/dev/null && \
echo $PYTHON_VERSIONS | tr " " "\n" > $PYENV_ROOT/version && \
find / -xdev -name __pycache__ -type d -exec rm -r {} \+ && \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /tmp/* /var/tmp/* /root/.cache/* && \
find /.pyenv -name '*.so' -o -name '*.a' -o -name '*.so.*' -exec strip --strip-unneeded -p -D {} \; && \
find /.pyenv -name 'libpython*.a' -delete && \
# This makes duplicate python library files hardlinks of each other \
rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /.pyenv

Expand All @@ -118,6 +124,7 @@ RUN . ~/.bashrc && \
nvm install 14 && \
nvm alias default 14 && \
nvm use default && \
rm -rf /root/.nvm/.cache && \
ln -s $(dirname `which npm`) /usr/local/node

ENV PATH="/usr/local/node:$PATH"
Expand Down

0 comments on commit eefa9d8

Please sign in to comment.