Merge pull request #241537 from lucasew/orange
python3Packages.orange3: init at 3.35.0
This commit is contained in:
commit
74348e1743
9 changed files with 508 additions and 0 deletions
44
pkgs/development/python-modules/anyqt/default.nix
Normal file
44
pkgs/development/python-modules/anyqt/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pyqt5
|
||||
, pytestCheckHook
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "anyqt";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ales-erjavec";
|
||||
repo = "anyqt";
|
||||
rev = version;
|
||||
hash = "sha256-dL2EUAMzWKq/oN3rXiEC6emDJddmg4KclT5ONKA0jfk=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ pyqt5 pytestCheckHook ];
|
||||
|
||||
# All of these fail because Qt modules cannot be imported
|
||||
disabledTestPaths = [
|
||||
"tests/test_qabstractitemview.py"
|
||||
"tests/test_qaction_set_menu.py"
|
||||
"tests/test_qactionevent_action.py"
|
||||
"tests/test_qfontdatabase_static.py"
|
||||
"tests/test_qpainter_draw_pixmap_fragments.py"
|
||||
"tests/test_qsettings.py"
|
||||
"tests/test_qstandarditem_insertrow.py"
|
||||
"tests/test_qtest.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "AnyQt" ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "PyQt/PySide compatibility layer";
|
||||
homepage = "https://github.com/ales-erjavec/anyqt";
|
||||
license = [ lib.licenses.gpl3Only ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
}
|
35
pkgs/development/python-modules/baycomp/default.nix
Normal file
35
pkgs/development/python-modules/baycomp/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, numpy
|
||||
, scipy
|
||||
, scikit-learn
|
||||
, matplotlib
|
||||
, unittestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "baycomp";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-xDRywWvXzfSITdTHPdMH5KPacJf+Scg81eiNdRQpI7A=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
scipy
|
||||
matplotlib
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ unittestCheckHook ];
|
||||
pythonImportsCheck = [ "baycomp" ];
|
||||
|
||||
meta = {
|
||||
description = "A library for Bayesian comparison of classifiers";
|
||||
homepage = "https://github.com/janezd/baycomp";
|
||||
license = [ lib.licenses.mit ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
}
|
56
pkgs/development/python-modules/opentsne/default.nix
Normal file
56
pkgs/development/python-modules/opentsne/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, cython
|
||||
, numpy
|
||||
, scipy
|
||||
, scikit-learn
|
||||
, pytestCheckHook
|
||||
, nix-update-script
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
let
|
||||
self = buildPythonPackage rec {
|
||||
pname = "opentsne";
|
||||
version = "1.0.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pavlin-policar";
|
||||
repo = "openTSNE";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-L5Qx6dMJlXF3EaWwlFTQ3dkhGXc5PvQBXYJo+QO+Hxc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ numpy scipy scikit-learn ];
|
||||
nativeBuildInputs = [ cython setuptools ];
|
||||
|
||||
pythonImportsCheck = [ "openTSNE" ];
|
||||
doCheck = false;
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {};
|
||||
tests.pytest = self.overridePythonAttrs (old: {
|
||||
pname = "${old.pname}-tests";
|
||||
format = "other";
|
||||
|
||||
postPatch = "rm openTSNE -rf";
|
||||
|
||||
doBuild = false;
|
||||
doInstall = false;
|
||||
|
||||
doCheck = true;
|
||||
nativeCheckInputs = [ pytestCheckHook self ];
|
||||
});
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Modular Python implementation of t-Distributed Stochasitc Neighbor Embedding";
|
||||
homepage = "https://github.com/pavlin-policar/openTSNE";
|
||||
changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/${version}";
|
||||
license = [ lib.licenses.bsd3 ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
};
|
||||
in self
|
|
@ -0,0 +1,64 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, anyqt
|
||||
, cachecontrol
|
||||
, commonmark
|
||||
, dictdiffer
|
||||
, docutils
|
||||
, filelock
|
||||
, lockfile
|
||||
, pytest-qt
|
||||
, pytestCheckHook
|
||||
, python
|
||||
, qasync
|
||||
, qt5
|
||||
, writeShellScript
|
||||
, xvfb-run
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "orange-canvas-core";
|
||||
version = "0.1.31";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-kqh/c0pEWFLqf1BMD79li1MqLpH/4xrdTH9+/7YO/tg=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
anyqt
|
||||
cachecontrol
|
||||
commonmark
|
||||
dictdiffer
|
||||
docutils
|
||||
filelock
|
||||
lockfile
|
||||
qasync
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "orangecanvas" ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-qt
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"orangecanvas/canvas/items/tests/test_graphicstextitem.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Orange framework for building graphical user interfaces for editing workflows";
|
||||
homepage = "https://github.com/biolab/orange-canvas-core";
|
||||
license = [ lib.licenses.gpl3 ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pyqt5
|
||||
, pyqtwebengine
|
||||
, matplotlib
|
||||
, orange-canvas-core
|
||||
, pyqtgraph
|
||||
, typing-extensions
|
||||
, qt5
|
||||
, pytestCheckHook
|
||||
, pytest-qt
|
||||
, appnope
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "orange-widget-base";
|
||||
version = "4.21.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-43JeEdgEb6WS7PySW1x08fn02yl9Q/HwwKo6ojaqiH0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
matplotlib
|
||||
orange-canvas-core
|
||||
pyqt5
|
||||
pyqtgraph
|
||||
pyqtwebengine
|
||||
typing-extensions
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
appnope
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "orangewidget" ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-qt
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"orangewidget/report/tests/test_report.py"
|
||||
"orangewidget/tests/test_widget.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Implementation of the base OWBaseWidget class and utilities for use in Orange Canvas workflows";
|
||||
homepage = "https://github.com/biolab/orange-widget-base";
|
||||
license = [ lib.licenses.gpl3Plus ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
}
|
164
pkgs/development/python-modules/orange3/default.nix
Normal file
164
pkgs/development/python-modules/orange3/default.nix
Normal file
|
@ -0,0 +1,164 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, copyDesktopItems
|
||||
, fetchurl
|
||||
, makeDesktopItem
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, python
|
||||
, baycomp
|
||||
, bottleneck
|
||||
, chardet
|
||||
, cython
|
||||
, httpx
|
||||
, joblib
|
||||
, keyring
|
||||
, keyrings-alt
|
||||
, matplotlib
|
||||
, numpy
|
||||
, openpyxl
|
||||
, opentsne
|
||||
, orange-canvas-core
|
||||
, orange-widget-base
|
||||
, pandas
|
||||
, pyqtgraph
|
||||
, pyqtwebengine
|
||||
, python-louvain
|
||||
, pyyaml
|
||||
, qt5
|
||||
, qtconsole
|
||||
, requests
|
||||
, scikit-learn
|
||||
, scipy
|
||||
, sphinx
|
||||
, serverfiles
|
||||
, xlrd
|
||||
, xlsxwriter
|
||||
}:
|
||||
|
||||
let
|
||||
self = buildPythonPackage rec {
|
||||
pname = "orange3";
|
||||
version = "3.35.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "biolab";
|
||||
repo = "orange3";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-dj/Z4uOjA4nidd45dnHZDyHZP6Fy/MGC8asqOPV7U7A=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's;\(scikit-learn\)[^$]*;\1;g' requirements-core.txt
|
||||
sed -i 's;pyqtgraph[^$]*;;g' requirements-gui.txt # TODO: remove after bump with a version greater than 0.13.1
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
cython
|
||||
qt5.wrapQtAppsHook
|
||||
sphinx
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
scipy
|
||||
chardet
|
||||
openpyxl
|
||||
opentsne
|
||||
qtconsole
|
||||
bottleneck
|
||||
matplotlib
|
||||
joblib
|
||||
requests
|
||||
keyring
|
||||
scikit-learn
|
||||
pandas
|
||||
pyqtwebengine
|
||||
serverfiles
|
||||
orange-canvas-core
|
||||
python-louvain
|
||||
xlrd
|
||||
xlsxwriter
|
||||
httpx
|
||||
pyqtgraph
|
||||
orange-widget-base
|
||||
keyrings-alt
|
||||
pyyaml
|
||||
baycomp
|
||||
];
|
||||
|
||||
# FIXME: ImportError: cannot import name '_variable' from partially initialized module 'Orange.data' (most likely due to a circular import) (/build/source/Orange/data/__init__.py)
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "Orange" "Orange.data._variable" ];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "orange";
|
||||
exec = "orange-canvas";
|
||||
desktopName = "Orange Data Mining";
|
||||
genericName = "Data Mining Suite";
|
||||
comment = "Explore, analyze, and visualize your data";
|
||||
icon = "orange-canvas";
|
||||
mimeTypes = [ "application/x-extension-ows" ];
|
||||
categories = [ "Science" "Education" "ArtificialIntelligence" "DataVisualization" "NumericalAnalysis" "Qt" ];
|
||||
keywords = [ "Machine Learning" "Scientific Visualization" "Statistical Analysis" ];
|
||||
})
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/orange-canvas \
|
||||
"${"$"}{qtWrapperArgs[@]}"
|
||||
mkdir -p $out/share/icons/hicolor/{256x256,48x48}/apps
|
||||
cp distribute/icon-256.png $out/share/icons/hicolor/256x256/apps/orange-canvas.png
|
||||
cp distribute/icon-48.png $out/share/icons/hicolor/48x48/apps/orange-canvas.png
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
tests.unittests = self.overridePythonAttrs (old: {
|
||||
pname = "${old.pname}-tests";
|
||||
format = "other";
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
|
||||
rm Orange -rf
|
||||
cp -r ${self}/${python.sitePackages}/Orange .
|
||||
chmod +w -R .
|
||||
|
||||
rm Orange/tests/test_url_reader.py # uses network
|
||||
rm Orange/tests/test_ada_boost.py # broken: The 'base_estimator' parameter of AdaBoostRegressor must be an object implementing 'fit' and 'predict' or a str among {'deprecated'}. Got None instead.
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${python.interpreter} -m unittest -b -v ./Orange/**/test*.py
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
postInstall = "";
|
||||
|
||||
doBuild = false;
|
||||
doInstall = false;
|
||||
|
||||
nativeBuildInputs = [ self ] ++ old.nativeBuildInputs;
|
||||
});
|
||||
};
|
||||
|
||||
meta = {
|
||||
mainProgram = "orange-canvas";
|
||||
description = "Data mining and visualization toolbox for novice and expert alike";
|
||||
homepage = "https://orangedatamining.com/";
|
||||
license = [ lib.licenses.gpl3Plus ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
};
|
||||
in self
|
39
pkgs/development/python-modules/qasync/default.nix
Normal file
39
pkgs/development/python-modules/qasync/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pyqt5
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qasync";
|
||||
version = "0.24.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CabbageDevelopment";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-DAzmobw+c29Pt/URGO3bWXHBxgu9bDHhdTUBE9QJDe4=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
rm qasync/_windows.py # Ignoring it is not taking effect and it will not be used on Linux
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pyqt5 ];
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "qasync" ];
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/test_qeventloop.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Allows coroutines to be used in PyQt/PySide applications by providing an implementation of the PEP 3156 event-loop";
|
||||
homepage = "https://github.com/CabbageDevelopment/qasync";
|
||||
license = [ lib.licenses.bsd2 ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
}
|
28
pkgs/development/python-modules/serverfiles/default.nix
Normal file
28
pkgs/development/python-modules/serverfiles/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, requests
|
||||
, unittestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "serverfiles";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-XhD8MudYeR43NbwIvOLtRwKoOx5Fq5bF1ZzIruz76+E=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ requests ];
|
||||
|
||||
pythonImportsCheck = [ "serverfiles" ];
|
||||
nativeCheckInputs = [ unittestCheckHook ];
|
||||
|
||||
meta = {
|
||||
description = "An utility that accesses files on a HTTP server and stores them locally for reuse";
|
||||
homepage = "https://github.com/biolab/serverfiles";
|
||||
license = [ lib.licenses.gpl3Plus ];
|
||||
maintainers = [ lib.maintainers.lucasew ];
|
||||
};
|
||||
}
|
|
@ -552,6 +552,8 @@ self: super: with self; {
|
|||
|
||||
anyio = callPackage ../development/python-modules/anyio { };
|
||||
|
||||
anyqt = callPackage ../development/python-modules/anyqt { };
|
||||
|
||||
anytree = callPackage ../development/python-modules/anytree {
|
||||
inherit (pkgs) graphviz;
|
||||
};
|
||||
|
@ -1271,6 +1273,8 @@ self: super: with self; {
|
|||
|
||||
batinfo = callPackage ../development/python-modules/batinfo { };
|
||||
|
||||
baycomp = callPackage ../development/python-modules/baycomp { };
|
||||
|
||||
bayesian-optimization = callPackage ../development/python-modules/bayesian-optimization { };
|
||||
|
||||
bayespy = callPackage ../development/python-modules/bayespy { };
|
||||
|
@ -7542,6 +7546,8 @@ self: super: with self; {
|
|||
|
||||
opentracing = callPackage ../development/python-modules/opentracing { };
|
||||
|
||||
opentsne = callPackage ../development/python-modules/opentsne { };
|
||||
|
||||
openvino = callPackage ../development/python-modules/openvino {
|
||||
openvino-native = pkgs.openvino.override {
|
||||
inherit python;
|
||||
|
@ -7574,6 +7580,12 @@ self: super: with self; {
|
|||
|
||||
oralb-ble = callPackage ../development/python-modules/oralb-ble { };
|
||||
|
||||
orange3 = callPackage ../development/python-modules/orange3 { };
|
||||
|
||||
orange-canvas-core = callPackage ../development/python-modules/orange-canvas-core { };
|
||||
|
||||
orange-widget-base = callPackage ../development/python-modules/orange-widget-base { };
|
||||
|
||||
orderedmultidict = callPackage ../development/python-modules/orderedmultidict { };
|
||||
|
||||
ordered-set = callPackage ../development/python-modules/ordered-set { };
|
||||
|
@ -10762,6 +10774,8 @@ self: super: with self; {
|
|||
|
||||
qbittorrent-api = callPackage ../development/python-modules/qbittorrent-api { };
|
||||
|
||||
qasync = callPackage ../development/python-modules/qasync { };
|
||||
|
||||
qcelemental = callPackage ../development/python-modules/qcelemental { };
|
||||
|
||||
qcengine = callPackage ../development/python-modules/qcengine { };
|
||||
|
@ -11586,6 +11600,8 @@ self: super: with self; {
|
|||
|
||||
servefile = callPackage ../development/python-modules/servefile { };
|
||||
|
||||
serverfiles = callPackage ../development/python-modules/serverfiles { };
|
||||
|
||||
serverlessrepo = callPackage ../development/python-modules/serverlessrepo { };
|
||||
|
||||
service-identity = callPackage ../development/python-modules/service-identity { };
|
||||
|
|
Loading…
Reference in a new issue