From 728fa553e2e2fc7209a3a3a6bd0dbefe5e2313bf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 22 Oct 2021 10:38:35 +0200 Subject: [PATCH 1/6] python3Packages.param: 1.11.1 -> 1.12.0 --- pkgs/development/python-modules/param/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/param/default.nix b/pkgs/development/python-modules/param/default.nix index 0ae362dd28ac..3a812f17fe3b 100644 --- a/pkgs/development/python-modules/param/default.nix +++ b/pkgs/development/python-modules/param/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "param"; - version = "1.11.1"; + version = "1.12.0"; src = fetchPypi { inherit pname version; - sha256 = "b9857df01495bd55ddafb214fd1ed017d20699ce42ec2a0fd190d99caa03099f"; + sha256 = "sha256-NdAoHI47623UafRv8LkXdSpUvtlNGwxWc0bHbQ/1nEo="; }; checkInputs = [ flake8 nose ]; @@ -19,10 +19,14 @@ buildPythonPackage rec { # tests not included with pypi release doCheck = false; + pythonImportsCheck = [ + "param" + ]; + meta = with lib; { description = "Declarative Python programming using Parameters"; homepage = "https://github.com/pyviz/param"; license = licenses.bsd3; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From 82407152f50835564a92bb497a8007994802ce51 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 22 Oct 2021 11:41:46 +0200 Subject: [PATCH 2/6] python3Packages.pyct: switch to pytestCheckHook --- .../python-modules/pyct/default.nix | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pyct/default.nix b/pkgs/development/python-modules/pyct/default.nix index b2314e6edfeb..4538410c3623 100644 --- a/pkgs/development/python-modules/pyct/default.nix +++ b/pkgs/development/python-modules/pyct/default.nix @@ -3,9 +3,9 @@ , fetchPypi , isPy27 , param +, pytestCheckHook , pyyaml , requests -, pytest }: buildPythonPackage rec { @@ -17,22 +17,26 @@ buildPythonPackage rec { sha256 = "23d7525b5a1567535c093aea4b9c33809415aa5f018dd77f6eb738b1226df6f7"; }; - doCheck = !isPy27; - checkInputs = [ pytest ]; propagatedBuildInputs = [ param pyyaml requests ]; - checkPhase = '' - pytest - ''; + checkInputs = [ + pytestCheckHook + ]; + + doCheck = !isPy27; + + pythonImportsCheck = [ + "pyct" + ]; meta = with lib; { - description = "Cli for python common tasks for users"; + description = "ClI for Python common tasks for users"; homepage = "https://github.com/pyviz/pyct"; license = licenses.bsd3; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From 76638545c8e9af9cac48f7bc16f97ef3eabf3ede Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 22 Oct 2021 11:42:32 +0200 Subject: [PATCH 3/6] python3Packages.colorcet: switch to pytestCheckHook --- .../python-modules/colorcet/default.nix | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/colorcet/default.nix b/pkgs/development/python-modules/colorcet/default.nix index 207653375144..6135730beb00 100644 --- a/pkgs/development/python-modules/colorcet/default.nix +++ b/pkgs/development/python-modules/colorcet/default.nix @@ -1,12 +1,11 @@ { lib , buildPythonPackage , fetchPypi +, nbsmoke , param , pyct -, nbsmoke -, flake8 -, pytest , pytest-mpl +, pytestCheckHook }: buildPythonPackage rec { @@ -24,25 +23,29 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest - flake8 pytest-mpl + pytestCheckHook ]; - checkPhase = '' + preCheck = '' export HOME=$(mktemp -d) mkdir -p $HOME/.config/matplotlib echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc ln -s $HOME/.config/matplotlib $HOME/.matplotlib - - # requires other backends to be available - pytest colorcet -k 'not matplotlib_default_colormap_plot' ''; + disabledTests = [ + "matplotlib_default_colormap_plot" + ]; + + pythonImportsCheck = [ + "colorcet" + ]; + meta = with lib; { description = "Collection of perceptually uniform colormaps"; homepage = "https://colorcet.pyviz.org"; license = licenses.cc-by-40; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From f78568d24a17accc07059d869068f44d86d88d54 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 22 Oct 2021 11:42:55 +0200 Subject: [PATCH 4/6] python3Packages.hvplot: remove unused inputs --- .../python-modules/hvplot/default.nix | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/hvplot/default.nix b/pkgs/development/python-modules/hvplot/default.nix index 271b3923033c..22be0ff75c9f 100644 --- a/pkgs/development/python-modules/hvplot/default.nix +++ b/pkgs/development/python-modules/hvplot/default.nix @@ -1,18 +1,10 @@ { lib -, buildPythonPackage -, fetchPypi , bokeh +, buildPythonPackage +, colorcet +, fetchPypi , holoviews , pandas -, pytest -, parameterized -, nbsmoke -, flake8 -, coveralls -, xarray -, networkx -, streamz -, colorcet , pythonImportsCheckHook }: @@ -29,7 +21,6 @@ buildPythonPackage rec { pythonImportsCheckHook ]; - checkInputs = [ pytest parameterized nbsmoke flake8 coveralls xarray networkx streamz ]; propagatedBuildInputs = [ bokeh colorcet @@ -37,11 +28,7 @@ buildPythonPackage rec { pandas ]; - preCheck = '' - export HOME=$(mktemp -d) - ''; - - # many tests require a network connection + # Many tests require a network connection doCheck = false; pythonImportsCheck = [ @@ -52,6 +39,6 @@ buildPythonPackage rec { description = "A high-level plotting API for the PyData ecosystem built on HoloViews"; homepage = "https://hvplot.pyviz.org"; license = licenses.bsd3; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } From 840f7a226938c33b443da6cb57cacb1d9e623454 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 22 Oct 2021 12:05:47 +0200 Subject: [PATCH 5/6] python3Packages.param: enable tests --- .../python-modules/param/default.nix | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/param/default.nix b/pkgs/development/python-modules/param/default.nix index 3a812f17fe3b..23c9bc9c3933 100644 --- a/pkgs/development/python-modules/param/default.nix +++ b/pkgs/development/python-modules/param/default.nix @@ -1,23 +1,29 @@ { lib , buildPythonPackage -, fetchPypi -, flake8 -, nose +, fetchFromGitHub +, pytestCheckHook }: buildPythonPackage rec { pname = "param"; version = "1.12.0"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-NdAoHI47623UafRv8LkXdSpUvtlNGwxWc0bHbQ/1nEo="; + src = fetchFromGitHub { + owner = "holoviz"; + repo = pname; + rev = "v${version}"; + sha256 = "02zmd4bwyn8b4q1l9jgddc70ii1i7bmynacanl1cvbr6la4v9b2c"; }; - checkInputs = [ flake8 nose ]; + checkInputs = [ + pytestCheckHook + ]; - # tests not included with pypi release - doCheck = false; + postPatch = '' + # Version is not set properly + substituteInPlace setup.py \ + --replace 'version=get_setup_version("param"),' 'version="${version}",' + ''; pythonImportsCheck = [ "param" From 5c46d745d5a55c8b2741cb6bf2e90287d766f8b1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 22 Oct 2021 15:41:55 +0200 Subject: [PATCH 6/6] python3Packages.intake: 0.6.3 -> 0.6.4 --- .../python-modules/intake/default.nix | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/intake/default.nix b/pkgs/development/python-modules/intake/default.nix index 361469f540e1..26448f3a21d2 100644 --- a/pkgs/development/python-modules/intake/default.nix +++ b/pkgs/development/python-modules/intake/default.nix @@ -1,67 +1,71 @@ { lib -, buildPythonPackage -, fetchPypi , appdirs +, bokeh +, buildPythonPackage , dask +, entrypoints +, fetchFromGitHub +, fsspec , holoviews , hvplot -, fsspec +, intake-parquet , jinja2 , msgpack , msgpack-numpy , numpy , pandas , panel -, intake-parquet , pyarrow , pytestCheckHook -, pythonOlder , python-snappy +, pythonOlder +, pyyaml , requests -, ruamel_yaml -, six , tornado }: buildPythonPackage rec { pname = "intake"; - version = "0.6.3"; + version = "0.6.4"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - sha256 = "f64543353f30d9440b953984f78b7a0954e5756d70c64243609d307ba488014f"; + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "194cdd6lx92zcpkn3wgm490kxvw0c58ziix8hcihsr5ayfr1wdsl"; }; propagatedBuildInputs = [ appdirs + bokeh dask + entrypoints + fsspec holoviews hvplot jinja2 - msgpack-numpy msgpack + msgpack-numpy numpy pandas panel + pyarrow python-snappy + pyyaml requests - ruamel_yaml - six tornado ]; checkInputs = [ - fsspec intake-parquet - pyarrow pytestCheckHook ]; postPatch = '' - # Is in setup_requires but not used in setup.py... - substituteInPlace setup.py --replace "'pytest-runner'" "" + substituteInPlace setup.py \ + --replace "'pytest-runner'" "" ''; # test_discover requires driver_with_entrypoints-0.1.dist-info, which is not included in tarball @@ -72,7 +76,7 @@ buildPythonPackage rec { ''; disabledTests = [ - # disable tests which touch network and are broken + # Disable tests which touch network and are broken "test_discover" "test_filtered_compressed_cache" "test_get_dir" @@ -82,6 +86,10 @@ buildPythonPackage rec { "test_remote_arr" ]; + pythonImportsCheck = [ + "intake" + ]; + meta = with lib; { description = "Data load and catalog system"; homepage = "https://github.com/ContinuumIO/intake";