From 54c8bd41522fb2049de8564ccad635dc7ab4285c Mon Sep 17 00:00:00 2001 From: Joeran Bosma Date: Thu, 10 Oct 2024 12:12:57 +0200 Subject: [PATCH] Bugfix and update versions --- requirements_dev.txt | 14 +++++++------- setup.cfg | 1 + setup.py | 2 +- src/picai_eval/eval.py | 2 +- tests/Development-README.md | 4 ++-- tox.ini | 11 ++++------- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index 9ddac48..0a9d1b3 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,8 +1,8 @@ -flake8==3.9.2 -tox==3.24.3 -pytest==6.2.5 -pytest-cov==2.12.1 -mypy===0.910 +flake8==7.1.1 +tox==4.18.1 +pytest==8.3.2 +pytest-cov==5.0.0 +mypy===1.11.2 +build==1.2.2 +twine==5.1.1 gcapi -build -twine diff --git a/setup.cfg b/setup.cfg index 4199731..a589bdf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,6 +12,7 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 [options] packages = diff --git a/setup.py b/setup.py index ad63c74..56990f3 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ def run(self): long_description = fh.read() setuptools.setup( - version='1.4.8', # also update version in metrics.py -> version + version='1.4.9', # also update version in metrics.py -> version author_email='Joeran.Bosma@radboudumc.nl', long_description=long_description, long_description_content_type="text/markdown", diff --git a/src/picai_eval/eval.py b/src/picai_eval/eval.py index 623b67d..7a7a4cd 100755 --- a/src/picai_eval/eval.py +++ b/src/picai_eval/eval.py @@ -160,7 +160,7 @@ def evaluate_case( overlap = overlap_matrix[lesion_id, lesion_candidate_id] overlap -= 1 # return overlap to [0, 1] - assert overlap > min_overlap, "Overlap must be greater than min_overlap!" + assert overlap >= min_overlap, "Overlap must be at least `min_overlap`!" y_list.append((1, lesion_confidence, overlap)) diff --git a/tests/Development-README.md b/tests/Development-README.md index 59d2073..7dd3210 100644 --- a/tests/Development-README.md +++ b/tests/Development-README.md @@ -29,5 +29,5 @@ AutoPEP8 for formatting (this can be done automatically on save, see e.g. https: # Push release to PyPI 1. Increase version in setup.py, and set below 2. Build: `python -m build` -3. Test package distribution: `python -m twine upload --repository testpypi dist/*1.4.3*` -4. Distribute package to PyPI: `python -m twine upload dist/*1.4.3*` +3. Test package distribution: `python -m twine upload --repository testpypi dist/*1.4.9*` +4. Distribute package to PyPI: `python -m twine upload dist/*1.4.9*` diff --git a/tox.ini b/tox.ini index a19af13..37dfce5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,12 @@ [tox] minversion = 3.8.0 -envlist = py36, py37, py38, py39, flake8 +envlist = py38, py312, flake8 isolated_build = true [gh-actions] python = - 3.6: py36 - 3.7: py37 3.8: py38 - 3.9: py39, flake8 + 3.12: py312, flake8 [testenv] setenv = @@ -19,13 +17,12 @@ commands = pytest --basetemp={envtmpdir} [testenv:flake8] -basepython = python3.9 +basepython = python3.12 deps = flake8 commands = flake8 src tests [testenv:mypy] -basepython = python3.9 +basepython = python3.12 deps = -r{toxinidir}/requirements_dev.txt commands = mypy src -