2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
aiohttp,
|
|
|
|
ansicolors,
|
|
|
|
azure-datalake-store,
|
|
|
|
azure-identity,
|
|
|
|
azure-storage-blob,
|
|
|
|
boto3,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
entrypoints,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gcsfs,
|
|
|
|
ipykernel,
|
|
|
|
moto,
|
|
|
|
nbclient,
|
|
|
|
nbformat,
|
|
|
|
pyarrow,
|
|
|
|
pygithub,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
tenacity,
|
|
|
|
tqdm,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "papermill";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.6.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}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-NxC5+hRDdMCl/7ZIho5ml4hdENrgO+wzi87GRPeMv8Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2020-04-24 23:36:52 +00:00
|
|
|
click
|
|
|
|
pyyaml
|
|
|
|
nbformat
|
2020-07-18 16:06:22 +00:00
|
|
|
nbclient
|
2020-04-24 23:36:52 +00:00
|
|
|
tqdm
|
|
|
|
requests
|
|
|
|
entrypoints
|
|
|
|
tenacity
|
2024-05-15 15:35:15 +00:00
|
|
|
ansicolors
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.12") [ aiohttp ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
gcs = [ gcsfs ];
|
|
|
|
github = [ pygithub ];
|
|
|
|
hdfs = [ pyarrow ];
|
|
|
|
s3 = [ boto3 ];
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs =
|
|
|
|
[
|
|
|
|
ipykernel
|
|
|
|
moto
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
]
|
|
|
|
++ passthru.optional-dependencies.azure
|
2024-02-29 20:09:43 +00:00
|
|
|
++ 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
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "papermill" ];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# pytest 8 compat
|
|
|
|
"test_read_with_valid_file_extension"
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-05 15:53:02 +00:00
|
|
|
# might fail due to the sandbox
|
|
|
|
"test_end2end_autosave_slow_notebook"
|
|
|
|
];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
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;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "papermill";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|