Unverified Commit f7e9672e authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

python31{1,2}Packages.hvplot: enable (most) tests (#350096)

parents b1ce1ad4 a7bc20ee
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,

  # build-system
  setuptools,
  setuptools-git-versioning,

  # dependencies
  icalendar,
  pandas,
}:

buildPythonPackage rec {
  pname = "bokeh-sampledata";
  version = "2024.2";
  pyproject = true;

  src = fetchPypi {
    pname = "bokeh_sampledata";
    inherit version;
    hash = "sha256-5j2qluedVj7IuE8gZy/+lPkFshRV+rjYPuM05G2jNiQ=";
  };

  build-system = [
    setuptools
    setuptools-git-versioning
  ];

  dependencies = [
    icalendar
    pandas
  ];

  pythonImportsCheck = [
    "bokeh_sampledata"
  ];

  meta = {
    description = "Sample datasets for Bokeh examples";
    homepage = "https://pypi.org/project/bokeh-sampledata";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ doronbehar ];
  };
}
+31 −6
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  colorcet,
  fetchPypi,
  pythonOlder,

  # build-system
  hatch-vcs,
  hatchling,

  # dependencies
  colorcet,
  numpy,
  pandas,
  panel,
  param,
  pythonOlder,
  pyviz-comms,

  # tests
  pytestCheckHook,
  pytest-cov,
  flaky,
}:

buildPythonPackage rec {
@@ -39,16 +48,32 @@ buildPythonPackage rec {
    pyviz-comms
  ];

  # tests not fully included with pypi release
  doCheck = false;
  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov
    flaky
  ];

  disabledTests = [
    # All the below fail due to some change in flaky API
    "test_periodic_param_fn_non_blocking"
    "test_callback_cleanup"
    "test_poly_edit_callback"
    "test_launch_server_with_complex_plot"
    "test_launch_server_with_stream"
    "test_launch_simple_server"
    "test_server_dynamicmap_with_dims"
    "test_server_dynamicmap_with_stream"
    "test_server_dynamicmap_with_stream_dims"
  ];

  pythonImportsCheck = [ "holoviews" ];

  meta = with lib; {
  meta = {
    description = "Python data analysis and visualization seamless and simple";
    mainProgram = "holoviews";
    homepage = "https://www.holoviews.org/";
    license = licenses.bsd3;
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}
+46 −11
Original line number Diff line number Diff line
{
  lib,
  bokeh,
  buildPythonPackage,
  colorcet,
  fetchPypi,
  holoviews,
  pandas,
  pythonOlder,

  # build-system
  setuptools-scm,

  # dependencies
  bokeh,
  colorcet,
  holoviews,
  pandas,

  # tests
  pytestCheckHook,
  dask,
  xarray,
  bokeh-sampledata,
  parameterized,
  selenium,
  matplotlib,
  scipy,
  plotly,
}:

buildPythonPackage rec {
  pname = "hvplot";
  version = "0.10.0";
  version = "0.11.1";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-6HSGqVv+FRq1LvFjpek9nL0EOZLPC3Vcyt0r82/t03Y=";
    hash = "sha256-mJ7QOJGJrcR+3NJgHS6rGL82bnSwf14oc+AhMjxKFLs=";
  };

  build-system = [ setuptools-scm ];
  build-system = [
    setuptools-scm
  ];

  dependencies = [
    bokeh
@@ -31,16 +48,34 @@ buildPythonPackage rec {
    pandas
  ];

  # Many tests require a network connection
  doCheck = false;
  nativeCheckInputs = [
    pytestCheckHook
    dask
    xarray
    bokeh-sampledata
    parameterized
    selenium
    matplotlib
    scipy
    plotly
  ];

  disabledTestPaths = [
    # All of the following below require xarray.tutorial files that require
    # downloading files from the internet (not possible in the sandbox).
    "hvplot/tests/testgeo.py"
    "hvplot/tests/testinteractive.py"
    "hvplot/tests/testui.py"
    "hvplot/tests/testutil.py"
  ];

  pythonImportsCheck = [ "hvplot.pandas" ];

  meta = with lib; {
  meta = {
    description = "High-level plotting API for the PyData ecosystem built on HoloViews";
    homepage = "https://hvplot.pyviz.org";
    changelog = "https://github.com/holoviz/hvplot/releases/tag/v${version}";
    license = licenses.bsd3;
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}
+19 −10
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  appdirs,
  platformdirs,
  bokeh,
  buildPythonPackage,
  dask,
@@ -19,7 +19,9 @@
  pytestCheckHook,
  python-snappy,
  pythonOlder,
  pythonAtLeast,
  pyyaml,
  networkx,
  requests,
  setuptools,
  setuptools-scm,
@@ -28,7 +30,7 @@

buildPythonPackage rec {
  pname = "intake";
  version = "2.0.3";
  version = "2.0.7";
  pyproject = true;

  disabled = pythonOlder "3.8";
@@ -37,7 +39,7 @@ buildPythonPackage rec {
    owner = "intake";
    repo = "intake";
    rev = "refs/tags/${version}";
    hash = "sha256-Fyv85HkoE9OPOoSHR1sgCG0iAFuSiQMT7cyZcQyLvv0=";
    hash = "sha256-F13jbAQP3G3cKeAegM1w/t32xyC0BgL9/67aIlzA4SE=";
  };

  nativeBuildInputs = [
@@ -46,7 +48,7 @@ buildPythonPackage rec {
  ];

  propagatedBuildInputs = [
    appdirs
    platformdirs
    dask
    entrypoints
    fsspec
@@ -54,6 +56,7 @@ buildPythonPackage rec {
    jinja2
    pandas
    pyyaml
    networkx
  ];

  nativeCheckInputs = [
@@ -124,7 +127,13 @@ buildPythonPackage rec {
      # Timing-based, flaky on darwin and possibly others
      "test_idle_timer"
    ]
    ++ lib.optionals
    ++ lib.optionals (pythonAtLeast "3.12") [
      # Require deprecated distutils
      "test_which"
      "test_load"
    ]
    ++
      lib.optionals
        (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13")
        [
          # Flaky with older low-res mtime on darwin < 10.13 (#143987)
+25 −9
Original line number Diff line number Diff line
@@ -2,41 +2,57 @@
  lib,
  buildPythonPackage,
  fetchPypi,
  param,
  pytestCheckHook,
  pythonAtLeast,

  # build-system
  setuptools,

  # dependencies
  param,
  pyyaml,
  requests,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "pyct";
  version = "0.5.0";
  format = "setuptools";

  disabled = pythonAtLeast "3.12";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-3Z9KxcvY43w1LAQDYGLTxfZ+/sdtQEdh7xawy/JqpqA=";
  };

  propagatedBuildInputs = [
  build-system = [
    setuptools
  ];

  dependencies = [
    param
    pyyaml
    requests
  ];

  nativeCheckInputs = [ pytestCheckHook ];
  nativeCheckInputs = [
    pytestCheckHook
  ];
  # Only the command line doesn't work on with Python 3.12, due to usage of
  # deprecated distutils module. Not disabling it totally.
  disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [
    "pyct/tests/test_cmd.py"
  ];

  pythonImportsCheck = [ "pyct" ];

  meta = with lib; {
  meta = {
    description = "ClI for Python common tasks for users";
    mainProgram = "pyct";
    homepage = "https://github.com/pyviz/pyct";
    changelog = "https://github.com/pyviz-dev/pyct/releases/tag/v${version}";
    license = licenses.bsd3;
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}
Loading