2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
2022-10-21 18:38:19 +00:00
|
|
|
, python3
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2022-08-12 12:06:08 +00:00
|
|
|
pname = "dbx";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "0.8.18";
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "setuptools";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "databrickslabs";
|
|
|
|
repo = "dbx";
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-5qjEABNTSUD9I2uAn49HQ4n+gbAcmfnqS4Z2M9MvFXQ=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"rich"
|
|
|
|
"typer"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRemoveDeps = [
|
|
|
|
"mlflow-skinny"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
aiohttp
|
|
|
|
click
|
|
|
|
cookiecutter
|
|
|
|
cryptography
|
2022-08-12 12:06:08 +00:00
|
|
|
databricks-cli
|
2022-10-21 18:38:19 +00:00
|
|
|
jinja2
|
|
|
|
mlflow
|
2022-08-12 12:06:08 +00:00
|
|
|
pathspec
|
|
|
|
pydantic
|
2022-10-21 18:38:19 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
2022-08-12 12:06:08 +00:00
|
|
|
retry
|
2022-10-21 18:38:19 +00:00
|
|
|
rich
|
2023-05-24 13:37:59 +00:00
|
|
|
tenacity
|
2022-10-21 18:38:19 +00:00
|
|
|
typer
|
|
|
|
watchdog
|
|
|
|
] ++ typer.optional-dependencies.all;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
passthru.optional-dependencies = with python3.pkgs; {
|
|
|
|
aws = [
|
|
|
|
boto3
|
|
|
|
];
|
|
|
|
azure = [
|
|
|
|
azure-storage-blob
|
|
|
|
azure-identity
|
|
|
|
];
|
|
|
|
gcp = [
|
|
|
|
google-cloud-storage
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
git
|
|
|
|
] ++ (with python3.pkgs; [
|
2022-08-12 12:06:08 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2022-10-21 18:38:19 +00:00
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
]);
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preCheck = ''
|
2022-10-21 18:38:19 +00:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
export PATH="$PATH:$out/bin"
|
2022-08-12 12:06:08 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/unit"
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
disabledTests = [
|
2022-10-21 18:38:19 +00:00
|
|
|
# Fails because of dbfs CLI wrong call
|
2022-08-12 12:06:08 +00:00
|
|
|
"test_dbfs_unknown_user"
|
|
|
|
"test_dbfs_no_root"
|
2022-10-21 18:38:19 +00:00
|
|
|
# Requires pylint, prospector, pydocstyle
|
|
|
|
"test_python_basic_sanity_check"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"dbx"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI tool for advanced Databricks jobs management";
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://github.com/databrickslabs/dbx";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/databrickslabs/dbx/blob/v${version}/CHANGELOG.md";
|
2022-08-12 12:06:08 +00:00
|
|
|
license = licenses.databricks-dbx;
|
|
|
|
maintainers = with maintainers; [ GuillaumeDesforges ];
|
|
|
|
};
|
|
|
|
}
|