biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / misc / dbx / default.nix
blob9dc19941a072024064dbe92dfdca1a889afe89bf
2   lib,
3   fetchFromGitHub,
4   git,
5   python3,
6 }:
7 let
8   python = python3.override { packageOverrides = self: super: { pydantic = super.pydantic_1; }; };
9 in
10 python.pkgs.buildPythonApplication rec {
11   pname = "dbx";
12   version = "0.8.18";
13   pyproject = true;
15   src = fetchFromGitHub {
16     owner = "databrickslabs";
17     repo = "dbx";
18     rev = "refs/tags/v${version}";
19     hash = "sha256-5qjEABNTSUD9I2uAn49HQ4n+gbAcmfnqS4Z2M9MvFXQ=";
20   };
22   pythonRelaxDeps = [
23     "cryptography"
24     "databricks-cli"
25     "rich"
26     "typer"
27   ];
29   pythonRemoveDeps = [ "mlflow-skinny" ];
31   build-system = with python.pkgs; [ setuptools ];
33   nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook ];
35   propagatedBuildInputs =
36     with python.pkgs;
37     [
38       aiohttp
39       click
40       cookiecutter
41       cryptography
42       databricks-cli
43       jinja2
44       mlflow
45       pathspec
46       pydantic
47       pyyaml
48       requests
49       retry
50       rich
51       tenacity
52       typer
53       watchdog
54     ]
55     ++ typer.optional-dependencies.all;
57   passthru.optional-dependencies = with python3.pkgs; {
58     aws = [ boto3 ];
59     azure = [
60       azure-storage-blob
61       azure-identity
62     ];
63     gcp = [ google-cloud-storage ];
64   };
66   nativeCheckInputs =
67     [ git ]
68     ++ (with python3.pkgs; [
69       pytest-asyncio
70       pytest-mock
71       pytest-timeout
72       pytestCheckHook
73     ]);
75   preCheck = ''
76     export HOME=$(mktemp -d)
77     export PATH="$PATH:$out/bin"
78   '';
80   pytestFlagsArray = [ "tests/unit" ];
82   disabledTests = [
83     # Fails because of dbfs CLI wrong call
84     "test_dbfs_unknown_user"
85     "test_dbfs_no_root"
86     # Requires pylint, prospector, pydocstyle
87     "test_python_basic_sanity_check"
88   ];
90   disabledTestPaths = [
91     "tests/unit/api/"
92     "tests/unit/api/test_build.py"
93     "tests/unit/api/test_destroyer.py"
94     "tests/unit/api/test_jinja.py"
95     "tests/unit/commands/test_configure.py"
96     "tests/unit/commands/test_deploy_jinja_variables_file.py"
97     "tests/unit/commands/test_deploy.py"
98     "tests/unit/commands/test_destroy.py"
99     "tests/unit/commands/test_execute.py"
100     "tests/unit/commands/test_help.py"
101     "tests/unit/commands/test_launch.py"
102     "tests/unit/models/test_deployment.py"
103     "tests/unit/models/test_destroyer.py"
104     "tests/unit/models/test_task.py"
105     "tests/unit/sync/test_commands.py"
106     "tests/unit/utils/test_common.py"
107   ];
109   pythonImportsCheck = [ "dbx" ];
111   meta = with lib; {
112     description = "CLI tool for advanced Databricks jobs management";
113     homepage = "https://github.com/databrickslabs/dbx";
114     changelog = "https://github.com/databrickslabs/dbx/blob/v${version}/CHANGELOG.md";
115     license = licenses.databricks-dbx;
116     maintainers = with maintainers; [ GuillaumeDesforges ];
117   };