Andreas Tille pushed to branch master at Debian Med / dicompyler
Commits: 5e9aeabb by Andreas Tille at 2021-03-25T20:31:45+01:00 Drop version restriction for matplotlib - - - - - 7388324e by Andreas Tille at 2021-03-25T20:37:32+01:00 Add superficial autopkgtest to get failures immediately - - - - - 4 changed files: - debian/changelog - debian/patches/enable_later_versions_of_matplotlib.patch - debian/patches/series - + debian/tests/control Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,11 @@ +dicompyler (0.4.2.0+git20200106.2643e0e-2) UNRELEASED; urgency=medium + + * Drop version restriction for matplotlib + TODO: https://github.com/bastula/dicompyler/issues/137 + * Add superficial autopkgtest to get failures immediately + + -- Andreas Tille <ti...@debian.org> Thu, 25 Mar 2021 17:33:25 +0100 + dicompyler (0.4.2.0+git20200106.2643e0e-1) unstable; urgency=medium * Fetch Git head from upstream to get changes for Python3 soon ===================================== debian/patches/enable_later_versions_of_matplotlib.patch ===================================== @@ -1,66 +1,27 @@ Author: Andreas Tille <ti...@debian.org> -Last-Update: Wed, 10 Sep 2014 23:21:42 +0200 -Description: Try to port dicompyler to current version of matplotlib - Patch is oriented at code found here: - http://sources.debian.net/src/psychopy/1.79.00%2Bgit16-g30c9343.dfsg-1/psychopy/visual/helpers.py/#L41 +Last-Update: Thu, 25 Mar 2021 17:31:37 +0100 +Bug-Debian: https://bugs.debian.org/985891 + This bug is not really fixed yet - see https://github.com/bastula/dicompyler/issues/137 +Description: The packaged Git commit should work with the Debian packaged + matplotlib so simply drop the version restriction for matplotlib ---- a/dicompyler/dvhcalc.py -+++ b/dicompyler/dvhcalc.py -@@ -12,7 +12,11 @@ import logging - logger = logging.getLogger('dicompyler.dvhcalc') - import numpy as np - import numpy.ma as ma --import matplotlib.nxutils as nx -+import matplotlib -+if matplotlib.__version__ > '1.2': -+ from matplotlib.path import Path as mpl_Path -+else: -+ from matplotlib import nxutils as nx - - def get_dvh(structure, dose, limit=None, callback=None): - """Get a calculated cumulative DVH along with the associated parameters.""" -@@ -100,11 +104,17 @@ def calculate_dvh(structure, dose, limit - else: - contour['inside'] = False - for point in contour['data']: -- if nx.pnpoly(point[0], point[1], -+ if matplotlib.__version__ > '1.2': -+ if mpl_Path(np.array(contours[largestIndex]['data'])).contains_point(point): -+ contour['inside'] = True -+ # Assume if one point is inside, all will be inside -+ break -+ else: -+ if nx.pnpoly(point[0], point[1], - np.array(contours[largestIndex]['data'])): -- contour['inside'] = True -- # Assume if one point is inside, all will be inside -- break -+ contour['inside'] = True -+ # Assume if one point is inside, all will be inside -+ break - # If the contour is inside, subtract it from the total histogram - if contour['inside']: - hist -= h -@@ -161,7 +171,10 @@ def calculate_contour_areas(plane): - def get_contour_mask(doselut, dosegridpoints, contour): - """Get the mask for the contour with respect to the dose plane.""" - -- grid = nx.points_inside_poly(dosegridpoints, contour) -+ if matplotlib.__version__ > '1.2': -+ grid = mpl_Path(contour).contains_points(dosegridpoints) -+ else: -+ grid = nx.points_inside_poly(dosegridpoints, contour) - grid = grid.reshape((len(doselut[1]), len(doselut[0]))) - - return grid +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,5 +1,5 @@ + dicompyler-core[image]>=0.5.2 + wxPython>=4.0.0b2 +-matplotlib>=1.3,<2.2 ++matplotlib + numpy>=1.13.1 + https://github.com/darcymason/pydicom/archive/master.zip --- a/setup.py +++ b/setup.py -@@ -14,7 +14,7 @@ from setuptools import setup, find_packa - import sys +@@ -10,7 +10,7 @@ + from setuptools import setup, find_packages requires = [ -- 'matplotlib>=0.99, <=1.1.0', -+ 'matplotlib>=0.99, <=2.0.0', +- 'matplotlib>=1.3.0,<2.2', ++ 'matplotlib', 'numpy>=1.2.1', - 'pillow>=2.5.1', - 'pydicom>=0.9.5, <=0.9.9'] + 'pillow>=1.0', + 'dicompyler-core>=0.5.2', ===================================== debian/patches/series ===================================== @@ -4,6 +4,7 @@ wxpy30-more.patch # enable_later_versions_of_matplotlib.patch # fix-xrc-errors.patch # fix_DicomImporterDialog.patch +enable_later_versions_of_matplotlib.patch 092017A_fixpubsub.patch # 092017B_fiximportasterixs.patch # 092017C_fixwx30.patch ===================================== debian/tests/control ===================================== @@ -0,0 +1,4 @@ +Test-Command: xvfb-run -s "-screen 0 1600x1200x24 -ac +extension GLX +render -noreset" dicompyler -h +Depends: @, xvfb, xauth +Restrictions: superficial + View it on GitLab: https://salsa.debian.org/med-team/dicompyler/-/compare/74dda2cec0328f93e1e6d7ec1e831c7a6296976b...7388324e42b61212b56d44a97874573958889981 -- View it on GitLab: https://salsa.debian.org/med-team/dicompyler/-/compare/74dda2cec0328f93e1e6d7ec1e831c7a6296976b...7388324e42b61212b56d44a97874573958889981 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list debian-med-com...@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit