gnu: gf2x: Update to 1.3.0.
[jackhill/guix/guix.git] / gnu / packages / orange.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages orange)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system python)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages freedesktop)
26 #:use-module (gnu packages graph)
27 #:use-module (gnu packages machine-learning)
28 #:use-module (gnu packages python-crypto)
29 #:use-module (gnu packages python-science)
30 #:use-module (gnu packages python-web)
31 #:use-module (gnu packages python-xyz)
32 #:use-module (gnu packages qt))
33
34 (define-public python-orange-canvas-core
35 (package
36 (name "python-orange-canvas-core")
37 (version "0.1.24")
38 (source
39 (origin
40 (method url-fetch)
41 (uri (pypi-uri "orange-canvas-core" version))
42 (sha256
43 (base32 "0m3dszdkc5bc80ahcvrqxz8jahs33js9cx1mc6rc9ihysq2ddnfz"))))
44 (build-system python-build-system)
45 (arguments
46 `(#:phases
47 (modify-phases %standard-phases
48 (add-before 'check 'check-setup
49 (lambda _
50 ;; This test fails with: RuntimeError: Event loop is closed.
51 (substitute* "orangecanvas/application/tests/test_mainwindow.py"
52 (("test_help_requests") "_test_help_requests"))
53 (setenv "HOME" "/tmp")
54 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
55 (propagated-inputs
56 (list python-anyqt
57 python-cachecontrol
58 python-commonmark
59 python-dictdiffer
60 python-docutils
61 python-qasync
62 python-requests))
63 (home-page "https://github.com/biolab/orange-canvas-core")
64 (synopsis "Core component of Orange Canvas")
65 (description
66 "Orange Canvas Core is a framework for building graphical user interfaces
67 for editing workflows. It is a component used to build the Orange Canvas
68 data-mining application.")
69 (license license:gpl3)))
70
71 (define-public python-orange-widget-base
72 (package
73 (name "python-orange-widget-base")
74 (version "4.16.1")
75 (source
76 (origin
77 (method url-fetch)
78 (uri (pypi-uri "orange-widget-base" version))
79 (sha256
80 (base32 "0a0sijsvzijj71sxq8ckpgz59z1cq9sxn4fya3z23ibdzjzwrsi7"))))
81 (build-system python-build-system)
82 (arguments
83 `(;; unittest fails to load one test, all other tests are passing:
84 ;; AttributeError: module 'orangewidget' has no attribute 'version'.
85 #:tests? #f
86 #:phases
87 (modify-phases %standard-phases
88 (add-before 'check 'check-setup
89 (lambda _
90 (setenv "HOME" "/tmp")
91 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
92 (propagated-inputs
93 (list python-anyqt python-matplotlib python-orange-canvas-core
94 python-pyqtgraph python-typing-extensions))
95 (home-page "https://github.com/biolab/orange-widget-base")
96 (synopsis "Base Widget for Orange Canvas")
97 (description
98 "Orange Widget Base provides a base widget component for a interactive
99 GUI based workflow. It is primarily used in the Orange framework.")
100 (license license:gpl3+)))
101
102 (define-public orange
103 (package
104 (name "orange")
105 (version "3.32.0")
106 (source
107 (origin
108 (method url-fetch)
109 (uri (pypi-uri "Orange3" version))
110 (sha256
111 (base32 "0pxjwisc209cdgpqlqazc2vlmr0iqz8ry862w7jx95zic54d9p5l"))))
112 (build-system python-build-system)
113 (arguments
114 `(#:phases
115 (modify-phases %standard-phases
116 (add-after 'unpack 'preparations
117 (lambda _
118 ;; Delete test that opens an outgoing connection.
119 (delete-file "Orange/tests/test_url_reader.py")
120 ;; This is a binary data file and it breaks runpath validation.
121 (delete-file "Orange/tests/datasets/binary-blob.tab")
122 ;; Skip the test which uses that binary file.
123 (substitute* "Orange/tests/test_txt_reader.py"
124 (("test_read_nonutf8_encoding") "_test_read_nonutf8_encoding"))
125 ;; We use a correct version of PyQtWebEngine, but the build scripts
126 ;; consider it incorrect anyways. Remove the constraint entirely to
127 ;; work around this bug.
128 (substitute* "requirements-pyqt.txt" (("PyQtWebEngine>=5.12") ""))))
129 (add-before 'check 'pre-check
130 ;; Tests need a writable home.
131 (lambda _
132 (setenv "HOME" "/tmp")
133 (setenv "QT_QPA_PLATFORM" "offscreen")))
134 (add-after 'install 'wrap-executable
135 ;; Ensure that icons are found at runtime.
136 (lambda* (#:key inputs outputs #:allow-other-keys)
137 (let ((out (assoc-ref outputs "out")))
138 (wrap-program (string-append out "/bin/orange-canvas")
139 `("QT_PLUGIN_PATH" prefix
140 ,(list (string-append (assoc-ref inputs "qtsvg")
141 "/lib/qt5/plugins/"))))))))))
142 (native-inputs
143 (list python-cython))
144 (inputs
145 (list python-anyqt
146 python-baycomp
147 python-bottleneck
148 python-chardet
149 python-httpx
150 python-joblib
151 python-keyring
152 python-keyrings.alt
153 python-louvain
154 python-matplotlib
155 python-networkx
156 python-numpy
157 python-openpyxl
158 python-opentsne
159 python-orange-canvas-core
160 python-orange-widget-base
161 python-pandas
162 python-pygments
163 python-pyqt-without-qtwebkit
164 python-pyqtgraph
165 python-pyqtwebengine
166 python-pyyaml
167 python-qtconsole
168 python-requests
169 python-scikit-learn
170 python-scipy
171 python-serverfiles
172 python-xlrd
173 python-xlsxwriter
174 qtbase-5
175 qtsvg-5
176 xdg-utils))
177 (home-page "https://orangedatamining.com/")
178 (synopsis "Component-based data mining framework")
179 (description
180 "Orange is a component-based, graphical framework for machine learning,
181 data analysis, data mining and data visualization.")
182 (license license:gpl3+)))
183
184 (define-public python-serverfiles
185 (package
186 (name "python-serverfiles")
187 (version "0.3.1")
188 (source
189 (origin
190 (method url-fetch)
191 (uri (pypi-uri "serverfiles" version))
192 (sha256
193 (base32 "1qgbzgnaxj4wsp2rdas53qxsh0j7xpibq25w6lviwyaqwwrgq42y"))))
194 (build-system python-build-system)
195 (propagated-inputs
196 (list python-requests))
197 (home-page "https://github.com/biolab/serverfiles")
198 (synopsis "Utility to access files on a HTTP server and store them locally")
199 (description
200 "This package provides an utility that accesses files on a HTTP server
201 and stores them locally for reuse. It is primarily used by the Orange
202 framework.")
203 (license license:gpl3+)))