projects/guix·blob java-team · refs

264 lines · 9.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2021, 2022 Vinicius Monego <[email protected]>
3;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages orange)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix build-system pyproject)
23 #:use-module (guix download)
24 #:use-module (guix git-download)
25 #:use-module (guix gexp)
26 #:use-module (guix packages)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages bash)
29 #:use-module (gnu packages check)
30 #:use-module (gnu packages freedesktop)
31 #:use-module (gnu packages graph)
32 #:use-module (gnu packages jupyter)
33 #:use-module (gnu packages machine-learning)
34 #:use-module (gnu packages python-build)
35 #:use-module (gnu packages python-check)
36 #:use-module (gnu packages python-crypto)
37 #:use-module (gnu packages python-science)
38 #:use-module (gnu packages python-web)
39 #:use-module (gnu packages python-xyz)
40 #:use-module (gnu packages qt))
41
42(define-public python-orange-canvas-core
43 (package
44 (name "python-orange-canvas-core")
45 (version "0.2.6")
46 (source
47 (origin
48 (method url-fetch)
49 (uri (pypi-uri "orange_canvas_core" version))
50 (sha256
51 (base32 "1h0p6p36h9vwmgs7xa7x0qa06zjxjyj8pr1p8d4iykbvl60s3dq0"))))
52 (build-system pyproject-build-system)
53 (arguments
54 (list
55 ;; tests: 227 passed, 4 skipped, 13 deselected, 15 warnings
56 #:test-flags
57 #~(list "-k" (string-join
58 ;; Tests fail with error: Failed: CALL ERROR: Exceptions
59 ;; caught in Qt event loop.
60 (list "not test_create_new_window"
61 "test_dont_load_swp_on_new_window"
62 "test_editlinksnode"
63 "test_links_edit"
64 "test_links_edit_widget"
65 "test_new_window"
66 "test_toolbox"
67 "test_widgettoolgrid"
68 ;; AssertionError: Lists differ
69 "test_create_normal"
70 "test_create_on_demand")
71 " and not "))
72 #:phases
73 #~(modify-phases %standard-phases
74 (add-after 'unpack 'relax-requirements
75 (lambda _
76 (substitute* "setup.py"
77 ;; Relax hard requirement of PIP.
78 ((".*pip>=18.0.*") ""))))
79 (add-before 'check 'pre-check
80 (lambda _
81 (setenv "HOME" "/tmp")
82 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
83 (native-inputs
84 (list python-pytest
85 python-pytest-qt
86 python-setuptools
87 python-trubar))
88 (propagated-inputs
89 (list python-anyqt
90 python-commonmark
91 python-dictdiffer
92 python-docutils
93 python-numpy
94 python-packaging
95 python-qasync
96 python-requests
97 python-requests-cache
98 python-truststore
99 python-typing-extensions))
100 (home-page "https://github.com/biolab/orange-canvas-core")
101 (synopsis "Core component of Orange Canvas")
102 (description
103 "Orange Canvas Core is a framework for building graphical user interfaces
104for editing workflows. It is a component used to build the Orange Canvas
105data-mining application.")
106 (license license:gpl3)))
107
108(define-public python-orange-widget-base
109 (package
110 (name "python-orange-widget-base")
111 (version "4.25.1")
112 (source
113 (origin
114 (method url-fetch)
115 (uri (pypi-uri "orange_widget_base" version))
116 (sha256
117 (base32 "1vms6bf96dnx5ban30xd0r0ipc318iq9q2wwgnazphf4hic8vxzi"))))
118 (build-system pyproject-build-system)
119 (arguments
120 (list
121 #:test-flags
122 #~(list "-k" (string-join
123 (list
124 ;; KeyError: 'HTML (*.html)'
125 "not test_save_report_html"
126 ;; KeyError: 'PDF (*.pdf)'
127 "test_save_report_pdf"
128 ;; AssertionError: False is not true
129 "test_menu")
130 " and not "))
131 #:phases
132 #~(modify-phases %standard-phases
133 (add-before 'check 'pre-check
134 (lambda _
135 (setenv "HOME" "/tmp")
136 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
137 (native-inputs
138 (list python-pytest
139 python-setuptools
140 python-trubar
141 python-wheel))
142 (propagated-inputs
143 (list python-anyqt
144 python-matplotlib
145 python-orange-canvas-core
146 python-pyqtgraph
147 python-typing-extensions))
148 (home-page "https://github.com/biolab/orange-widget-base")
149 (synopsis "Base Widget for Orange Canvas")
150 (description
151 "Orange Widget Base provides a base widget component for a interactive
152GUI based workflow. It is primarily used in the Orange framework.")
153 (license license:gpl3+)))
154
155(define-public orange
156 (package
157 (name "orange")
158 (version "3.40.0")
159 (source
160 (origin
161 (method git-fetch)
162 (uri (git-reference
163 (url "https://github.com/biolab/orange3")
164 (commit version)))
165 (file-name (git-file-name name version))
166 (sha256
167 (base32 "1kr3lsaqac73amwq841xhvgm63c4n58b28yqcv7pcgqswsl0dr00"))))
168 (build-system pyproject-build-system)
169 (arguments
170 (list
171 ;; TODO: Figure out how to enable/fix tests: ImportError: cannot import
172 ;; name '_variable' from partially initialized module 'Orange.data'
173 #:tests? #f
174 #:test-backend #~'unittest
175 #:test-flags #~(list "-v" "Orange.tests" "Orange.widgets.tests")
176 #:phases
177 #~(modify-phases %standard-phases
178 (add-before 'check 'pre-check
179 ;; Tests need a writable home.
180 (lambda _
181 (setenv "HOME" "/tmp")
182 (setenv "QT_QPA_PLATFORM" "offscreen")))
183 (add-after 'wrap 'wrap-executable
184 ;; Ensure that icons are found at runtime.
185 (lambda _
186 (wrap-program (string-append #$output "/bin/orange-canvas")
187 `("QT_PLUGIN_PATH" prefix
188 ,(list (string-append
189 (string-join
190 (list #$(this-package-input "qtbase")
191 #$(this-package-input "qtsvg")
192 #$(this-package-input "qtwayland"))
193 "/lib/qt6/plugins:")
194 "/lib/qt6/plugins")))))))))
195 (native-inputs
196 (list python-cython
197 python-recommonmark
198 python-setuptools
199 python-trubar))
200 (inputs
201 (list bash-minimal ;for wrap
202 python-anyqt
203 python-baycomp
204 python-bottleneck
205 python-chardet
206 python-httpx
207 python-joblib
208 python-keyring
209 python-keyrings-alt
210 python-louvain
211 python-matplotlib
212 python-networkx
213 python-numpy-1
214 python-openpyxl
215 python-opentsne
216 python-orange-canvas-core
217 python-orange-widget-base
218 python-packaging
219 python-pandas-2
220 python-pygments
221 python-pyqt-6
222 python-pyqtgraph
223 python-pyqtwebengine-6
224 python-pyyaml
225 python-qtconsole
226 python-requests
227 python-scikit-learn
228 python-scipy
229 python-serverfiles
230 python-xgboost
231 python-xlrd
232 python-xlsxwriter
233 qtbase
234 qtsvg
235 qtwayland
236 xdg-utils))
237 (home-page "https://orangedatamining.com/")
238 (synopsis "Component-based data mining framework")
239 (description
240 "Orange is a component-based, graphical framework for machine learning,
241data analysis, data mining and data visualization.")
242 (license license:gpl3+)))
243
244(define-public python-serverfiles
245 (package
246 (name "python-serverfiles")
247 (version "0.3.1")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (pypi-uri "serverfiles" version))
252 (sha256
253 (base32 "1qgbzgnaxj4wsp2rdas53qxsh0j7xpibq25w6lviwyaqwwrgq42y"))))
254 (build-system pyproject-build-system)
255 (arguments (list #:test-backend #~'unittest))
256 (native-inputs (list python-setuptools))
257 (propagated-inputs (list python-requests))
258 (home-page "https://github.com/biolab/serverfiles")
259 (synopsis "Utility to access files on a HTTP server and store them locally")
260 (description
261 "This package provides an utility that accesses files on a HTTP server
262and stores them locally for reuse. It is primarily used by the Orange
263framework.")
264 (license license:gpl3+)))