biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / dbx / default.nix
blobf3f3409434415142522d49566b9a2fcf1fe58bc2
2   lib,
3   fetchFromGitHub,
4   git,
5   python3,
6 }:
7 let
8   python = python3.override { self = python; 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 ];
34   propagatedBuildInputs =
35     with python.pkgs;
36     [
37       aiohttp
38       click
39       cookiecutter
40       cryptography
41       databricks-cli
42       jinja2
43       mlflow
44       pathspec
45       pydantic
46       pyyaml
47       requests
48       retry
49       rich
50       tenacity
51       typer
52       watchdog
53     ];
55   optional-dependencies = with python3.pkgs; {
56     aws = [ boto3 ];
57     azure = [
58       azure-storage-blob
59       azure-identity
60     ];
61     gcp = [ google-cloud-storage ];
62   };
64   nativeCheckInputs =
65     [ git ]
66     ++ (with python3.pkgs; [
67       pytest-asyncio
68       pytest-mock
69       pytest-timeout
70       pytestCheckHook
71     ]);
73   preCheck = ''
74     export HOME=$(mktemp -d)
75     export PATH="$PATH:$out/bin"
76   '';
78   pytestFlagsArray = [ "tests/unit" ];
80   disabledTests = [
81     # Fails because of dbfs CLI wrong call
82     "test_dbfs_unknown_user"
83     "test_dbfs_no_root"
84     # Requires pylint, prospector, pydocstyle
85     "test_python_basic_sanity_check"
86   ];
88   disabledTestPaths = [
89     "tests/unit/api/"
90     "tests/unit/api/test_build.py"
91     "tests/unit/api/test_destroyer.py"
92     "tests/unit/api/test_jinja.py"
93     "tests/unit/commands/test_configure.py"
94     "tests/unit/commands/test_deploy_jinja_variables_file.py"
95     "tests/unit/commands/test_deploy.py"
96     "tests/unit/commands/test_destroy.py"
97     "tests/unit/commands/test_execute.py"
98     "tests/unit/commands/test_help.py"
99     "tests/unit/commands/test_launch.py"
100     "tests/unit/models/test_deployment.py"
101     "tests/unit/models/test_destroyer.py"
102     "tests/unit/models/test_task.py"
103     "tests/unit/sync/test_commands.py"
104     "tests/unit/utils/test_common.py"
105   ];
107   pythonImportsCheck = [ "dbx" ];
109   meta = with lib; {
110     description = "CLI tool for advanced Databricks jobs management";
111     homepage = "https://github.com/databrickslabs/dbx";
112     changelog = "https://github.com/databrickslabs/dbx/blob/v${version}/CHANGELOG.md";
113     license = licenses.databricks-dbx;
114     maintainers = with maintainers; [ GuillaumeDesforges ];
115   };