Unverified Commit 6ab1b6fd authored by kirillrdy's avatar kirillrdy Committed by GitHub
Browse files

python3Packages.pymoo: 0.6.1.5 -> 0.6.1.6 (#472178)

parents 31c791ea 4f8cf604
Loading
Loading
Loading
Loading
+62 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  cffi,
  setuptools,

  # dependencies
  numpy,
  platformdirs,

  # tests
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "moocore";
  version = "0.1.10";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "multi-objective";
    repo = "moocore";
    tag = "v${version}";
    hash = "sha256-ByWQpd2QuagctTeoO5BIyYiI2bSlEPzNht4ciWCCJtM=";
  };

  sourceRoot = "${src.name}/python";

  build-system = [
    cffi
    setuptools
  ];

  dependencies = [
    cffi
    numpy
    platformdirs
  ];

  pythonImportsCheck = [ "moocore" ];

  nativeCheckInputs = [
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  disabledTests = [
    # Require downloading data from the internet
    "test_read_datasets_data"
  ];

  meta = {
    description = "Core Mathematical Functions for Multi-Objective Optimization";
    homepage = "https://github.com/multi-objective/moocore/tree/main/python";
    license = lib.licenses.lgpl21Plus;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
+19 −14
Original line number Diff line number Diff line
@@ -8,20 +8,24 @@
  setuptools,

  # dependencies
  alive-progress,
  autograd,
  cma,
  deprecated,
  dill,
  matplotlib,
  moocore,
  numpy,
  scipy,

  # tests
  pytestCheckHook,
  jupytext,
  nbformat,
  notebook,
  numba,
  optuna,
  pytestCheckHook,
  pythonAtLeast,
  scikit-learn,
  writeText,
}:

@@ -29,20 +33,20 @@ let
  pymoo_data = fetchFromGitHub {
    owner = "anyoptimization";
    repo = "pymoo-data";
    tag = "33f61a78182ceb211b95381dd6d3edee0d2fc0f3";
    hash = "sha256-iGWPepZw3kJzw5HKV09CvemVvkvFQ38GVP+BAryBSs0=";
    rev = "8dae7d02078def161ee109184399adc3db25265b";
    hash = "sha256-dpuRIMqDQ+oKrvK1VAQxPG6vijZMxT6MB8xOswPwv5o=";
  };
in
buildPythonPackage rec {
  pname = "pymoo";
  version = "0.6.1.5";
  version = "0.6.1.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "anyoptimization";
    repo = "pymoo";
    tag = version;
    hash = "sha256-IRNYluK6fO1cQq0u9dIJYnI5HWqtTPLXARXNoHa4F0I=";
    hash = "sha256-tLkXH0Ig/yWZbaFwzsdIdmbnlNd9UAruVSziaL3iW4U=";
  };

  postPatch = ''
@@ -67,25 +71,24 @@ buildPythonPackage rec {
  ];

  dependencies = [
    alive-progress
    autograd
    cma
    deprecated
    dill
    matplotlib
    moocore
    numpy
    scipy
  ];

  # Some tests require a grad backend to be configured, this is a hacky way to do so.
  # The choice must be either "jax.numpy" or "autograd.numpy"
  preCheck = ''
    echo 'from pymoo.gradient import activate; activate("autograd.numpy")' >> tests/conftest.py
  '';
  nativeCheckInputs = [
    pytestCheckHook
    jupytext
    nbformat
    notebook
    numba
    optuna
    pytestCheckHook
    scikit-learn
  ];
  # Select some lightweight tests
  disabledTestMarks = [ "long" ];
@@ -116,7 +119,7 @@ buildPythonPackage rec {
    "tests/algorithms/test_no_modfication.py"
  ];
  # Avoid crashing sandboxed build on macOS
  MATPLOTLIBRC = writeText "" ''
  env.MATPLOTLIBRC = writeText "" ''
    backend: Agg
  '';

@@ -125,6 +128,8 @@ buildPythonPackage rec {
  meta = {
    description = "Multi-objective Optimization in Python";
    homepage = "https://pymoo.org/";
    downloadPage = "https://github.com/anyoptimization/pymoo";
    changelog = "https://github.com/anyoptimization/pymoo/releases/tag/${src.tag}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ veprbl ];
  };
+2 −0
Original line number Diff line number Diff line
@@ -9916,6 +9916,8 @@ self: super: with self; {
  monzopy = callPackage ../development/python-modules/monzopy { };
  moocore = callPackage ../development/python-modules/moocore { };
  moonraker-api = callPackage ../development/python-modules/moonraker-api { };
  mopeka-iot-ble = callPackage ../development/python-modules/mopeka-iot-ble { };