2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
2024-09-19 14:19:46 +00:00
|
|
|
, fetchPypi
|
2022-04-27 09:35:20 +00:00
|
|
|
, python3
|
2024-09-19 14:19:46 +00:00
|
|
|
, stress
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "snakemake";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "8.20.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-adNwIA1z/TwWsa0gQb4hAsUvHInjd30sm1dYKXvvXy8=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs --build tests/
|
2024-09-19 14:19:46 +00:00
|
|
|
substituteInPlace tests/common.py \
|
|
|
|
--replace-fail 'os.environ["PYTHONPATH"] = os.getcwd()' "pass" \
|
|
|
|
--replace-fail 'del os.environ["PYTHONPATH"]' "pass"
|
|
|
|
substituteInPlace snakemake/unit_tests/__init__.py \
|
|
|
|
--replace-fail '"unit_tests/templates"' '"'"$PWD"'/snakemake/unit_tests/templates"'
|
2024-01-13 08:15:51 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2020-04-24 23:36:52 +00:00
|
|
|
appdirs
|
2021-07-24 12:14:16 +00:00
|
|
|
configargparse
|
2021-06-28 23:13:55 +00:00
|
|
|
connection-pool
|
2020-04-24 23:36:52 +00:00
|
|
|
datrie
|
|
|
|
docutils
|
2022-12-17 10:02:37 +00:00
|
|
|
gitpython
|
2023-05-24 13:37:59 +00:00
|
|
|
humanfriendly
|
2024-01-13 08:15:51 +00:00
|
|
|
immutables
|
2021-07-21 07:28:18 +00:00
|
|
|
jinja2
|
2020-04-24 23:36:52 +00:00
|
|
|
jsonschema
|
|
|
|
nbformat
|
|
|
|
psutil
|
2020-11-21 19:51:51 +00:00
|
|
|
pulp
|
2024-09-19 14:19:46 +00:00
|
|
|
pygments
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
2023-05-24 13:37:59 +00:00
|
|
|
reretry
|
2021-05-28 09:39:13 +00:00
|
|
|
smart-open
|
2024-01-13 08:15:51 +00:00
|
|
|
snakemake-interface-executor-plugins
|
|
|
|
snakemake-interface-common
|
|
|
|
snakemake-interface-storage-plugins
|
2024-04-21 15:54:59 +00:00
|
|
|
snakemake-interface-report-plugins
|
2021-06-28 23:13:55 +00:00
|
|
|
stopit
|
|
|
|
tabulate
|
2023-05-24 13:37:59 +00:00
|
|
|
throttler
|
2020-04-24 23:36:52 +00:00
|
|
|
toposort
|
|
|
|
wrapt
|
2022-04-27 09:35:20 +00:00
|
|
|
yte
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
# See
|
|
|
|
# https://github.com/snakemake/snakemake/blob/main/.github/workflows/main.yml#L99
|
2023-05-24 13:37:59 +00:00
|
|
|
# for the current basic test suite. Slurm, Tibanna and Tes require extra
|
2022-02-20 05:27:41 +00:00
|
|
|
# setup.
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2024-01-13 08:15:51 +00:00
|
|
|
numpy
|
2022-02-20 05:27:41 +00:00
|
|
|
pandas
|
|
|
|
pytestCheckHook
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-mock
|
2022-02-20 05:27:41 +00:00
|
|
|
requests-mock
|
2024-01-13 08:15:51 +00:00
|
|
|
snakemake-executor-plugin-cluster-generic
|
2024-09-19 14:19:46 +00:00
|
|
|
snakemake-storage-plugin-fs
|
|
|
|
stress
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/tests.py"
|
|
|
|
"tests/test_expand.py"
|
|
|
|
"tests/test_io.py"
|
|
|
|
"tests/test_schema.py"
|
|
|
|
"tests/test_executor_test_suite.py"
|
|
|
|
"tests/test_api.py"
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# Some will be disabled via https://github.com/snakemake/snakemake/pull/3074
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTests = [
|
2024-09-19 14:19:46 +00:00
|
|
|
# requires graphviz
|
|
|
|
"test_filegraph"
|
|
|
|
# requires s3
|
|
|
|
"test_storage"
|
|
|
|
"test_default_storage"
|
|
|
|
"test_output_file_cache_storage"
|
|
|
|
# requires peppy and eido
|
|
|
|
"test_pep"
|
|
|
|
"test_modules_peppy"
|
|
|
|
# requires perl
|
|
|
|
"test_shadow"
|
|
|
|
# requires snakemake-storage-plugin-http
|
|
|
|
"test_ancient"
|
|
|
|
"test_modules_prefix"
|
|
|
|
# requires snakemake-storage-plugin-s3
|
2024-01-13 08:15:51 +00:00
|
|
|
"test_deploy_sources"
|
2024-09-19 14:19:46 +00:00
|
|
|
# requires modules
|
|
|
|
"test_env_modules"
|
|
|
|
# issue with locating template file
|
|
|
|
"test_generate_unit_tests"
|
|
|
|
# weird
|
|
|
|
"test_strict_mode"
|
|
|
|
"test_issue1256"
|
|
|
|
"test_issue2574"
|
|
|
|
"test_github_issue1384"
|
|
|
|
# future-proofing
|
|
|
|
"conda"
|
|
|
|
"singularity"
|
|
|
|
"apptainer"
|
|
|
|
"container"
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"snakemake"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME="$(mktemp -d)"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-03-20 04:20:00 +00:00
|
|
|
homepage = "https://snakemake.github.io";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "Python-based execution environment for make-like workflows";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "snakemake";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Snakemake is a workflow management system that aims to reduce the complexity of
|
|
|
|
creating workflows by providing a fast and comfortable execution environment,
|
|
|
|
together with a clean and readable specification language in Python style. Snakemake
|
|
|
|
workflows are essentially Python scripts extended by declarative code to define
|
|
|
|
rules. Rules describe how to create output files from input files.
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ helkafen renatoGarcia veprbl ];
|
|
|
|
};
|
|
|
|
}
|