From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mO02NLixRmNkAAEAbAwnHQ (envelope-from ) for ; Wed, 12 Oct 2022 14:23:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gGdTM7ixRmOWFAEAG6o9tA (envelope-from ) for ; Wed, 12 Oct 2022 14:23:20 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C29581291E for ; Wed, 12 Oct 2022 14:23:19 +0200 (CEST) Received: from localhost ([::1]:57182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oialZ-00018s-QA for larch@yhetil.org; Wed, 12 Oct 2022 08:23:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oialM-000155-2d for guix-patches@gnu.org; Wed, 12 Oct 2022 08:23:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oialL-0008Dm-R4 for guix-patches@gnu.org; Wed, 12 Oct 2022 08:23:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oialK-0004xX-Id for guix-patches@gnu.org; Wed, 12 Oct 2022 08:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58466] [PATCH] gnu: python-seaborn: Update to 0.12.0. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Oct 2022 12:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58466 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58466@debbugs.gnu.org Cc: Arun Isaac X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166557733618991 (code B ref -1); Wed, 12 Oct 2022 12:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Oct 2022 12:22:16 +0000 Received: from localhost ([127.0.0.1]:55991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiakZ-0004wD-N9 for submit@debbugs.gnu.org; Wed, 12 Oct 2022 08:22:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:33330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiakW-0004w6-I9 for submit@debbugs.gnu.org; Wed, 12 Oct 2022 08:22:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiakW-00080P-C9 for guix-patches@gnu.org; Wed, 12 Oct 2022 08:22:12 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:59776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiakR-00084V-Fq for guix-patches@gnu.org; Wed, 12 Oct 2022 08:22:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cfWtCB//5gveWVtX6lynxcoCQDBOc5RkwmPPSOUUMXk=; b=NNX8fRPqW42FeeXGcFm1PYX6f3 XhT3gHhuDZilzSpoQ11DBijXGIKU/rdwDNG6U1129lYIUwPj1hOOqowOOot34ptF7HsNaVGHdz1xn rS+j/yUcVe+jOYnrioa59WFTv6zosbxDU17cA6y+0DRE/sjqlYdSs7mHE/SAvlSyKt5XtcaJV5p4K p8f1h/sQwYuenykrmf2v21yuxS8mQq5Y+KIpvSbhcZFUANP4MK2aAOSX3atphza/Jt6AicQSvpSI3 lbJm1EJrkTq0qhKfTi0PByVgARws8cd8fAT1dpNVQhIFSBsM6B3nrNAi5jTIqseworj2HmjjHBa+t ex1hIizw==; Received: from [192.168.2.1] (port=5616 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oiakK-00029r-1e; Wed, 12 Oct 2022 17:52:00 +0530 From: Arun Isaac Date: Wed, 12 Oct 2022 17:51:54 +0530 Message-Id: <20221012122154.12160-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665577400; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=cfWtCB//5gveWVtX6lynxcoCQDBOc5RkwmPPSOUUMXk=; b=OJGrmjAT4W/BvFYHwmQjfzzy8XvvPFm3Ne7afCIl1JZ/Ymc/YIA1L4lVkWZnhsiLoJ7mL/ lBQdPpbwfDmUwtyqYvXtYsEHJjndvjeThROuXSOM8e7uaDYehMGhUYaRhl7yLxMy+L418B YvXdPMC5sjrr26TV+6g8XVBhR0xbYquhURvk/D4no39rZJ2lkxCxPUz/ZE1BEcBpI3Hasy D8+N/egjTcAxOG+/FI0+CcV/QKJhw4rzqYXvWJ7h0kBmtt+BmQMbw+UfnaGqACzk7y1iKz wL30HHcdH5oW/MZF8wNZrCqUNoWoLpOi9Hpm4IESQBekISh0tJUABxVktxafWA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665577400; a=rsa-sha256; cv=none; b=etvhys7As8YwmG+hQbhBAiCR9KvaCHuOkJhcmoonr6stfiq7cBXhEll6vOGWlcS86ZTXkd xUPqnltlUe0eAm74z6VsZYcjMOCMrN36nlVMSvHFsgAwmpAFpaqHmbBbJPE4M0yC/vXv3H KpVqOg+3Sa93dl0+u4fyMfe+eAJArmNtFoHFhha3ykQ5ox8K09ynUj+WDvbeT/ilm7s1NE XNu4yhhbyGM2DS1dwUqoua37O8GWInt4BOCzp5dYdVPFsQ6pHGxcLTpHZBspor5Jf2resS Zov/JPzu38byCUgXaWU92nbt79jAyEJQ28cv/WUTr2GOVwd4sgItJ+FnwnDLVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=NNX8fRPq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.80 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=NNX8fRPq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C29581291E X-Spam-Score: 6.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: qUjJAY4+aSQB * gnu/packages/python-xyz.scm (python-seaborn): Update to 0.12.0. [source]: Remove patches. [arguments]: Import (ice-9 match) module. Remove patch-more-tests and start-xserver phases. Replace build and install phases. Fix pytest command in check phase. [native-inputs]: Add python-flit-core and python-pypa-build. Remove xorg-server-for-tests. * gnu/packages/patches/python-seaborn-2690.patch, gnu/packages/patches/python-seaborn-kde-test.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Unregister them. --- gnu/local.mk | 2 - .../patches/python-seaborn-2690.patch | 268 ------------------ .../patches/python-seaborn-kde-test.patch | 36 --- gnu/packages/python-xyz.scm | 46 ++- 4 files changed, 21 insertions(+), 331 deletions(-) delete mode 100644 gnu/packages/patches/python-seaborn-2690.patch delete mode 100644 gnu/packages/patches/python-seaborn-kde-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index 195bbcc40a..bd3eb1d4f0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1745,8 +1745,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-robotframework-atest.patch \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \ - %D%/packages/patches/python-seaborn-kde-test.patch \ - %D%/packages/patches/python-seaborn-2690.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-versioneer-guix-support.patch \ diff --git a/gnu/packages/patches/python-seaborn-2690.patch b/gnu/packages/patches/python-seaborn-2690.patch deleted file mode 100644 index 4662d19c2d..0000000000 --- a/gnu/packages/patches/python-seaborn-2690.patch +++ /dev/null @@ -1,268 +0,0 @@ -This patch was adapted from the upstream pull request 2690. - -From ebd6812d48f5b8ed1ebb7d79bda0b2a7b9ae2812 Mon Sep 17 00:00:00 2001 -From: Michael Waskom -Date: Sun, 31 Oct 2021 15:09:27 -0400 -Subject: [PATCH 1/4] Update boxplot tests for mpl3.5 compatability - ---- - seaborn/tests/test_categorical.py | 30 +++++++++++++++++++----------- - 1 file changed, 19 insertions(+), 11 deletions(-) - -diff --git a/seaborn/tests/test_categorical.py b/seaborn/tests/test_categorical.py -index d4e09b703..488fad2d6 100644 ---- a/seaborn/tests/test_categorical.py -+++ b/seaborn/tests/test_categorical.py -@@ -110,6 +110,11 @@ class CategoricalFixture: - df = pd.DataFrame(dict(y=y, g=g, h=h, u=u)) - x_df["W"] = g - -+ def get_box_artists(self, ax): -+ -+ # Exclude labeled patches, which are for the legend -+ return [p for p in ax.patches if not p.get_label()] -+ - - class TestCategoricalPlotter(CategoricalFixture): - -@@ -855,12 +863,12 @@ def test_hue_offsets(self): - def test_axes_data(self): - - ax = cat.boxplot(x="g", y="y", data=self.df) -- assert len(ax.artists) == 3 -+ assert len(self.get_box_artists(ax)) == 3 - - plt.close("all") - - ax = cat.boxplot(x="g", y="y", hue="h", data=self.df) -- assert len(ax.artists) == 6 -+ assert len(self.get_box_artists(ax)) == 6 - - plt.close("all") - -@@ -868,14 +876,14 @@ def test_box_colors(self): - - ax = cat.boxplot(x="g", y="y", data=self.df, saturation=1) - pal = palettes.color_palette(n_colors=3) -- for patch, color in zip(ax.artists, pal): -+ for patch, color in zip(self.get_box_artists(ax), pal): - assert patch.get_facecolor()[:3] == color - - plt.close("all") - - ax = cat.boxplot(x="g", y="y", hue="h", data=self.df, saturation=1) - pal = palettes.color_palette(n_colors=2) -- for patch, color in zip(ax.artists, pal * 2): -+ for patch, color in zip(self.get_box_artists(ax), pal * 2): - assert patch.get_facecolor()[:3] == color - - plt.close("all") -@@ -884,7 +892,7 @@ def test_draw_missing_boxes(self): - - ax = cat.boxplot(x="g", y="y", data=self.df, - order=["a", "b", "c", "d"]) -- assert len(ax.artists) == 3 -+ assert len(self.get_box_artists(ax)) == 3 - - def test_missing_data(self): - -@@ -894,13 +902,13 @@ def test_missing_data(self): - y[-2:] = np.nan - - ax = cat.boxplot(x=x, y=y) -- assert len(ax.artists) == 3 -+ assert len(self.get_box_artists(ax)) == 3 - - plt.close("all") - - y[-1] = 0 - ax = cat.boxplot(x=x, y=y, hue=h) -- assert len(ax.artists) == 7 -+ assert len(self.get_box_artists(ax)) == 7 - - plt.close("all") - -@@ -2766,11 +2774,11 @@ def test_plot_elements(self): - - g = cat.catplot(x="g", y="y", data=self.df, kind="box") - want_artists = self.g.unique().size -- assert len(g.ax.artists) == want_artists -+ assert len(self.get_box_artists(g.ax)) == want_artists - - g = cat.catplot(x="g", y="y", hue="h", data=self.df, kind="box") - want_artists = self.g.unique().size * self.h.unique().size -- assert len(g.ax.artists) == want_artists -+ assert len(self.get_box_artists(g.ax)) == want_artists - - g = cat.catplot(x="g", y="y", data=self.df, - kind="violin", inner=None) -@@ -3137,14 +3145,14 @@ def test_box_colors(self): - - ax = cat.boxenplot(x="g", y="y", data=self.df, saturation=1) - pal = palettes.color_palette(n_colors=3) -- for patch, color in zip(ax.artists, pal): -+ for patch, color in zip(self.get_box_artists(ax), pal): - assert patch.get_facecolor()[:3] == color - - plt.close("all") - - ax = cat.boxenplot(x="g", y="y", hue="h", data=self.df, saturation=1) - pal = palettes.color_palette(n_colors=2) -- for patch, color in zip(ax.artists, pal * 2): -+ for patch, color in zip(self.get_box_artists(ax), pal * 2): - assert patch.get_facecolor()[:3] == color - - plt.close("all") - -From ff78ed38817a346e760194ab3b03b28d7ea3ba1b Mon Sep 17 00:00:00 2001 -From: Michael Waskom -Date: Sun, 31 Oct 2021 15:50:54 -0400 -Subject: [PATCH 2/4] Update kdeplot tests for mpl3.5 compatability - ---- - seaborn/tests/test_distributions.py | 53 ++++++++++++++++++++--------- - 1 file changed, 37 insertions(+), 16 deletions(-) - -diff --git a/seaborn/tests/test_distributions.py b/seaborn/tests/test_distributions.py -index d241fd978..466efb69e 100644 ---- a/seaborn/tests/test_distributions.py -+++ b/seaborn/tests/test_distributions.py -@@ -39,6 +39,27 @@ - ) - - -+def get_contour_coords(c): -+ """Provide compatability for change in contour artist type in mpl3.5.""" -+ # See https://github.com/matplotlib/matplotlib/issues/20906 -+ if isinstance(c, mpl.collections.LineCollection): -+ return c.get_segments() -+ elif isinstance(c, mpl.collections.PathCollection): -+ return [p.vertices[:np.argmax(p.codes) + 1] for p in c.get_paths()] -+ -+ -+def get_contour_color(c): -+ """Provide compatability for change in contour artist type in mpl3.5.""" -+ # See https://github.com/matplotlib/matplotlib/issues/20906 -+ if isinstance(c, mpl.collections.LineCollection): -+ return c.get_color() -+ elif isinstance(c, mpl.collections.PathCollection): -+ if c.get_facecolor().size: -+ return c.get_facecolor() -+ else: -+ return c.get_edgecolor() -+ -+ - class TestDistPlot(object): - - rs = np.random.RandomState(0) -@@ -902,7 +923,7 @@ def test_fill_artists(self, long_df): - f, ax = plt.subplots() - kdeplot(data=long_df, x="x", y="y", hue="c", fill=fill) - for c in ax.collections: -- if fill: -+ if fill or Version(mpl.__version__) >= Version("3.5.0b0"): - assert isinstance(c, mpl.collections.PathCollection) - else: - assert isinstance(c, mpl.collections.LineCollection) -@@ -918,8 +939,8 @@ def test_common_norm(self, rng): - kdeplot(x=x, y=y, hue=hue, common_norm=True, ax=ax1) - kdeplot(x=x, y=y, hue=hue, common_norm=False, ax=ax2) - -- n_seg_1 = sum([len(c.get_segments()) > 0 for c in ax1.collections]) -- n_seg_2 = sum([len(c.get_segments()) > 0 for c in ax2.collections]) -+ n_seg_1 = sum([len(get_contour_coords(c)) > 0 for c in ax1.collections]) -+ n_seg_2 = sum([len(get_contour_coords(c)) > 0 for c in ax2.collections]) - assert n_seg_2 > n_seg_1 - - def test_log_scale(self, rng): -@@ -946,7 +967,7 @@ def test_log_scale(self, rng): - ax2.contour(10 ** xx, yy, density, levels=levels) - - for c1, c2 in zip(ax1.collections, ax2.collections): -- assert_array_equal(c1.get_segments(), c2.get_segments()) -+ assert_array_equal(get_contour_coords(c1), get_contour_coords(c2)) - - def test_bandwidth(self, rng): - -@@ -959,7 +980,7 @@ def test_bandwidth(self, rng): - kdeplot(x=x, y=y, bw_adjust=2, ax=ax2) - - for c1, c2 in zip(ax1.collections, ax2.collections): -- seg1, seg2 = c1.get_segments(), c2.get_segments() -+ seg1, seg2 = get_contour_coords(c1), get_contour_coords(c2) - if seg1 + seg2: - x1 = seg1[0][:, 0] - x2 = seg2[0][:, 0] -@@ -980,9 +1001,9 @@ def test_weights(self, rng): - kdeplot(x=x, y=y, hue=hue, weights=weights, ax=ax2) - - for c1, c2 in zip(ax1.collections, ax2.collections): -- if c1.get_segments() and c2.get_segments(): -- seg1 = np.concatenate(c1.get_segments(), axis=0) -- seg2 = np.concatenate(c2.get_segments(), axis=0) -+ if get_contour_coords(c1) and get_contour_coords(c2): -+ seg1 = np.concatenate(get_contour_coords(c1), axis=0) -+ seg2 = np.concatenate(get_contour_coords(c2), axis=0) - assert not np.array_equal(seg1, seg2) - - def test_hue_ignores_cmap(self, long_df): -@@ -1030,7 +1051,7 @@ def test_levels_and_thresh(self, long_df): - kdeplot(**plot_kws, levels=np.linspace(thresh, 1, n), ax=ax2) - - for c1, c2 in zip(ax1.collections, ax2.collections): -- assert_array_equal(c1.get_segments(), c2.get_segments()) -+ assert_array_equal(get_contour_coords(c1), get_contour_coords(c2)) - - with pytest.raises(ValueError): - kdeplot(**plot_kws, levels=[0, 1, 2]) -@@ -1042,7 +1063,7 @@ def test_levels_and_thresh(self, long_df): - kdeplot(**plot_kws, levels=n, thresh=0, ax=ax2) - - for c1, c2 in zip(ax1.collections, ax2.collections): -- assert_array_equal(c1.get_segments(), c2.get_segments()) -+ assert_array_equal(get_contour_coords(c1), get_contour_coords(c2)) - for c1, c2 in zip(ax1.collections, ax2.collections): - assert_array_equal(c1.get_facecolors(), c2.get_facecolors()) - -@@ -2322,13 +2343,13 @@ def test_bivariate_kde_norm(self, rng): - z = [0] * 80 + [1] * 20 - - g = displot(x=x, y=y, col=z, kind="kde", levels=10) -- l1 = sum(bool(c.get_segments()) for c in g.axes.flat[0].collections) -- l2 = sum(bool(c.get_segments()) for c in g.axes.flat[1].collections) -+ l1 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[0].collections) -+ l2 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[1].collections) - assert l1 > l2 - - g = displot(x=x, y=y, col=z, kind="kde", levels=10, common_norm=False) -- l1 = sum(bool(c.get_segments()) for c in g.axes.flat[0].collections) -- l2 = sum(bool(c.get_segments()) for c in g.axes.flat[1].collections) -+ l1 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[0].collections) -+ l2 = sum(bool(get_contour_coords(c)) for c in g.axes.flat[1].collections) - assert l1 == l2 - - def test_bivariate_hist_norm(self, rng): - -From a20ce3fabeb23c97b5827d9fb0c6a96ac109ea64 Mon Sep 17 00:00:00 2001 -From: Michael Waskom -Date: Sun, 31 Oct 2021 16:10:47 -0400 -Subject: [PATCH 3/4] Update legend tests for mpl3.5 compatability - ---- - seaborn/tests/test_distributions.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/seaborn/tests/test_distributions.py b/seaborn/tests/test_distributions.py -index 466efb69e..024fe7541 100644 ---- a/seaborn/tests/test_distributions.py -+++ b/seaborn/tests/test_distributions.py -@@ -872,7 +872,7 @@ def test_legend(self, long_df): - for label, level in zip(legend_labels, order): - assert label.get_text() == level - -- legend_artists = ax.legend_.findobj(mpl.lines.Line2D)[::2] -+ legend_artists = ax.legend_.findobj(mpl.lines.Line2D) - palette = color_palette() - for artist, color in zip(legend_artists, palette): - assert_colors_equal(artist.get_color(), color) - diff --git a/gnu/packages/patches/python-seaborn-kde-test.patch b/gnu/packages/patches/python-seaborn-kde-test.patch deleted file mode 100644 index f300dffc6f..0000000000 --- a/gnu/packages/patches/python-seaborn-kde-test.patch +++ /dev/null @@ -1,36 +0,0 @@ -This patch is an excerpt of this upstream commit: - - commit 0a24478a550132f1882e5be5f5dbc0fc446a8a6c - Author: Michael Waskom - Date: Mon Dec 21 18:44:58 2020 -0500 - - Raise minimal supported Python to 3.7 and bump requirements (#2396) - -It fixes the failure of 'test_weights'. - ---- a/seaborn/tests/test_distributions.py -+++ b/seaborn/tests/test_distributions.py -@@ -709,21 +708,17 @@ class TestKDEPlotUnivariate: - integral = integrate.trapz(ydata, np.log10(xdata)) - assert integral == pytest.approx(1) - -- @pytest.mark.skipif( -- LooseVersion(scipy.__version__) < "1.2.0", -- reason="Weights require scipy >= 1.2.0" -- ) - def test_weights(self): - - x = [1, 2] - weights = [2, 1] - -- ax = kdeplot(x=x, weights=weights) -+ ax = kdeplot(x=x, weights=weights, bw_method=.1) - - xdata, ydata = ax.lines[0].get_xydata().T - -- y1 = ydata[np.argwhere(np.abs(xdata - 1).min())] -- y2 = ydata[np.argwhere(np.abs(xdata - 2).min())] -+ y1 = ydata[np.abs(xdata - 1).argmin()] -+ y2 = ydata[np.abs(xdata - 2).argmin()] - - assert y1 == pytest.approx(2 * y2) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7c647bd42f..593af72575 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -9975,40 +9975,36 @@ (define-public python-pyqrcode (define-public python-seaborn (package (name "python-seaborn") - (version "0.11.2") + (version "0.12.0") (source (origin (method url-fetch) (uri (pypi-uri "seaborn" version)) (sha256 (base32 - "1xpl3zb945sihsiwm9q1yyx84sakk1phcg0fprj6i0j0dllfjifg")) - (patches (search-patches "python-seaborn-kde-test.patch" - "python-seaborn-2690.patch")))) + "08vvnp4ps86857imxz2l5xi2vir5xdcdp3apq4badb4b5llifgw9")))) (build-system python-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-more-tests - (lambda _ - (substitute* "seaborn/tests/test_distributions.py" - (("get_contour_color\\(ax\\.collections\\[0\\]\\)") - "get_contour_color(ax.collections[0])") - (("c\\.get_color\\(\\)") "get_contour_color(c)") - (("def test_hue_ignores_cmap") - "def skip_test_hue_ignores_cmap") - (("def test_fill_artists") - "def skip_test_fill_artists") - (("def test_with_rug") "def skip_test_with_rug")))) - (add-before 'check 'start-xserver - (lambda _ - (system "Xvfb :1 &") - (setenv "DISPLAY" ":1"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "seaborn"))))))) + (list #:modules '((guix build python-build-system) + (guix build utils) + (ice-9 match)) + #:phases #~(modify-phases %standard-phases + (replace 'build + (lambda _ + (invoke "python" "-m" "build" "--wheel" "--no-isolation" "."))) + (replace 'install + (lambda _ + (match (find-files "dist" "\\.whl$") + ((wheel _ ...) + (invoke "python" "-m" "pip" "install" + (string-append "--prefix=" #$output) + wheel))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) (propagated-inputs (list python-pandas python-matplotlib python-numpy python-scipy)) - (native-inputs (list python-pytest xorg-server-for-tests)) + (native-inputs (list python-flit-core python-pypa-build python-pytest)) (home-page "https://seaborn.pydata.org/") (synopsis "Statistical data visualization") (description -- 2.37.3