From patchwork Wed Aug 10 05:18:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kiran Shila X-Patchwork-Id: 41472 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 30A5C27BBEA; Wed, 10 Aug 2022 06:20:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C6BAC27BBE9 for ; Wed, 10 Aug 2022 06:20:14 +0100 (BST) Received: from localhost ([::1]:42032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLe8c-0002aT-0J for patchwork@mira.cbaines.net; Wed, 10 Aug 2022 01:20:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLe8R-0002Zz-35 for guix-patches@gnu.org; Wed, 10 Aug 2022 01:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLe8Q-00007q-5o for guix-patches@gnu.org; Wed, 10 Aug 2022 01:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLe8Q-0002fl-0r for guix-patches@gnu.org; Wed, 10 Aug 2022 01:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57099] [PATCH] Add python-hdbscan Resent-From: Kiran Shila Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Aug 2022 05:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57099 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57099@debbugs.gnu.org Cc: Kiran Shila X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166010875210208 (code B ref -1); Wed, 10 Aug 2022 05:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Aug 2022 05:19:12 +0000 Received: from localhost ([127.0.0.1]:45791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLe7c-0002ea-4H for submit@debbugs.gnu.org; Wed, 10 Aug 2022 01:19:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:57560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLe7Y-0002eQ-5i for submit@debbugs.gnu.org; Wed, 10 Aug 2022 01:19:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLe7X-0002XK-V3 for guix-patches@gnu.org; Wed, 10 Aug 2022 01:19:08 -0400 Received: from box.kiranshila.com ([69.55.55.27]:51433) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLe7W-0008Pk-3d for guix-patches@gnu.org; Wed, 10 Aug 2022 01:19:07 -0400 Received: from authenticated-user (box.kiranshila.com [69.55.55.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.kiranshila.com (Postfix) with ESMTPSA id CE03F7E3D4; Wed, 10 Aug 2022 01:19:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kiranshila.com; s=mail; t=1660108744; bh=G0XF3bgaRBe+qcmyBe1qbTcDk2QNCLyU2xifQR694lk=; h=From:To:Cc:Subject:Date:From; b=b52bD0ah3a244kcZRCfN0YxJOTSdiE0iMMijAQMopl1YGbibX9O87yF8Ui9rTtz4n 2e9SCXMHfJY/+/56XlBn578jqwneTAn7Q9/k9uKR9mBPzV5f201O0R1gDWWbFfdJQ8 NUfxS2d50PEdZDeBn3xry1vDvnRNGcMGSjZlVdBO/RQhhpyZnwDeQW9V4O8L3U0irM 9KSpZpVOYAT43k5jNG+00vR8Inbszj0+VLl4mIK41t5sBIRRkUQ0iNKWVm4sJlVewI ejBLS1LQ0nscBQCW4QvdKDvGxytXNMuW9CZwbJqYgEdVfyxxI4n0U7f6Z6Ra2Zh8gD G/+9xTyKgUxkw== From: Kiran Shila Date: Tue, 9 Aug 2022 22:18:51 -0700 Message-Id: <20220810051851.329112-1-me@kiranshila.com> MIME-Version: 1.0 Received-SPF: pass client-ip=69.55.55.27; envelope-from=me@kiranshila.com; helo=box.kiranshila.com 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_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- gnu/packages/python-science.scm | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 95f60aae7b..758079c8b6 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2022 Paul A. Patience ;;; Copyright © 2022 Wiktor Żelazny ;;; Copyright © 2022 Eric Bavier +;;; Copyright © 2022 Kiran Shila ;;; ;;; This file is part of GNU Guix. ;;; @@ -1478,3 +1479,43 @@ (define-public python-opt-einsum well as potentially any library which conforms to a standard API. See the documentation for more information.") (license license:expat))) + +(define-public python-hdbscan + (package + (name "python-hdbscan") + (version "0.8.28") + (source (origin + (method url-fetch) + (uri (pypi-uri "hdbscan" version)) + (sha256 + (base32 + "0nn0xm9ji74pkil1lbkrskmyak25jx4av8cdqg2dzgiv5wgzgnpf")))) + (build-system python-build-system) + (arguments + `(#:modules ((ice-9 ftw) + (srfi srfi-1) + (guix build utils) + (guix build python-build-system)) + #:phases (modify-phases + %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (let ((outdir (string-append + (getcwd) "/build/" + (car (filter (lambda (s) (string-contains s "lib")) + (scandir "build")))))) + (invoke "pytest" "-vv" outdir)))))))) + (propagated-inputs (list python-cython python-joblib python-numpy + python-scikit-learn python-scipy)) + (native-inputs (list python-nose python-pytest python-pandas python-networkx)) + (home-page "http://github.com/scikit-learn-contrib/hdbscan") + (synopsis "Clustering based on density with variable density clusters") + (description "HDBSCAN - Hierarchical Density-Based Spatial Clustering of +Applications with Noise. Performs DBSCAN over varying epsilon values and +integrates the result to find a clustering that gives the best stability over +epsilon. This allows HDBSCAN to find clusters of varying densities (unlike +DBSCAN), and be more robust to parameter selection. HDBSCAN is ideal for +exploratory data analysis; it's a fast and robust algorithm that you can trust +to return meaningful clusters (if there are any).") + (license license:bsd-3)))