about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/dbx/default.nix117
-rw-r--r--pkgs/development/python-modules/gorilla/default.nix27
-rw-r--r--pkgs/development/python-modules/mmengine/default.nix73
-rw-r--r--pkgs/development/python-modules/querystring-parser/default.nix32
4 files changed, 151 insertions, 98 deletions
diff --git a/pkgs/applications/misc/dbx/default.nix b/pkgs/applications/misc/dbx/default.nix
index e7c72f3285594..9dc19941a0720 100644
--- a/pkgs/applications/misc/dbx/default.nix
+++ b/pkgs/applications/misc/dbx/default.nix
@@ -1,13 +1,16 @@
-{ lib
-, fetchFromGitHub
-, git
-, python3
+{
+  lib,
+  fetchFromGitHub,
+  git,
+  python3,
 }:
-
-python3.pkgs.buildPythonApplication rec {
+let
+  python = python3.override { packageOverrides = self: super: { pydantic = super.pydantic_1; }; };
+in
+python.pkgs.buildPythonApplication rec {
   pname = "dbx";
   version = "0.8.18";
-  format = "setuptools";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "databrickslabs";
@@ -17,67 +20,64 @@ python3.pkgs.buildPythonApplication rec {
   };
 
   pythonRelaxDeps = [
+    "cryptography"
+    "databricks-cli"
     "rich"
     "typer"
   ];
 
-  pythonRemoveDeps = [
-    "mlflow-skinny"
-  ];
+  pythonRemoveDeps = [ "mlflow-skinny" ];
 
-  nativeBuildInputs = with python3.pkgs; [
-    pythonRelaxDepsHook
-  ];
+  build-system = with python.pkgs; [ setuptools ];
+
+  nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook ];
 
-  propagatedBuildInputs = with python3.pkgs; [
-    aiohttp
-    click
-    cookiecutter
-    cryptography
-    databricks-cli
-    jinja2
-    mlflow
-    pathspec
-    pydantic
-    pyyaml
-    requests
-    retry
-    rich
-    tenacity
-    typer
-    watchdog
-  ] ++ typer.optional-dependencies.all;
+  propagatedBuildInputs =
+    with python.pkgs;
+    [
+      aiohttp
+      click
+      cookiecutter
+      cryptography
+      databricks-cli
+      jinja2
+      mlflow
+      pathspec
+      pydantic
+      pyyaml
+      requests
+      retry
+      rich
+      tenacity
+      typer
+      watchdog
+    ]
+    ++ typer.optional-dependencies.all;
 
   passthru.optional-dependencies = with python3.pkgs; {
-    aws = [
-      boto3
-    ];
+    aws = [ boto3 ];
     azure = [
       azure-storage-blob
       azure-identity
     ];
-    gcp = [
-      google-cloud-storage
-    ];
+    gcp = [ google-cloud-storage ];
   };
 
-  nativeCheckInputs = [
-    git
-  ] ++ (with python3.pkgs; [
-    pytest-asyncio
-    pytest-mock
-    pytest-timeout
-    pytestCheckHook
-  ]);
+  nativeCheckInputs =
+    [ git ]
+    ++ (with python3.pkgs; [
+      pytest-asyncio
+      pytest-mock
+      pytest-timeout
+      pytestCheckHook
+    ]);
 
   preCheck = ''
     export HOME=$(mktemp -d)
     export PATH="$PATH:$out/bin"
   '';
 
-  pytestFlagsArray = [
-    "tests/unit"
-  ];
+  pytestFlagsArray = [ "tests/unit" ];
 
   disabledTests = [
     # Fails because of dbfs CLI wrong call
@@ -87,10 +87,27 @@ python3.pkgs.buildPythonApplication rec {
     "test_python_basic_sanity_check"
   ];
 
-  pythonImportsCheck = [
-    "dbx"
+  disabledTestPaths = [
+    "tests/unit/api/"
+    "tests/unit/api/test_build.py"
+    "tests/unit/api/test_destroyer.py"
+    "tests/unit/api/test_jinja.py"
+    "tests/unit/commands/test_configure.py"
+    "tests/unit/commands/test_deploy_jinja_variables_file.py"
+    "tests/unit/commands/test_deploy.py"
+    "tests/unit/commands/test_destroy.py"
+    "tests/unit/commands/test_execute.py"
+    "tests/unit/commands/test_help.py"
+    "tests/unit/commands/test_launch.py"
+    "tests/unit/models/test_deployment.py"
+    "tests/unit/models/test_destroyer.py"
+    "tests/unit/models/test_task.py"
+    "tests/unit/sync/test_commands.py"
+    "tests/unit/utils/test_common.py"
   ];
 
+  pythonImportsCheck = [ "dbx" ];
+
   meta = with lib; {
     description = "CLI tool for advanced Databricks jobs management";
     homepage = "https://github.com/databrickslabs/dbx";
diff --git a/pkgs/development/python-modules/gorilla/default.nix b/pkgs/development/python-modules/gorilla/default.nix
index 3603e1961e1da..8b61584a3af4a 100644
--- a/pkgs/development/python-modules/gorilla/default.nix
+++ b/pkgs/development/python-modules/gorilla/default.nix
@@ -1,18 +1,37 @@
-{ lib, buildPythonPackage, fetchPypi}:
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  pytestCheckHook,
+  pythonAtLeast,
+  pythonOlder,
+  setuptools,
+}:
 
 buildPythonPackage rec {
   pname = "gorilla";
   version = "0.4.0";
-  format = "setuptools";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "005ab8853b037162a7c77bb824604c6e081878ee03c09ad01ef41744856019d3";
+    hash = "sha256-AFq4hTsDcWKnx3u4JGBMbggYeO4DwJrQHvQXRIVgGdM=";
   };
 
+  build-system = [ setuptools ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  pythonImportsCheck = [ "gorilla" ];
+
+  disabledTests = lib.optionals (pythonAtLeast "3.12") [ "test_find_patches_2" ];
+
   meta = with lib; {
-    homepage = "https://github.com/christophercrouzet/gorilla";
     description = "Convenient approach to monkey patching";
+    homepage = "https://github.com/christophercrouzet/gorilla";
+    changelog = "https://github.com/christophercrouzet/gorilla/releases/tag/v${version}";
     license = licenses.mit;
     maintainers = with maintainers; [ tbenst ];
   };
diff --git a/pkgs/development/python-modules/mmengine/default.nix b/pkgs/development/python-modules/mmengine/default.nix
index 347d22d569e05..7187fe809875b 100644
--- a/pkgs/development/python-modules/mmengine/default.nix
+++ b/pkgs/development/python-modules/mmengine/default.nix
@@ -1,21 +1,23 @@
-{ lib
-, addict
-, buildPythonPackage
-, coverage
-, fetchFromGitHub
-, lmdb
-, matplotlib
-, mlflow
-, numpy
-, opencv4
-, parameterized
-, pytestCheckHook
-, pythonOlder
-, pyyaml
-, rich
-, termcolor
-, torch
-, yapf
+{
+  lib,
+  addict,
+  buildPythonPackage,
+  coverage,
+  fetchFromGitHub,
+  lmdb,
+  matplotlib,
+  mlflow,
+  numpy,
+  opencv4,
+  parameterized,
+  pytestCheckHook,
+  pythonOlder,
+  pyyaml,
+  rich,
+  setuptools,
+  termcolor,
+  torch,
+  yapf,
 }:
 
 buildPythonPackage rec {
@@ -32,7 +34,9 @@ buildPythonPackage rec {
     hash = "sha256-fKtPDdeKB3vX2mD+Tsicq8KOkPDSACzKK1XLyugdPQ4=";
   };
 
-  propagatedBuildInputs = [
+  build-system = [ setuptools ];
+
+  dependencies = [
     addict
     matplotlib
     numpy
@@ -47,24 +51,23 @@ buildPythonPackage rec {
     coverage
     lmdb
     mlflow
-    torch
     parameterized
     pytestCheckHook
+    torch
   ];
 
-  preCheck = ''
-    export HOME=$TMPDIR
-  ''
-  # Otherwise, the backprop hangs forever. More precisely, this exact line:
-  # https://github.com/open-mmlab/mmengine/blob/02f80e8bdd38f6713e04a872304861b02157905a/tests/test_runner/test_activation_checkpointing.py#L46
-  # Solution suggested in https://github.com/pytorch/pytorch/issues/91547#issuecomment-1370011188
-  + ''
-    export MKL_NUM_THREADS=1
-  '';
+  preCheck =
+    ''
+      export HOME=$TMPDIR
+    ''
+    # Otherwise, the backprop hangs forever. More precisely, this exact line:
+    # https://github.com/open-mmlab/mmengine/blob/02f80e8bdd38f6713e04a872304861b02157905a/tests/test_runner/test_activation_checkpointing.py#L46
+    # Solution suggested in https://github.com/pytorch/pytorch/issues/91547#issuecomment-1370011188
+    + ''
+      export MKL_NUM_THREADS=1
+    '';
 
-  pythonImportsCheck = [
-    "mmengine"
-  ];
+  pythonImportsCheck = [ "mmengine" ];
 
   disabledTestPaths = [
     # AttributeError
@@ -87,7 +90,6 @@ buildPythonPackage rec {
     "test_lazy_import"
     # AssertionError
     "test_lazy_module"
-
     # Require unpackaged aim
     "test_experiment"
     "test_add_config"
@@ -97,6 +99,11 @@ buildPythonPackage rec {
     "test_close"
   ];
 
+  pytestFlagsArray = [
+    "-W"
+    "ignore::pytest.PytestRemovedIn8Warning"
+  ];
+
   meta = with lib; {
     description = "Library for training deep learning models based on PyTorch";
     homepage = "https://github.com/open-mmlab/mmengine";
diff --git a/pkgs/development/python-modules/querystring-parser/default.nix b/pkgs/development/python-modules/querystring-parser/default.nix
index 7a58fd2a0db1e..0e104dd1fdded 100644
--- a/pkgs/development/python-modules/querystring-parser/default.nix
+++ b/pkgs/development/python-modules/querystring-parser/default.nix
@@ -1,29 +1,39 @@
-{ lib, buildPythonPackage, fetchPypi, python, isPy27
-, six
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  python,
+  pythonOlder,
+  setuptools,
+  six,
 }:
 
 buildPythonPackage rec {
   pname = "querystring-parser";
   version = "1.2.4";
-  disabled = isPy27;
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     pname = "querystring_parser";
     inherit version;
-    sha256 = "644fce1cffe0530453b43a83a38094dbe422ccba8c9b2f2a1c00280e14ca8a62";
+    hash = "sha256-ZE/OHP/gUwRTtDqDo4CU2+QizLqMmy8qHAAoDhTKimI=";
   };
 
-  propagatedBuildInputs = [
-    six
-  ];
+  build-system = [ setuptools ];
+
+  dependencies = [ six ];
+
+  # https://github.com/bernii/querystring-parser/issues/35
+  doCheck = false;
 
-  checkPhase = "${python.interpreter} querystring_parser/tests.py -k 'not test_parse_normalized'";
-  # one test fails due to https://github.com/bernii/querystring-parser/issues/35
-  doCheck = true;
+  pythonImportsCheck = [ "querystring_parser" ];
 
   meta = with lib; {
+    description = "Module to handle nested dictionaries";
     homepage = "https://github.com/bernii/querystring-parser";
-    description = "QueryString parser for Python/Django that correctly handles nested dictionaries";
+    changelog = "https://github.com/bernii/querystring-parser/releases/tag/${version}";
     license = licenses.mit;
     maintainers = with maintainers; [ tbenst ];
   };