Skip to content

Commit

Permalink
python312Packages.neurotkit2: init at 0.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
genga898 committed Jan 9, 2025
1 parent 7cd4113 commit 7a540d8
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
95 changes: 95 additions & 0 deletions pkgs/development/python-modules/neurokit2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
lib,
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
];

dependencies = [
scipy
scikit-learn
pandas
matplotlib
requests
cvxopt
biosppy
];

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

disabledTestPaths = [
# 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;
maintainers = with lib.maintainers; [ genga898 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9191,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

0 comments on commit 7a540d8

Please sign in to comment.