2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2024-02-29 20:09:43 +00:00
|
|
|
, stdenv
|
2022-08-21 13:32:41 +00:00
|
|
|
, azure-datalake-store
|
2024-02-29 20:09:43 +00:00
|
|
|
, azure-identity
|
2022-08-21 13:32:41 +00:00
|
|
|
, azure-storage-blob
|
|
|
|
, boto3
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, click
|
2022-08-21 13:32:41 +00:00
|
|
|
, entrypoints
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-21 13:32:41 +00:00
|
|
|
, gcsfs
|
2024-02-29 20:09:43 +00:00
|
|
|
, ipykernel
|
|
|
|
, moto
|
2020-07-18 16:06:22 +00:00
|
|
|
, nbclient
|
2022-08-21 13:32:41 +00:00
|
|
|
, nbformat
|
|
|
|
, pyarrow
|
2023-03-15 16:39:30 +00:00
|
|
|
, pygithub
|
2022-08-21 13:32:41 +00:00
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, pythonRelaxDepsHook
|
2022-08-21 13:32:41 +00:00
|
|
|
, pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, tenacity
|
2022-08-21 13:32:41 +00:00
|
|
|
, tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "papermill";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.5.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nteract";
|
|
|
|
repo = "papermill";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-x6f5hhTdOPDVFiBvRhfrXq1wd5keYiuUshXnT0IkjX0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"aiohttp"
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDepsHook
|
2024-02-29 20:09:43 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
pyyaml
|
|
|
|
nbformat
|
2020-07-18 16:06:22 +00:00
|
|
|
nbclient
|
2020-04-24 23:36:52 +00:00
|
|
|
tqdm
|
|
|
|
requests
|
|
|
|
entrypoints
|
|
|
|
tenacity
|
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
azure = [
|
|
|
|
azure-datalake-store
|
2024-02-29 20:09:43 +00:00
|
|
|
azure-identity
|
2022-08-21 13:32:41 +00:00
|
|
|
azure-storage-blob
|
|
|
|
];
|
|
|
|
gcs = [
|
|
|
|
gcsfs
|
|
|
|
];
|
|
|
|
github = [
|
2023-03-15 16:39:30 +00:00
|
|
|
pygithub
|
2022-08-21 13:32:41 +00:00
|
|
|
];
|
|
|
|
hdfs = [
|
|
|
|
pyarrow
|
|
|
|
];
|
|
|
|
s3 = [
|
|
|
|
boto3
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
ipykernel
|
|
|
|
moto
|
2020-04-24 23:36:52 +00:00
|
|
|
pytest-mock
|
2024-02-29 20:09:43 +00:00
|
|
|
pytestCheckHook
|
|
|
|
] ++ passthru.optional-dependencies.azure
|
|
|
|
++ passthru.optional-dependencies.s3
|
|
|
|
++ passthru.optional-dependencies.gcs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"papermill"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# pytest 8 compat
|
|
|
|
"test_read_with_valid_file_extension"
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2024-02-29 20:09:43 +00:00
|
|
|
# might fail due to the sandbox
|
|
|
|
"test_end2end_autosave_slow_notebook"
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# ImportError: cannot import name 'mock_s3' from 'moto'
|
|
|
|
"papermill/tests/test_s3.py"
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-08-21 13:32:41 +00:00
|
|
|
description = "Parametrize and run Jupyter and interact with notebooks";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/nteract/papermill";
|
|
|
|
license = licenses.bsd3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "papermill";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|