Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.neurokit2: init at 0.2.10 and python312Packages.biosppy: init at 2.2.2 #371449

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions pkgs/development/python-modules/biosppy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
setuptools,
bidict,
h5py,
matplotlib,
numpy,
scikit-learn,
scipy,
shortuuid,
six,
joblib,
pywavelets,
mock,
tkinter,
opencv-python,
}:

buildPythonPackage rec {
pname = "biosppy";
version = "2.2.2";
pyproject = true;

genga898 marked this conversation as resolved.
Show resolved Hide resolved
src = fetchFromGitHub {
owner = "scientisst";
repo = "BioSPPy";
tag = "v${version}";
hash = "sha256-U0ZftAlRlazSO66raH74o/6eP1RpmuFoA6HJ+xmgKR8=";
};

build-system = [
setuptools
];

dependencies = [
opencv-python
bidict
h5py
matplotlib
numpy
scikit-learn
scipy
shortuuid
six
joblib
pywavelets
mock
genga898 marked this conversation as resolved.
Show resolved Hide resolved
genga898 marked this conversation as resolved.
Show resolved Hide resolved
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ tkinter ];

genga898 marked this conversation as resolved.
Show resolved Hide resolved
doCheck = false; # no tests

pythonImportsCheck = [
"biosppy"
genga898 marked this conversation as resolved.
Show resolved Hide resolved
"biosppy.signals"
"biosppy.synthesizers"
"biosppy.inter_plotting"
"biosppy.features"
];

meta = {
description = "Biosignal Processing in Python";
homepage = "https://biosppy.readthedocs.io/";
changelog = "https://github.com/scientisst/BioSPPy/releases/tag/v${version}";
license = lib.licenses.bsd3;
genga898 marked this conversation as resolved.
Show resolved Hide resolved
maintainers = with lib.maintainers; [ genga898 ];
};
}
101 changes: 101 additions & 0 deletions pkgs/development/python-modules/neurokit2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
setuptools,
pytest,
scipy,
scikit-learn,
pandas,
matplotlib,
requests,
cvxopt,
biosppy,
pytest-cov-stub,
mock,
plotly,
astropy,
coverage,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "neurokit2";
version = "0.2.10";
pyproject = true;

src = fetchFromGitHub {
owner = "neuropsychology";
repo = "NeuroKit";
tag = "v${version}";
hash = "sha256-e/B1JvO6uYZ6iVskFvxZLSSXi0cPep9bBZ0JXZTVS28=";
};

postPatch = ''
substituteInPlace setup.py \
--replace-fail '"pytest-runner"' '"pytest"'
'';

build-system = [
setuptools
pytest
GaetanLepage marked this conversation as resolved.
Show resolved Hide resolved
];

dependencies = [
scipy
scikit-learn
pandas
matplotlib
requests
cvxopt
biosppy
GaetanLepage marked this conversation as resolved.
Show resolved Hide resolved
];

nativeCheckInputs = [
pytest-cov-stub
mock
plotly
astropy
coverage
pytestCheckHook
];

disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# Crash in matplotlib (Fatal Python error: Aborted)
"test_events_plot"
];

disabledTestPaths = [
GaetanLepage marked this conversation as resolved.
Show resolved Hide resolved
# Required dependencies not available in nixpkgs
"tests/tests_complexity.py"
"tests/tests_eeg.py"
"tests/tests_eog.py"
"tests/tests_ecg.py"
"tests/tests_bio.py"
"tests/tests_data.py"
"tests/tests_epochs.py"
"tests/tests_ecg_findpeaks.py"
"tests/tests_eda.py"
"tests/tests_emg.py"
"tests/tests_hrv.py"
"tests/tests_rsp.py"
"tests/tests_ppg.py"
"tests/tests_signal.py"

# Dependency is broken `mne-python`
"tests/tests_microstates.py"
];

pythonImportsCheck = [
"neurokit2"
];

meta = {
description = "Python Toolbox for Neurophysiological Signal Processing";
homepage = "https://github.com/neuropsychology/NeuroKit";
changelog = "https://github.com/neuropsychology/NeuroKit/releases/tag/v${version}";
license = lib.licenses.mit;
genga898 marked this conversation as resolved.
Show resolved Hide resolved
maintainers = with lib.maintainers; [ genga898 ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1677,6 +1677,8 @@ self: super: with self; {

biopython = callPackage ../development/python-modules/biopython { };

biosppy = callPackage ../development/python-modules/biosppy { };

biothings-client = callPackage ../development/python-modules/biothings-client { };

biplist = callPackage ../development/python-modules/biplist { };
Expand Down Expand Up @@ -9189,6 +9191,8 @@ self: super: with self; {

neuralfoil = callPackage ../development/python-modules/neuralfoil { };

neurokit2 = callPackage ../development/python-modules/neurokit2 { };

neuron-full = pkgs.neuron-full.override { python3 = python; };

neuronpy = toPythonModule neuron-full;
Expand Down