Skip to content

Commit c69bd8f

Browse files
committed
Merge branch 'master' into fix-fsd
2 parents 07938af + 6bface7 commit c69bd8f

21 files changed

+82
-99
lines changed

.circleci/config.yml

Lines changed: 12 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ commands:
4242
- run:
4343
name: Upgrade pyenv
4444
command: |
45-
rm -rf /opt/circleci/.pyenv
46-
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
45+
sudo rm -rf /opt/circleci/.pyenv
46+
sudo bash -c 'curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | PYENV_ROOT=/opt/circleci/.pyenv bash'
47+
sudo chmod -R 777 /opt/circleci/.pyenv/
4748
pyenv install --list list
4849
- run:
4950
name: Use pyenv to install python
@@ -63,36 +64,10 @@ commands:
6364
command: for i in $(seq 1 10); do [ $i -gt 1 ] && echo "retrying $i" && sleep 5; ./codecov --disable search pycov gcov --file .tox/coverage/py_coverage.xml .tox/coverage/cobertura-coverage.xml && s=0 && break || s=$?; done; (exit $s)
6465

6566
jobs:
66-
py38:
67-
working_directory: ~/project
68-
machine:
69-
image: ubuntu-2004:202111-02
70-
steps:
71-
- checkout
72-
- upgradepython:
73-
version: "3.8"
74-
- run:
75-
name: Use pyenv to set python version
76-
command: |
77-
pyenv versions
78-
pyenv global 3.8
79-
- docker-compose
80-
- restore_cache:
81-
name: Restore external data cache
82-
keys:
83-
- tox-externaldata-{{ checksum "tests/datastore.py" }}
84-
- tox:
85-
env: py38
86-
- save_cache:
87-
name: Save external data cache
88-
key: tox-externaldata-{{ checksum "tests/datastore.py" }}
89-
paths:
90-
- ./.tox/externaldata
91-
- coverage
9267
py39:
9368
working_directory: ~/project
9469
machine:
95-
image: ubuntu-2004:202111-02
70+
image: ubuntu-2204:current
9671
steps:
9772
- checkout
9873
- upgradepython:
@@ -118,7 +93,7 @@ jobs:
11893
py310:
11994
working_directory: ~/project
12095
machine:
121-
image: ubuntu-2004:202111-02
96+
image: ubuntu-2204:current
12297
steps:
12398
- checkout
12499
- upgradepython:
@@ -144,7 +119,7 @@ jobs:
144119
py311:
145120
working_directory: ~/project
146121
machine:
147-
image: ubuntu-2004:202111-02
122+
image: ubuntu-2204:current
148123
steps:
149124
- checkout
150125
- upgradepython:
@@ -170,7 +145,7 @@ jobs:
170145
py312:
171146
working_directory: ~/project
172147
machine:
173-
image: ubuntu-2004:202111-02
148+
image: ubuntu-2204:current
174149
steps:
175150
- checkout
176151
- upgradepython:
@@ -212,7 +187,7 @@ jobs:
212187
docker:
213188
working_directory: ~/project
214189
machine:
215-
image: ubuntu-2004:202111-02
190+
image: ubuntu-2204:current
216191
steps:
217192
- checkout
218193
- run:
@@ -244,7 +219,7 @@ jobs:
244219
publish_docker:
245220
working_directory: ~/project
246221
machine:
247-
image: ubuntu-2004:202111-02
222+
image: ubuntu-2204:current
248223
steps:
249224
- checkout
250225
- attach_workspace:
@@ -264,12 +239,11 @@ jobs:
264239
fi
265240
wheels:
266241
working_directory: ~/project
267-
docker:
268-
- image: cimg/python:3.9
269-
- image: docker:git
242+
machine:
243+
image: ubuntu-2204:current
270244
steps:
271245
- checkout
272-
- setup_remote_docker
246+
# - setup_remote_docker
273247
- run:
274248
name: Setup virtual environment
275249
command: |
@@ -329,13 +303,6 @@ workflows:
329303
version: 2
330304
ci:
331305
jobs:
332-
- py38:
333-
filters:
334-
tags:
335-
only: /^v.*/
336-
branches:
337-
ignore:
338-
- gh-pages
339306
- py39:
340307
filters:
341308
tags:
@@ -387,7 +354,6 @@ workflows:
387354
- gh-pages
388355
- docs-deploy:
389356
requires:
390-
- py38
391357
- py39
392358
- py310
393359
- py311
@@ -404,7 +370,6 @@ workflows:
404370
- sphinx
405371
- publish_docker:
406372
requires:
407-
- py38
408373
- py39
409374
- py310
410375
- py311
@@ -428,7 +393,6 @@ workflows:
428393
only:
429394
- master
430395
jobs:
431-
- py38
432396
- py39
433397
- py310
434398
- py311
@@ -438,7 +402,6 @@ workflows:
438402
- wheels
439403
- publish_docker:
440404
requires:
441-
- py38
442405
- py39
443406
- py310
444407
- py311

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
if: github.repository == 'DigitalSlideArchive/HistomicsTK' && ( startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' )
2323
strategy:
2424
matrix:
25-
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
25+
python: ["3.9", "3.10", "3.11", "3.12"]
2626
steps:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-python@v5
@@ -68,7 +68,7 @@ jobs:
6868
- [ubuntu-latest, x86_64]
6969
- [macos-latest, "x86_64 arm64"]
7070
- [windows-latest, auto64]
71-
python: ["cp38", "cp39", "cp310", "cp311", "cp312"]
71+
python: ["cp39", "cp310", "cp311", "cp312"]
7272
fail-fast: false
7373

7474
steps:
@@ -82,7 +82,7 @@ jobs:
8282
python-version: "3.x"
8383

8484
- name: Build wheels
85-
uses: pypa/cibuildwheel@v2.21.3
85+
uses: pypa/cibuildwheel@v2.22.0
8686
env:
8787
CIBW_BUILD: ${{ matrix.python }}-*
8888
CIBW_TEST_SKIP: "*-macosx_arm64"

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ repos:
6161
hooks:
6262
- id: pyupgrade
6363
args:
64-
- --py37-plus
64+
- --py39-plus
6565
- --keep-percent-format
6666
- repo: https://github.com/pre-commit/mirrors-autopep8
6767
rev: v2.0.4

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ RUN apt-get update && \
3030
# Make a specific version of python the default and install pip
3131
# RUN rm -f /usr/bin/python && \
3232
# rm -f /usr/bin/python3 && \
33-
# ln `which python3.8` /usr/bin/python && \
34-
# ln `which python3.8` /usr/bin/python3 && \
33+
# ln `which python3.12` /usr/bin/python && \
34+
# ln `which python3.12` /usr/bin/python3 && \
3535
# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
3636
# python get-pip.py && \
3737
# rm get-pip.py && \

Dockerfile-wheels

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
FROM dockcross/manylinux2014-x64
1+
FROM dockcross/manylinux_2_28-x64
22

3-
# Don't build python < 3.8
3+
# Don't build python < 3.9
44
RUN rm -rf /opt/python/cp36*
55
RUN rm -rf /opt/python/cp37*
6+
RUN rm -rf /opt/python/cp38*
67
RUN rm -rf /opt/python/pp*
78

89
RUN for PYBIN in /opt/python/*/bin; do \
@@ -62,4 +63,4 @@ RUN cd $htk_path && \
6263
done && \
6364
ls -l /io/wheelhouse && \
6465
mkdir /io/wheels && \
65-
cp /io/wheelhouse/histomicstk*many*2014* /io/wheels/.
66+
cp /io/wheelhouse/histomicstk*manylinux* /io/wheels/.

histomicstk/annotations_and_masks/polygon_merger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88

99
import numpy as np
10-
from imageio import imread
10+
from imageio.v2 import imread
1111
from PIL import Image
1212
# import cv2
1313
from shapely.geometry.polygon import Polygon

histomicstk/annotations_and_masks/tests/test_annotation_and_mask_utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ def test_get_scale_factor_and_appendStr(self):
107107
[(None, 10.), (0.25, '&magnification=10.00000000')],
108108
[(None, None), (1.0, '')],
109109
]
110-
for (MPP, MAG), (sftrue, apstr) in in_out:
111-
sf, appendStr = get_scale_factor_and_appendStr(
112-
gc=cfg.gc, slide_id=cfg.iteminfo['_id'], MPP=MPP, MAG=MAG)
113-
assert sf == sftrue
114-
assert appendStr == apstr
110+
with pytest.warns(RuntimeWarning):
111+
for (MPP, MAG), (sftrue, apstr) in in_out:
112+
sf, appendStr = get_scale_factor_and_appendStr(
113+
gc=cfg.gc, slide_id=cfg.iteminfo['_id'], MPP=MPP, MAG=MAG)
114+
assert sf == sftrue
115+
assert appendStr == apstr

histomicstk/annotations_and_masks/tests/test_annotation_database_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ def test_dump_annotations_locally_1(self):
8888
dbcon = sql_engine.connect()
8989

9090
result = pd.read_sql_query(text("""SELECT count(*) FROM 'folders';"""), dbcon)
91-
assert int(result.loc[0, :]) == 2
91+
assert int(result.iloc[0, 0]) == 2
9292

9393
result = pd.read_sql_query(text("""SELECT count(*) FROM 'items';"""), dbcon)
94-
assert int(result.loc[0, :]) == 4
94+
assert int(result.iloc[0, 0]) == 4
9595

9696
# cleanup
9797
shutil.rmtree(savepath)

histomicstk/annotations_and_masks/tests/test_annotations_to_object_mask_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import numpy as np
88
import pytest
9-
from imageio import imread
9+
from imageio.v2 import imread
1010
from pandas import read_csv
1111

1212
from histomicstk.annotations_and_masks.annotation_and_mask_utils import (

histomicstk/annotations_and_masks/tests/test_masks_to_annotations_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import pandas as pd
1010
import pytest
11-
from imageio import imread
11+
from imageio.v2 import imread
1212
from pandas import read_csv
1313

1414
from histomicstk.annotations_and_masks.annotation_and_mask_utils import \

0 commit comments

Comments
 (0)