Unverified Commit a9f2e715 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #208665 from ifurther/gluevis

Python3Packages.glueviz: init at 1.14.1
parents b606ebb3 6dc88aba
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, setuptools
, setuptools-scm
, libxcrypt
, numpy
, qt6
, qtpy
, pyqt6
, pytestCheckHook
, pytest-cov
}:

buildPythonPackage rec {
  pname = "echo";
  version = "0.8.0";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "glue-viz";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-0FmUA7kOFSRZXwbj8d7asujBPOjE2pFhu6TDNSGD4r0=";
  };

  nativeBuildInputs = [ setuptools setuptools-scm qt6.wrapQtAppsHook ];

  buildInputs = lib.optionals (pythonOlder "3.9") [
    libxcrypt
  ];

  propagatedBuildInputs = [
    qt6.qtconnectivity
    qt6.qtbase
    qt6.qttools
    pyqt6
    numpy
    qtpy
  ];

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  # collecting ... qt.qpa.xcb: could not connect to display
  # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  doCheck = false;

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov
  ];

  pythonImportsCheck = [ "echo" ];

  meta = with lib; {
    homepage = "https://github.com/glue-viz/echo";
    description = "Callback Properties in Python";
    license = licenses.mit;
    maintainers = with maintainers; [ ifurther ];
  };
}
+54 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, pytestCheckHook
, fetchFromGitHub
, python
, pythonOlder
, setuptools
, setuptools-scm
, numpy
, wheel
, hypothesis
, pytest-cov
}:

buildPythonPackage rec {
  pname = "fast-histogram";
  version = "0.12";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "astrofrog";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-Cz4BgbtxbUPxL2NSzvZYjbYIN4KUuliUV0bXRRtyvfM=";
  };

  nativeBuildInputs = [
    setuptools
    setuptools-scm
    wheel
  ];

  propagatedBuildInputs = [ numpy ];

  nativeCheckInputs = [
    pytestCheckHook
    hypothesis
    pytest-cov
  ];

  pytestFlagsArray = [ "${builtins.placeholder "out"}/${python.sitePackages}" ];

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  pythonImportsCheck = [ "fast_histogram" ];

  meta = with lib; {
    homepage = "https://github.com/astrofrog/fast-histogram";
    description = "Fast 1D and 2D histogram functions in Python";
    license = licenses.bsd2;
    maintainers = with maintainers; [ ifurther ];
  };
}
+87 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, dill
, astropy
, numpy
, pandas
, qt6
, pyqt6
, pyqt-builder
, qtconsole
, setuptools
, setuptools-scm
, scipy
, ipython
, ipykernel
, h5py
, matplotlib
, xlrd
, mpl-scatter-density
, pvextractor
, openpyxl
, echo
, pytest
, pytest-flakes
, pytest-cov
}:

buildPythonPackage rec {
  pname = "glueviz";
  version = "1.14.1";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "glue-viz";
    repo = "glue";
    rev = "refs/tags/v${version}";
    sha256 = "sha256-pHUcvyDziE7l0foEz7cygMuAwggnIWzsQy9SFZCDkXA=";
  };

  buildInputs = [ pyqt-builder ];
  nativeBuildInputs = [ setuptools setuptools-scm qt6.wrapQtAppsHook ];
  propagatedBuildInputs = [
    astropy
    dill
    setuptools
    scipy
    numpy
    matplotlib
    pandas
    pyqt6
    qtconsole
    ipython
    ipykernel
    h5py
    xlrd
    mpl-scatter-density
    pvextractor
    openpyxl
    echo
  ];

  dontConfigure = true;

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  # collecting ... qt.qpa.xcb: could not connect to display
  # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  doCheck = false;

  nativeCheckInputs = [ pytest pytest-flakes pytest-cov ];

  pythonImportsCheck = [ "glue" ];

  preFixup = ''
    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
  '';

  meta = with lib; {
    homepage = "https://glueviz.org";
    description = "Linked Data Visualizations Across Multiple Files";
    license = licenses.bsd3; # https://github.com/glue-viz/glue/blob/main/LICENSE
    maintainers = with maintainers; [ ifurther ];
  };
}
+67 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, pytestCheckHook
, fetchFromGitHub
, fetchpatch
, pythonOlder
, setuptools-scm
, setuptools
, fast-histogram
, matplotlib
, numpy
, wheel
, pytest-mpl
}:

buildPythonPackage rec {
  pname = "mpl-scatter-density";
  version = "0.7";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "astrofrog";
    repo = pname;
    rev = "refs/tags/v${version}";
    sha256 = "sha256-MMxM+iv5p9ZLcBpqa3tBBPbsMM/PTg6BXaDpGgSw+DE=";
  };

  patches = [
    # https://github.com/astrofrog/mpl-scatter-density/pull/37
    (fetchpatch {
      name = "distutils-removal.patch";
      url = "https://github.com/ifurther/mpl-scatter-density/commit/6feedabe1e82da67d8eec46a80eb370d9f334251.patch";
      sha256 = "sha256-JqWlSm8mIwqjRPa+kMEaKipJyzGEO+gJK+Q045N1MXA=";
    })
  ];

  nativeBuildInputs = [
    setuptools
    setuptools-scm
    wheel
  ];

  propagatedBuildInputs = [ matplotlib numpy fast-histogram ];

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeCheckInputs = [
    pytestCheckHook
    pytest-mpl
  ];

  disabledTests = [
    # AssertionError: (240, 240) != (216, 216)
    # Erroneous pinning of figure DPI, sensitive to runtime environment
    "test_default_dpi"
  ];

  pythonImportsCheck = [ "mpl_scatter_density" ];

  meta = with lib; {
    homepage = "https://github.com/astrofrog/mpl-scatter-density";
    description = "Fast scatter density plots for Matplotlib";
    license = licenses.bsd2;
    maintainers = with maintainers; [ ifurther ];
  };
}
+61 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, astropy
, qtpy
, pyqt6
, pyqt-builder
, setuptools
, setuptools-scm
, scipy
, matplotlib
, spectral-cube
, pytestCheckHook
, pytest-astropy
}:

buildPythonPackage rec {
  pname = "pvextractor";
  version = "0.3";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "radio-astro-tools";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-HYus2Gk3hzKq+3lJLOJQ+EE6LeO+DrvqLK3NpqrUYeI=";
  };

  buildInputs = [ pyqt-builder ];
  nativeBuildInputs = [ setuptools setuptools-scm ];
  propagatedBuildInputs = [
    astropy
    scipy
    matplotlib
    pyqt6
    qtpy
    spectral-cube
  ];

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  # collecting ... qt.qpa.xcb: could not connect to display
  # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  doCheck = false;

  nativeCheckInputs = [
    pytestCheckHook
    pytest-astropy
  ];

  pythonImportsCheck = [ "pvextractor" ];

  meta = with lib; {
    homepage = "http://pvextractor.readthedocs.io";
    description = "Position-velocity diagram extractor";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ifurther ];
  };
}
Loading