nixpkgs/pkgs/applications/misc/dbx/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.6 KiB
Nix
Raw Normal View History

2022-10-16 23:39:01 +02:00
{ lib
2022-07-20 16:39:18 +02:00
, fetchFromGitHub
2022-07-31 11:10:14 +02:00
, git
2022-10-16 23:39:01 +02:00
, python3
2022-07-20 16:39:18 +02:00
}:
2022-10-16 23:39:01 +02:00
python3.pkgs.buildPythonApplication rec {
2022-07-20 16:39:18 +02:00
pname = "dbx";
2022-10-16 23:39:01 +02:00
version = "0.7.6";
format = "setuptools";
2022-07-20 16:39:18 +02:00
src = fetchFromGitHub {
owner = "databrickslabs";
repo = "dbx";
2023-02-27 10:12:58 +01:00
rev = "refs/tags/v${version}";
2022-10-16 23:39:01 +02:00
hash = "sha256-P/cniy0xYaDoUbKdvV7KCubCpmOAhYp3cg2VBRA+a6I=";
2022-07-20 16:39:18 +02:00
};
2022-10-16 23:39:01 +02:00
propagatedBuildInputs = with python3.pkgs; [
aiohttp
click
cookiecutter
cryptography
2022-07-20 16:39:18 +02:00
databricks-cli
2022-10-16 23:39:01 +02:00
jinja2
mlflow
2022-07-20 16:39:18 +02:00
pathspec
pydantic
2022-10-16 23:39:01 +02:00
pyyaml
requests
2022-07-20 16:39:18 +02:00
retry
2022-10-16 23:39:01 +02:00
rich
typer
watchdog
] ++ typer.optional-dependencies.all;
2022-07-20 16:39:18 +02:00
nativeCheckInputs = [
2022-10-16 23:39:01 +02:00
git
] ++ (with python3.pkgs; [
2022-07-20 16:39:18 +02:00
pytest-asyncio
2022-07-31 11:10:14 +02:00
pytest-mock
2022-10-16 23:39:01 +02:00
pytest-timeout
pytestCheckHook
]);
postPatch = ''
substituteInPlace setup.py \
--replace "mlflow-skinny>=1.28.0,<=2.0.0" "mlflow" \
--replace "rich==12.5.1" "rich"
'';
2022-07-20 16:39:18 +02:00
2022-07-31 11:10:14 +02:00
preCheck = ''
2022-10-16 23:39:01 +02:00
export HOME=$(mktemp -d)
export PATH="$PATH:$out/bin"
2022-07-31 11:10:14 +02:00
'';
2022-10-16 23:39:01 +02:00
pytestFlagsArray = [
"tests/unit"
];
2022-07-20 16:39:18 +02:00
disabledTests = [
2022-10-16 23:39:01 +02:00
# Fails because of dbfs CLI wrong call
2022-07-20 16:39:18 +02:00
"test_dbfs_unknown_user"
"test_dbfs_no_root"
2022-10-16 23:39:01 +02:00
# Requires pylint, prospector, pydocstyle
"test_python_basic_sanity_check"
];
pythonImportsCheck = [
"dbx"
2022-07-20 16:39:18 +02:00
];
meta = with lib; {
description = "CLI tool for advanced Databricks jobs management";
2022-10-16 23:39:01 +02:00
homepage = "https://github.com/databrickslabs/dbx";
2023-02-27 10:12:58 +01:00
changelog = "https://github.com/databrickslabs/dbx/blob/v${version}/CHANGELOG.md";
2022-07-20 16:39:18 +02:00
license = licenses.databricks-dbx;
maintainers = with maintainers; [ GuillaumeDesforges ];
};
}