gnu: tarlz: Update to 0.21.
[jackhill/guix/guix.git] / gnu / packages / orange.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2021 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.19")
38 (source
39 (origin
40 (method url-fetch)
41 (uri (pypi-uri "orange-canvas-core" version))
42 (sha256
43 (base32 "03wav2msfm32y8zwq69v1v6qyh1ld76xla2z60avf49yhbwjgwal"))))
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 #t)))))
56 (propagated-inputs
57 `(("python-anyqt" ,python-anyqt)
58 ("python-cachecontrol" ,python-cachecontrol)
59 ("python-commonmark" ,python-commonmark)
60 ("python-dictdiffer" ,python-dictdiffer)
61 ("python-docutils" ,python-docutils)
62 ("python-pyqt" ,python-pyqt)
63 ("python-qasync" ,python-qasync)
64 ("python-requests" ,python-requests)))
65 (home-page "https://github.com/biolab/orange-canvas-core")
66 (synopsis "Core component of Orange Canvas")
67 (description
68 "Orange Canvas Core is a framework for building graphical user interfaces
69 for editing workflows. It is a component used to build the Orange Canvas
70 data-mining application.")
71 (license license:gpl3)))
72
73 (define-public python-orange-widget-base
74 (package
75 (name "python-orange-widget-base")
76 (version "4.12.0")
77 (source
78 (origin
79 (method url-fetch)
80 (uri (pypi-uri "orange-widget-base" version))
81 (sha256
82 (base32 "13sy3s8rdqs3i3ghixljpqvnfz81qmbb0kqlasw39zvf39qc22kz"))))
83 (build-system python-build-system)
84 (arguments
85 `(;; unittest fails to load one test, all other tests are passing:
86 ;; AttributeError: module 'orangewidget' has no attribute 'version'.
87 #:tests? #f
88 #:phases
89 (modify-phases %standard-phases
90 (add-before 'check 'check-setup
91 (lambda _
92 (setenv "HOME" "/tmp")
93 (setenv "QT_QPA_PLATFORM" "offscreen")
94 #t)))))
95 (propagated-inputs
96 `(("python-anyqt" ,python-anyqt)
97 ("python-matplotlib" ,python-matplotlib)
98 ("python-orange-canvas-core"
99 ,python-orange-canvas-core)
100 ("python-pyqtgraph" ,python-pyqtgraph)))
101 (home-page "https://github.com/biolab/orange-widget-base")
102 (synopsis "Base Widget for Orange Canvas")
103 (description
104 "Orange Widget Base provides a base widget component for a interactive
105 GUI based workflow. It is primarily used in the Orange framework.")
106 (license license:gpl3+)))
107
108 (define-public orange
109 (package
110 (name "orange")
111 (version "3.28.0")
112 (source
113 (origin
114 (method url-fetch)
115 (uri (pypi-uri "Orange3" version))
116 (sha256
117 (base32 "1ac4xjjkx06z10hl7k0zh1z3qhkl5vng15l9jkpkmck9spinbzil"))))
118 (build-system python-build-system)
119 (arguments
120 `(#:phases
121 (modify-phases %standard-phases
122 (add-after 'unpack 'preparations
123 (lambda _
124 ;; Delete test that opens an outgoing connection.
125 (delete-file "Orange/tests/test_url_reader.py")
126 ;; This is a binary data file and it breaks runpath validation.
127 (delete-file "Orange/tests/datasets/binary-blob.tab")
128 ;; Skip the test which uses that binary file.
129 (substitute* "Orange/tests/test_txt_reader.py"
130 (("test_read_nonutf8_encoding") "_test_read_nonutf8_encoding"))
131 ;; We use a correct version of PyQtWebEngine, but the build scripts
132 ;; consider it incorrect anyways. Remove the constraint entirely to
133 ;; work around this bug.
134 (substitute* "requirements-gui.txt" (("PyQtWebEngine>=5.12") ""))
135 #t))
136 (add-before 'check 'set-HOME
137 ;; Tests need a writable home.
138 (lambda _ (setenv "HOME" "/tmp") #t))
139 (add-after 'install 'wrap-executable
140 ;; Ensure that icons are found at runtime.
141 (lambda* (#:key inputs outputs #:allow-other-keys)
142 (let ((out (assoc-ref outputs "out")))
143 (wrap-program (string-append out "/bin/orange-canvas")
144 `("QT_PLUGIN_PATH" prefix
145 ,(list (string-append (assoc-ref inputs "qtsvg")
146 "/lib/qt5/plugins/")))))
147 #t)))))
148 (native-inputs
149 `(("python-cython" ,python-cython)))
150 (inputs
151 `(("python-anyqt" ,python-anyqt)
152 ("python-baycomp" ,python-baycomp)
153 ("python-bottleneck" ,python-bottleneck)
154 ("python-chardet" ,python-chardet)
155 ("python-httpx" ,python-httpx)
156 ("python-joblib" ,python-joblib)
157 ("python-keyring" ,python-keyring)
158 ("python-keyrings.alt" ,python-keyrings.alt)
159 ("python-louvain" ,python-louvain)
160 ("python-matplotlib" ,python-matplotlib)
161 ("python-networkx" ,python-networkx)
162 ("python-numpy" ,python-numpy)
163 ("python-openpyxl" ,python-openpyxl)
164 ("python-opentsne" ,python-opentsne)
165 ("python-orange-canvas-core"
166 ,python-orange-canvas-core)
167 ("python-orange-widget-base"
168 ,python-orange-widget-base)
169 ("python-pandas" ,python-pandas)
170 ("python-pyqt" ,python-pyqt)
171 ("python-pyqtgraph" ,python-pyqtgraph)
172 ("python-pyqtwebengine" ,python-pyqtwebengine)
173 ("python-pyyaml" ,python-pyyaml)
174 ("python-requests" ,python-requests)
175 ("python-scikit-learn" ,python-scikit-learn)
176 ("python-scipy" ,python-scipy)
177 ("python-serverfiles" ,python-serverfiles)
178 ("python-xlrd" ,python-xlrd)
179 ("python-xlsxwriter" ,python-xlsxwriter)
180 ("qtbase" ,qtbase-5)
181 ("qtsvg" ,qtsvg)
182 ("xdg-utils" ,xdg-utils)))
183 (home-page "https://orangedatamining.com/")
184 (synopsis "Component-based data mining framework")
185 (description
186 "Orange is a component-based, graphical framework for machine learning,
187 data analysis, data mining and data visualization.")
188 (license license:gpl3+)))
189
190 (define-public python-serverfiles
191 (package
192 (name "python-serverfiles")
193 (version "0.3.1")
194 (source
195 (origin
196 (method url-fetch)
197 (uri (pypi-uri "serverfiles" version))
198 (sha256
199 (base32 "1qgbzgnaxj4wsp2rdas53qxsh0j7xpibq25w6lviwyaqwwrgq42y"))))
200 (build-system python-build-system)
201 (propagated-inputs
202 `(("python-requests" ,python-requests)))
203 (home-page "https://github.com/biolab/serverfiles")
204 (synopsis "Utility to access files on a HTTP server and store them locally")
205 (description
206 "This package provides an utility that accesses files on a HTTP server
207 and stores them locally for reuse. It is primarily used by the Orange
208 framework.")
209 (license license:gpl3+)))