python3Packages.jupyter-collaboration: 3.1.0 -> 4.0.2; fix tests (#406100)

This commit is contained in:
Gaétan Lepage
2025-05-21 01:22:50 +02:00
committed by GitHub
5 changed files with 38 additions and 54 deletions
@@ -33,7 +33,7 @@ buildPythonPackage rec {
# no tests
doCheck = false;
passthru.tests = jupyter-collaboration.tests;
passthru.tests = jupyter-collaboration;
meta = {
description = "JupyterLab/Jupyter Notebook 7+ extension providing user interface integration for real time collaboration";
@@ -1,7 +1,7 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
# build-system
hatchling,
@@ -10,36 +10,59 @@
jupyter-collaboration-ui,
jupyter-docprovider,
jupyter-server-ydoc,
jupyterlab,
# tests
callPackage,
dirty-equals,
httpx-ws,
pytest-jupyter,
pytest-timeout,
pytestCheckHook,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "jupyter-collaboration";
version = "3.1.0";
version = "4.0.2";
pyproject = true;
src = fetchPypi {
pname = "jupyter_collaboration";
inherit version;
hash = "sha256-BDmG5vzdikFh342XFqk92q/smidKqbUDWEx6gORh7p8=";
src = fetchFromGitHub {
owner = "jupyterlab";
repo = "jupyter-collaboration";
tag = "v${version}";
hash = "sha256-BCvTtrlP45YC9G/m/e8Nvbls7AugIaQzO2Gect1EmGE=";
};
sourceRoot = "${src.name}/projects/jupyter-collaboration";
build-system = [ hatchling ];
dependencies = [
jupyter-collaboration-ui
jupyter-docprovider
jupyter-server-ydoc
jupyterlab
];
pythonImportsCheck = [ "jupyter_collaboration" ];
# no tests
doCheck = false;
nativeCheckInputs = [
dirty-equals
httpx-ws
pytest-jupyter
pytest-timeout
pytestCheckHook
writableTmpDirAsHomeHook
];
passthru.tests = callPackage ./test.nix { };
pytestFlagsArray = [
# pytest.PytestCacheWarning: could not create cache path /build/source/.pytest_cache/v/cache/nodeids: [Errno 13] Permission denied: '/build/source/pytest-cache-files-plraagdr'
"-p"
"no:cacheprovider"
"$src/tests"
];
__darwinAllowLocalNetworking = true;
meta = {
description = "JupyterLab Extension enabling Real-Time Collaboration";
@@ -1,39 +0,0 @@
{
stdenvNoCC,
fetchFromGitHub,
jupyter-collaboration,
pytest-jupyter,
pytestCheckHook,
websockets,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "jupyter-collaboration-test";
inherit (jupyter-collaboration) version;
src = fetchFromGitHub {
owner = "jupyterlab";
repo = "jupyter-collaboration";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-6hDYB1uC0WraB37s9EKLJF7jyFu0B3xLocuLYyKj4hs=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "timeout = 300" ""
'';
installPhase = ''
touch $out
'';
env.HOME = "$TMPDIR";
doCheck = true;
nativeCheckInputs = [
jupyter-collaboration
pytest-jupyter
pytestCheckHook
websockets
];
})
@@ -9,13 +9,13 @@
buildPythonPackage rec {
pname = "jupyter-docprovider";
version = "2.0.1";
version = "2.0.2";
pyproject = true;
src = fetchPypi {
pname = "jupyter_docprovider";
inherit version;
hash = "sha256-4pyF5HDQ7dP32R+O3QN8DWtvJpQxBBbjWXaRAfs10b4=";
hash = "sha256-vWgNlg6Ydw4va3DlEx3A/M9uE0t54GTrV1ljmlX44TU=";
};
postPatch = ''
@@ -33,7 +33,7 @@ buildPythonPackage rec {
# no tests
doCheck = false;
passthru.tests = jupyter-collaboration.tests;
passthru.tests = jupyter-collaboration;
meta = {
description = "JupyterLab/Jupyter Notebook 7+ extension integrating collaborative shared models";
@@ -41,7 +41,7 @@ buildPythonPackage rec {
# no tests
doCheck = false;
passthru.tests = jupyter-collaboration.tests;
passthru.tests = jupyter-collaboration;
meta = {
description = "Jupyter-server extension integrating collaborative shared models";