snakemake-executor-plugin-aws-batch-flex 0.1.1__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/.gitignore +1 -0
  2. snakemake_executor_plugin_aws_batch_flex-0.2.0/.release-please-manifest.json +3 -0
  3. snakemake_executor_plugin_aws_batch_flex-0.2.0/CHANGELOG.md +116 -0
  4. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/PKG-INFO +2 -1
  5. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/docs/further.md +3 -2
  6. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/docs/guide.md +77 -13
  7. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/docs/reference.md +6 -4
  8. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/run.sh +23 -2
  9. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/conformance/secrets.smk +18 -0
  10. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/README.md +53 -0
  11. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/run.sh +133 -0
  12. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/tutorial/Snakefile +85 -0
  13. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/tutorial/config.yaml +6 -0
  14. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/tutorial/envs/calling.yaml +5 -0
  15. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/tutorial/envs/mapping.yaml +6 -0
  16. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/tutorial/envs/plot.yaml +7 -0
  17. snakemake_executor_plugin_aws_batch_flex-0.2.0/examples/pipelines/tutorial/scripts/plot-quals.py +10 -0
  18. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/pyproject.toml +3 -2
  19. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/bootstrap.py +87 -4
  20. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/bundle.py +42 -7
  21. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/condacache.py +4 -2
  22. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/executor.py +107 -5
  23. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/hints.py +17 -0
  24. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/hostenv.py +9 -6
  25. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/jobdefs.py +7 -2
  26. snakemake_executor_plugin_aws_batch_flex-0.2.0/src/snakemake_executor_plugin_aws_batch_flex/jobfixes.py +204 -0
  27. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/jobmonitor.py +2 -0
  28. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/patches.py +28 -10
  29. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/remote.py +15 -7
  30. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/settings.py +36 -1
  31. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/sources.py +45 -6
  32. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/transfer.py +7 -1
  33. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/usage.py +13 -2
  34. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/fargate.tf +27 -4
  35. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/outputs.tf +2 -1
  36. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/variables.tf +6 -0
  37. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/fakeaws/sitecustomize.py +11 -1
  38. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_conda_mount.py +2 -0
  39. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_condacache.py +1 -0
  40. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_integration.py +181 -3
  41. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_prereqs.py +19 -0
  42. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_script_python.py +33 -3
  43. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_smkflex.py +62 -0
  44. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_units.py +195 -1
  45. snakemake_executor_plugin_aws_batch_flex-0.1.1/.release-please-manifest.json +0 -3
  46. snakemake_executor_plugin_aws_batch_flex-0.1.1/CHANGELOG.md +0 -71
  47. snakemake_executor_plugin_aws_batch_flex-0.1.1/src/snakemake_executor_plugin_aws_batch_flex/jobfixes.py +0 -65
  48. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/.github/workflows/release.yml +0 -0
  49. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/.github/workflows/tests.yml +0 -0
  50. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/LICENSE +0 -0
  51. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/README.md +0 -0
  52. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/docs/intro.md +0 -0
  53. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/docs/setup.md +0 -0
  54. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/environment.yml +0 -0
  55. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/auto.smk +0 -0
  56. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/benchmark.smk +0 -0
  57. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/checkpoint.smk +0 -0
  58. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/conda.smk +0 -0
  59. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/conda_named.smk +0 -0
  60. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/config/pdsheet.tsv +0 -0
  61. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/directory.smk +0 -0
  62. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/disk.smk +0 -0
  63. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/ecr.smk +0 -0
  64. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/entrypoint.smk +0 -0
  65. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/envs/tiny.yaml +0 -0
  66. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/fanout.smk +0 -0
  67. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/fargate.smk +0 -0
  68. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/find-profile.sh +0 -0
  69. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/group.smk +0 -0
  70. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/mixed.smk +0 -0
  71. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/oom.smk +0 -0
  72. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/orphan-test.sh +0 -0
  73. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/orphans.smk +0 -0
  74. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/pdsheet.smk +0 -0
  75. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/pipeline.smk +0 -0
  76. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/pyimage.smk +0 -0
  77. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/pyrule.smk +0 -0
  78. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/retries.smk +0 -0
  79. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/rscript.smk +0 -0
  80. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/script.smk +0 -0
  81. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/scripts/pandas_script.py +0 -0
  82. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/scripts/py_script.py +0 -0
  83. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/scripts/r_script.R +0 -0
  84. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/scripts/sh_script.sh +0 -0
  85. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/scripts/which_python.py +0 -0
  86. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/shadow.smk +0 -0
  87. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/shm.smk +0 -0
  88. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/tempdir.smk +0 -0
  89. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/conformance/wrapper.smk +0 -0
  90. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/smoke-test/README.md +0 -0
  91. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/examples/smoke-test/Snakefile +0 -0
  92. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/release-please-config.json +0 -0
  93. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/scripts/bake-ami.sh +0 -0
  94. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/scripts/cleanup-ami.sh +0 -0
  95. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/scripts/cleanup-jobdefs.sh +0 -0
  96. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/scripts/setup.sh +0 -0
  97. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/scripts/update-ami.sh +0 -0
  98. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/__init__.py +0 -0
  99. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/check.py +0 -0
  100. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/headjob.py +0 -0
  101. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/imageinfo.py +0 -0
  102. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/naming.py +0 -0
  103. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/orphans.py +0 -0
  104. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/preflight.py +0 -0
  105. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/profiles.py +0 -0
  106. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/sizing.py +0 -0
  107. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/src/snakemake_executor_plugin_aws_batch_flex/tags.py +0 -0
  108. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/.terraform.lock.hcl +0 -0
  109. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/README.md +0 -0
  110. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/main.tf +0 -0
  111. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/spot.tf +0 -0
  112. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/terraform.tfvars.example +0 -0
  113. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/userdata.snakemake.txt +0 -0
  114. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/terraform/versions.tf +0 -0
  115. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/conftest.py +0 -0
  116. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/fixtures/existing_userdata.txt +0 -0
  117. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_bake_script.py +0 -0
  118. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_cleanup_ami.py +0 -0
  119. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_cleanup_jobdefs.py +0 -0
  120. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_conformance.py +0 -0
  121. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_host_env.py +0 -0
  122. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_imageinfo.py +0 -0
  123. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_setup.py +0 -0
  124. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_tags.py +0 -0
  125. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.0}/tests/test_userdata.py +0 -0
@@ -21,3 +21,4 @@ __pycache__/
21
21
  dist/
22
22
  build/
23
23
  .pytest_cache/
24
+ examples/pipelines/results.tsv
@@ -0,0 +1,116 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/compare/v0.1.1...v0.2.0) (2026-10-31)
4
+
5
+
6
+ ### Features
7
+
8
+ * aws-batch-flex-secrets gives jobs secrets without sending their values ([21a72f6](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/21a72f600fbd16d6542d74445361f4019432ed07))
9
+ * jobs keep storage files at their plain paths, as on a shared filesystem ([28d950d](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/28d950d95a61b0e0336b48fe5325f2047d0ef0d8))
10
+ * jobs run at the same path as Snakemake, so os.path.abspath() agrees ([cd003bd](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/cd003bd1ae8512e36bb5ac9ddcee981c8d09e8c0))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * a failed group job shows why, which Snakemake's report of it leaves out ([2a7444d](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/2a7444d7e6fb2dc42df4fa898feb1617378d3381))
16
+ * a failed job also shows a Python traceback from earlier in its log file ([588f572](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/588f572915b9e36753eb6ed50850bee50543c14d))
17
+ * a failed job shows the end of its rule's log files, and why an index is missing ([5fc4dc2](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/5fc4dc2e2bf860fdfd4f6b4f0cbcfa39458723f1))
18
+ * a failed job's directory output on S3 no longer stops the run ([b8385c7](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/b8385c71d5d6c1eb2811d658ce8063e14d71bb78))
19
+ * a file git tracks but that was deleted here no longer stops the run ([f36e9bd](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/f36e9bded626173e429d10fd571e7c023eed9df9))
20
+ * a script that fails on pandas 3 data in a pandas 2 environment says why and what to do ([31cb5d0](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/31cb5d07e563ce3677183735056935f0c83ec53f))
21
+ * a script whose params are pandas objects runs where it can load them ([1651cf1](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/1651cf1519182abd1bb7381aae6aff298c807a3f))
22
+ * clearer failures and safer transfers found in a review ([e3ba7a5](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/e3ba7a55a698b9feadcbbae5fbd58086a3624856))
23
+ * conda environments are solved with strict channel priority in every job ([cc599f7](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/cc599f7b782a97e95af1fc20a2212f700fd09846))
24
+ * files the config names reach the jobs, even when git-ignored ([452d0ec](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/452d0ec02ea76e8a3c48794702b3dd5c1df7a8fe))
25
+ * jobs whose image has no curl or wget use the AMI's, as they do for git ([f184897](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/f184897ed64f113560b7ad95eba7d24e79218523))
26
+ * pandas 3 text arrays reach scripts as numpy arrays with earlier Snakemake 9 too ([ea96583](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/ea96583e4b12edd58d6d869d37515f41bdce28ba))
27
+ * pandas 3 text arrays reach scripts as numpy arrays, as pandas 2's did ([0d25fcf](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/0d25fcf386e1415cca156c3cadec752f835f17a7))
28
+ * smkflex init no longer keeps resources/ from the jobs ([893da48](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/893da48aaf130064fbfc4d8e2ce8ecd058239613))
29
+ * smkflex run --max-bundle-mb counts MB, as max-sources-mb does ([844a001](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/844a001dfeb56391734a5e410844fba684d5f580))
30
+ * smkflex run unpacks the workflow at the project's own path, so abspath agrees ([f015c2c](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/f015c2cc9eb12b8d3a3e0a9b221a38946b1db58f))
31
+ * stop before submitting when the workflow links to files outside its folder ([9c3fa53](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/9c3fa53d9e90c98f391ba9b24232fe7ab655b042))
32
+ * the setup's default image for rules without a container has curl, wget and git ([85b73f7](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/85b73f729d21d34ace3d3d78dad5cb017dfad2a0))
33
+ * the usage table suggests set-resources only for rules, not group jobs ([2cd816d](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/2cd816de2fd39277b24641522d0943cd3b08a895))
34
+ * workflow folder size limits count MiB, as ls -lh and du -sh show sizes ([9b10513](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/9b10513b9e88291692953b712393bef3e68340e0))
35
+
36
+
37
+ ### Performance Improvements
38
+
39
+ * directory() outputs on S3 move 32 files at a time, not one by one ([3bd2513](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/3bd25136cda3dafd11d6eb00d25d63e07791dc97))
40
+
41
+
42
+ ### Documentation
43
+
44
+ * aws-batch-flex-secrets tested on AWS (EC2) ([7da69e7](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/7da69e7e3d9fe206734761f3be1e4c8c18f82130))
45
+ * jobs build conda envs with strict channel priority ([098c4e9](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/098c4e9e9a70649731e1839821082fa23b3150d9))
46
+ * which python a script: rule gets when its params are pandas objects ([c02248f](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/c02248f21758e3ed821567944a72fd1a93e814c5))
47
+
48
+ ## [0.1.1](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/compare/v0.1.0...v0.1.1) (2026-10-29)
49
+
50
+
51
+ ### Bug Fixes
52
+
53
+ * big runs read peak memory from jobs across the whole run, not only the last ones ([147a054](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/147a054053c7e7dbfee38029c95d9fa92dd44f00))
54
+ * cancelling a run stops every job, also those Snakemake is checking on ([9edb388](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/9edb3880575bb8d3c4fb2aceb469f7a120bfb3a4))
55
+ * non-root images without curl get uv from their own conda at job start ([374cc30](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/374cc303e6d1d42b17255dc36fe05c76ec84beff))
56
+ * smkflex push gives the .gitignore note only when it uploaded, and no rate for tiny transfers ([6be28ad](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/6be28ad2efe30a30f13c4c9bd077969f573024fb))
57
+
58
+ ## 0.1.0 (2026-10-28)
59
+
60
+ First release. Needs Snakemake 9 (9.5 or newer) and Python 3.11 to 3.13. Tested on Linux; macOS
61
+ should work, and on Windows use WSL.
62
+
63
+ ### Features
64
+
65
+ * run each rule as an AWS Batch job in the image from its `container:` directive, without
66
+ Snakemake or Python in the image
67
+ * Snakemake from a machine image (AMI) mounted read-only into EC2 jobs, or installed when the job
68
+ starts (Fargate, or without the AMI)
69
+ * mix EC2, Spot and Fargate queues in one run (`batch_queue` per rule); the platform is detected
70
+ per queue
71
+ * per-rule `threads`, `mem_mb`, `runtime`, `gpu`, `/dev/shm` size (`batch_shm_mb`), Fargate disk
72
+ (`disk_mb`), tags, Spot retries, fair-share priority and existing job definitions
73
+ * images with an `ENTRYPOINT` (`["python3"]`, tini, entrypoint scripts): it's read from the image's
74
+ registry and the job's command is made to suit it, as Batch can't change it (`batch_entrypoint`
75
+ if the registry can't be read)
76
+ * Python `script:` rules run in the image's own Python (3.10 or newer)
77
+ * conda environments and wrappers in images without conda, with built environments reused per
78
+ machine and optionally kept in S3 (`conda-cache`)
79
+ * retry jobs that ran out of memory with more memory (`oom-memory-factor`)
80
+ * failed jobs show the end of their log, with hints for known causes (out of memory, full disk,
81
+ missing package or storage plugin, S3 permissions, an image `ENTRYPOINT` in the way)
82
+ * startup checks of the queue, compute environments and roles; jobs left over from an
83
+ interrupted run are cancelled
84
+ * end-of-run table of what each rule used (vCPU- and GiB-hours); costs come from AWS Billing, by
85
+ the tags `snakemake-run-id` and `snakemake-rule` that every job carries
86
+ * peak memory, busy vCPUs and disk use per rule, with `set-resources:` and `set-threads:`
87
+ suggestions to paste
88
+ * every job gets the whole workflow folder (what git tracks, or all that `.gitignore` doesn't
89
+ exclude, and `config/`), so scripts that `shell:` runs, imported modules and sample sheets
90
+ reach it without git; `data/`, `results/`, `logs/` and `benchmarks/` stay behind, and more than
91
+ 100 MB (`max-sources-mb`) stops the run at the start
92
+ * the same Snakemake and package versions in every job, pinned to the AMI's or the local ones
93
+ * a missing input says that jobs read inputs from the bucket, and the `smkflex push` that uploads it
94
+ * runs that can't work stop at the start: a `workdir:` directive, a job command too long for ECS
95
+ * `script:` rules and pandas work in images that bring their own conda libraries (bioconda's)
96
+ * jobs can't use the instances' credentials, and the launcher policy can't register privileged
97
+ job definitions
98
+ * `smkflex run`: run Snakemake itself on AWS in a head job, from the current folder or a git
99
+ repository (`--git`, `--rev`, `--path`, `--add`), with `.snakemake` state (also with
100
+ `--persistence-backend db`) kept between runs and saved while it runs; one run per project
101
+ * `smkflex logs`, `status` and `cancel` for those runs
102
+ * `smkflex init`, `push` and `pull`: a project folder in the bucket, uploading inputs and
103
+ downloading results at the paths Snakemake uses
104
+ * `smkflex check`: checks the whole setup and says what to fix
105
+ * `scripts/setup.sh`: one-command setup of the AMI, queue, compute environment, roles, bucket,
106
+ log group and `smkflex` profile, with optional Spot and Fargate queues
107
+ * `scripts/update-ami.sh`, `cleanup-ami.sh` and `cleanup-jobdefs.sh` to update the AMI and remove
108
+ the plugin's old images and job definitions
109
+ * Terraform setup with 30-day job logs, optional expiry of old files in the bucket, and an IAM
110
+ policy for people who only run pipelines that can't stop or change other Batch work
111
+ * private images: ECR through the IAM roles, other registries through Secrets Manager
112
+
113
+ ### Documentation
114
+
115
+ * README with a step-by-step setup from an empty AWS account to a finished test run
116
+ * guide, reference and setup pages in `docs/`, and runnable tests on AWS in `examples/conformance/`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: snakemake-executor-plugin-aws-batch-flex
3
- Version: 0.1.1
3
+ Version: 0.2.0
4
4
  Summary: Snakemake executor plugin for AWS Batch that runs every rule in its own container image
5
5
  Project-URL: Homepage, https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex
6
6
  Project-URL: Documentation, https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex#getting-started
@@ -23,6 +23,7 @@ Requires-Dist: snakemake-interface-common<2,>=1.17.4
23
23
  Requires-Dist: snakemake-interface-executor-plugins<10,>=9.3.2
24
24
  Requires-Dist: snakemake-interface-storage-plugins<5,>=4.0.0
25
25
  Provides-Extra: test
26
+ Requires-Dist: pandas; extra == 'test'
26
27
  Requires-Dist: pytest; extra == 'test'
27
28
  Requires-Dist: pytest-xdist; extra == 'test'
28
29
  Requires-Dist: ruff; extra == 'test'
@@ -21,7 +21,7 @@ aws-batch-flex-queue: my-queue
21
21
  aws-batch-flex-region: eu-west-1
22
22
  aws-batch-flex-job-role-arn: arn:aws:iam::123456789012:role/snakemake-job
23
23
  aws-batch-flex-bootstrap: host
24
- aws-batch-flex-default-image: debian:12
24
+ aws-batch-flex-default-image: buildpack-deps:bookworm-scm
25
25
  jobs: 100
26
26
  ```
27
27
 
@@ -53,7 +53,8 @@ rule align:
53
53
  - `batch_tags` adds tags to that rule's jobs; every job is also tagged with the run, workflow,
54
54
  rule and job ID.
55
55
  - Python `script:` rules run with the image's own Python (3.10 or newer), so they can use its
56
- packages; `batch_script_python="host"` uses Snakemake's instead.
56
+ packages, unless their pandas/numpy/polars `params` need packages it lacks;
57
+ `batch_script_python="host"` always uses Snakemake's instead.
57
58
  - `conda:` and `wrapper:` work with `--sdm conda` (conda from the image, or baked into the AMI).
58
59
  Built envs are reused instead of built in every job: by the jobs on the same EC2 machine, or
59
60
  from the bucket for later jobs and runs (`aws-batch-flex-conda-cache`).
@@ -59,13 +59,15 @@ out of memory once.
59
59
  - **A pipeline's own tests** (`.test/` in its repository) are run with `--directory .test`. That
60
60
  doesn't work with remote storage, because Snakemake only sends the jobs the code inside the
61
61
  folder it starts in. Copy the test config into `config/` instead.
62
- - **git:** Snakemake keeps a git clone of a pipeline loaded from GitHub, so `git` has to be
63
- wherever the Snakefile is read: on your machine, in the `smkflex` head job (its image has it),
64
- and in every job. On EC2, jobs whose image has no git use the one in the machine image (made
65
- with conda, so images built before this need `scripts/update-ami.sh`); on Fargate, the rules'
66
- images need their own.
67
- - **Private pipeline repositories** need `GITHUB_TOKEN` set where Snakemake runs and in the jobs
68
- (`--envvars GITHUB_TOKEN`).
62
+ - **git, curl, wget:** Snakemake keeps a git clone of a pipeline loaded from GitHub, so `git` has
63
+ to be wherever the Snakefile is read: on your machine, in the `smkflex` head job (its image has
64
+ it), and in every job. Wrappers and scripts also call `curl` or `wget` without listing them
65
+ (they're on every workstation). On EC2, jobs whose image has none of these use the machine
66
+ image's (made with conda, after the image's own on the PATH; images built before this need
67
+ `scripts/update-ami.sh`); on Fargate, the rules' images need their own.
68
+ - **Private pipeline repositories** need `GITHUB_TOKEN` set where Snakemake runs and in the jobs.
69
+ Give it to the jobs with `aws-batch-flex-secrets`, not `--envvars`, which sends it as plain
70
+ text (see [Secrets](#secrets)).
69
71
 
70
72
  `smkflex run --git URL --add config/` does the same without `snakedeploy`: the code comes from a
71
73
  clone of the repository and your `config/` is laid over it (see [Long runs](#long-runs-smkflex)).
@@ -145,9 +147,25 @@ runs everything on your machine need a change:
145
147
  a rule that has the file as its input (a `localrules:` rule if it should run on your machine):
146
148
  Snakemake then fetches it. Or download the results after the run: `smkflex pull results`.
147
149
  - **Jobs get the workflow folder,** except `data/`, `results/`, `logs/`, `benchmarks/`, what
148
- `.gitignore` excludes (but `config/` always goes), files over 10 MB and anything outside the
149
- folder. A file a rule reads that isn't one of its inputs has to be in there (see
150
+ `.gitignore` excludes, files over 10 MB and anything outside the folder. `config/` always goes,
151
+ and so does any file under 10 MB that a config value names (a sample sheet in `data/`, a gene
152
+ list the pipeline's `.gitignore` excludes), as scripts often open those by path. A file a rule reads that isn't one of its inputs has to be in there (see
150
153
  [Troubleshooting](#troubleshooting)).
154
+ - **A job only gets the inputs its rule names.** Files a tool finds next to an input locally,
155
+ such as a genome's index (`genome.fa.bwt`, `genome.fa.fai`, `genome.dict`) or a BAM's `.bai`,
156
+ aren't fetched unless the rule lists them: `input: multiext("genome.fa", ".amb", ".ann",
157
+ ".bwt", ".pac", ".sa")` for bwa, or `bai="x.bam.bai"`. The failed job's error says so when the
158
+ tool's message is a known one.
159
+ - **Jobs see files at the same paths as on your machine,** as on a cluster's shared filesystem:
160
+ a job works in a folder at the same path as Snakemake, and keeps its copies of the bucket's
161
+ files at their plain paths (`results/x.bam` there, an absolute `/data/x` at `/data/x`), not
162
+ under `.snakemake/storage/`. So a tool finds an input however the Snakefile passes it: `{input}`,
163
+ a param (`--genomeDir {params.index}`), or a path made with `os.path.abspath()`. Inputs named
164
+ by an absolute path are uploaded by it: `smkflex push $PWD/input_files`. `smkflex run` unpacks
165
+ the workflow at the same path as your project folder too (not with `--git`, which clones into a
166
+ temporary folder), so such paths agree in its head job. Where the image doesn't
167
+ allow that folder (it runs as a non-root user, or already has files there), the job works under
168
+ `/tmp` and such pipelines fail as they would with any cloud executor.
151
169
  - **No `workdir:`.** The jobs need the Snakefile inside the folder Snakemake works in, so the run
152
170
  stops at the start and says so. Outputs go under the storage prefix anyway: remove it.
153
171
  - **`threads: workflow.cores`** needs `--cores N`, as on a cluster (Snakemake asks for it). Each
@@ -235,7 +253,9 @@ different instances. Each job's log records the exact image it ran
235
253
  (`[snakemake-batch] image ... id=sha256:...`).
236
254
 
237
255
  **Python `script:` rules** run with the image's own `python` if it's 3.10 or newer, so they can
238
- use the image's packages. Otherwise (no Python in the image, or an older one) and for `run:`
256
+ use the image's packages, unless the rule's `params` are pandas, numpy or polars objects that
257
+ the image's Python can't import: the script then runs in Snakemake's Python, as it would on your
258
+ machine (the job's log says so). Otherwise (no Python in the image, or an older one) and for `run:`
239
259
  blocks, the code runs in Snakemake's own Python from the machine image, which only has
240
260
  Snakemake's packages; call such scripts from `shell:` instead, or add their packages to the
241
261
  image as below. `batch_script_python="host"` on a rule (or `aws-batch-flex-script-python: host`
@@ -259,6 +279,12 @@ job's PATH, so an image's own conda still wins. The machine you run `snakemake`
259
279
  on its PATH as well. Wrappers work the same way; the plugin passes jobs an HTTPS
260
280
  `--wrapper-prefix`, so images don't need git.
261
281
 
282
+ Jobs build envs with strict channel priority (`CONDA_CHANNEL_PRIORITY=strict`), which bioconda
283
+ requires. Miniforge is set up that way, but an image's own conda often isn't, and then mixes
284
+ packages from different channels that don't load together. If an env solves differently on AWS
285
+ than on your machine, check `conda config --show channel_priority` here: with `flexible` or
286
+ `disabled`, your machine can pick packages that strict priority won't.
287
+
262
288
  Each job builds the envs its rule needs, which takes a minute or more per env. So that this
263
289
  happens once rather than in every job, built envs are reused (`aws-batch-flex-conda-cache`):
264
290
 
@@ -401,6 +427,31 @@ aws-batch-flex-execution-role-arn: arn:aws:iam::123456789012:role/my-exec-role
401
427
  Only images from that registry get the credentials. ECS reads the secret with the execution role,
402
428
  so it's needed on EC2 too, and it needs `secretsmanager:GetSecretValue` on the secret.
403
429
 
430
+ ### Secrets
431
+
432
+ Environment variables from `envvars:` or `--envvars` go to every job as plain text: anyone who
433
+ can see the account's Batch jobs (the console, `aws batch describe-jobs`) or CloudTrail can read
434
+ them. The plugin warns at start when one looks like a secret (`..._TOKEN`, `..._KEY`, `PASSWORD`).
435
+
436
+ For a token or password, store it as an SSM parameter (SecureString, free) or a Secrets Manager
437
+ secret, named under `smkflex/`, and map the variable to it in the profile:
438
+
439
+ ```bash
440
+ aws ssm put-parameter --name /smkflex/github-token --type SecureString --value "$GITHUB_TOKEN"
441
+ ```
442
+
443
+ ```yaml
444
+ aws-batch-flex-secrets: [GITHUB_TOKEN=arn:aws:ssm:eu-west-1:123456789012:parameter/smkflex/github-token]
445
+ aws-batch-flex-execution-role-arn: arn:aws:iam::123456789012:role/... # Terraform prints it
446
+ ```
447
+
448
+ Only the ARN reaches Batch: ECS reads the value with the execution role when each job starts.
449
+ Set `enable_secrets = true` in `terraform.tfvars` to have Terraform make that role (on EC2 too)
450
+ and allow it to read parameters and secrets named `smkflex/...` (`<name>/...`), and nothing else.
451
+ The `smkflex run` head job gets them too. If the Snakefile declares the variable (`envvars:`),
452
+ Snakemake still wants it set where you start it; the plugin sends the jobs only the ARN. A job
453
+ definition of your own (`aws-batch-flex-job-definition`) doesn't get them: set its `secrets`.
454
+
404
455
  ## Troubleshooting
405
456
 
406
457
  - **Not sure what's wrong?** Run `smkflex check --profile smkflex` in your workflow folder. It
@@ -418,18 +469,31 @@ so it's needed on EC2 too, and it needs `secretsmanager:GetSecretValue` on the s
418
469
  and `benchmarks/` never go along (jobs read and write those in storage), nor do single files
419
470
  over 10 MB or anything outside the folder. So check whether the file is git-ignored,
420
471
  big, or outside the folder. Data the workflow reads belongs in its inputs, in storage.
472
+ - **"links to files outside the workflow folder".** Jobs get the folder's links as links, so a
473
+ sample sheet linked in from elsewhere would point at nothing there; the run stops before
474
+ submitting anything. Copy the file in instead (`cp --remove-destination "$(readlink -f F)" F`).
475
+ A relative link to a file inside the folder is fine, and `smkflex run` sends links' content.
421
476
  - **"Missing input files … (in storage)".** Jobs read their inputs from storage, not from your
422
477
  machine, so input data has to be uploaded once: `smkflex push data` (absolute paths too, e.g.
423
478
  `smkflex push /shared/refs`). When the file is on this machine, the message says so and gives
424
479
  the command.
425
- - **"Every job gets the workflow folder, and it has … MB".** Data sitting in the folder would
426
- go to every job: add its folders to `.gitignore` (`smkflex init` adds `resources/`), or raise
427
- `aws-batch-flex-max-sources-mb`.
480
+ - **"Every job gets the workflow folder, and it has … MiB".** Data sitting in the folder would
481
+ go to every job: add its folders to `.gitignore` (and upload what the rules read as inputs
482
+ with `smkflex push`), or raise `aws-batch-flex-max-sources-mb`. `resources/` goes along unless
483
+ you add it: pipelines keep small files there that their scripts read directly.
428
484
  - **A job fails.** Snakemake prints the end of the job's log, and for causes the plugin recognises
429
485
  (out of memory, a full disk, a missing package or storage plugin, S3 permissions) a hint on what
430
486
  to do. Full logs are in the AWS console under **CloudWatch** > **Log groups** >
431
487
  `/aws/batch/smkflex` (`/aws/batch/` plus the `name` from `terraform.tfvars`; `/aws/batch/job`
432
488
  without the Terraform setup); the rule's own `log:` files are in the bucket (`smkflex pull logs`).
489
+ - **Where a job's error is.** The plugin shows the end of the job's own output and of the rule's
490
+ `log:` files (most tools write their errors there, with `2> {log}`), fetched from the bucket.
491
+ - **A script fails at once with "StringDtype.__init__() takes from 1 to 2 positional arguments".**
492
+ Snakemake runs with pandas 3 and the rule's environment (or wrapper) has pandas 2, which can't
493
+ load a pandas 3 object in the rule's `params`. The plugin hands pandas arrays (a text column's
494
+ `.values`) to scripts as numpy arrays, as pandas 2 gave them, but not a pandas `Index` or pandas
495
+ objects inside a list or dict. Give the rule's environment pandas 3 (for a wrapper, a newer
496
+ wrapper version), or pass plain lists in `params` (`.tolist()`).
433
497
  - **A job fails with "403" or "Forbidden" from S3.** Jobs use the job role, not your login, and
434
498
  the Terraform setup only lets it use `s3://BUCKET/snakemake/`. Keep the project's folder inside
435
499
  it (which `smkflex init` does).
@@ -35,7 +35,7 @@ grouped below; most people never need more than the first group. In the tables,
35
35
  | `job-role-arn` | *the instances' own role (EC2)* | The IAM role jobs run as. It needs to read and write the S3 bucket. |
36
36
  | `execution-role-arn` | *none* | The IAM role Batch uses to start a job: to pull its image and send its logs. Needed for Fargate queues and private registries. |
37
37
  | `head-role-arn` | *none* | The IAM role of the head job, the Batch job in which `smkflex run` runs Snakemake (see [Long runs](guide.md#long-runs-smkflex)). Only `smkflex` uses it. |
38
- | `default-image` | *none* | The image for rules that have no `container:`. |
38
+ | `default-image` | *none* | The image for rules that have no `container:`. The setup writes `buildpack-deps:bookworm-scm` (Debian 12 with curl, wget and git, as a workstation has them): pipelines often call such tools, or a wrapper does, without a container or conda package for them. |
39
39
  | `tags` | *none* | Extra `KEY=VALUE` tags on every job, e.g. `[project=rnaseq, team=genomics]`, for example to see costs by project. |
40
40
 
41
41
  **How jobs get Snakemake**
@@ -52,7 +52,7 @@ from the machine image (`host`); otherwise it's installed when each job starts,
52
52
  | `extra-packages` | *none* | Extra pip packages to install along with Snakemake when a job starts (e.g. `[pandas]`, or other Snakemake plugins). |
53
53
  | `python-version` | *the one you run Snakemake with* | The Python version to install Snakemake with when a job starts. |
54
54
  | `install-prereqs` | `false` | When installing at start, for images that have none of `curl`, `wget` or `pip`: get uv with the image's conda, mamba or micromamba (any user), or else install `curl` with its package manager (images that run as root). |
55
- | `script-python` | `image` | Which Python runs Python `script:` rules. `image`: the image's own, if it's 3.10 or newer, so the script can use the image's packages. `host`: always Snakemake's own. |
55
+ | `script-python` | `image` | Which Python runs Python `script:` rules. `image`: the image's own, if it's 3.10 or newer, so the script can use the image's packages (but Snakemake's when the rule's pandas, numpy or polars `params` can't be loaded with it). `host`: always Snakemake's own. |
56
56
 
57
57
  **Memory, disk and Spot**
58
58
 
@@ -77,7 +77,7 @@ from the machine image (`host`); otherwise it's installed when each job starts,
77
77
  |---|---|---|
78
78
  | `log-group` | `/aws/batch/job` | The CloudWatch log group for job logs. It must already exist. Terraform creates one that deletes logs after 30 days and puts it in the profile; Batch's default group keeps them forever. |
79
79
  | `no-usage-summary` | `false` | Don't print the table of what the run used at the end (see [What a run used](guide.md#what-a-run-used)). |
80
- | `max-sources-mb` | `100` | Every job gets the workflow folder (what git would track, or everything `.gitignore` doesn't exclude, plus `config/`; never `data/`, `results/`, `logs/` or `benchmarks/`, and no single file over 10 MB). Above this many MB the run stops with a message saying which folders to put in `.gitignore`: data belongs in storage. |
80
+ | `max-sources-mb` | `100` | Every job gets the workflow folder (what git would track, or everything `.gitignore` doesn't exclude, plus `config/`; never `data/`, `results/`, `logs/` or `benchmarks/`, and no single file over 10 MB). Above this many MiB (as `du -sh` shows sizes) the run stops with a message saying which folders to put in `.gitignore`: data belongs in storage. |
81
81
  | `runnable-warn-minutes` | `15` | Warn when a job has waited this long for a machine to run on. |
82
82
  | `skip-preflight` | `false` | Skip the checks of the queue and roles at the start of a run. |
83
83
  | `orphan-jobs` | `cancel` | What to do with jobs still running from an earlier run that was killed: `cancel`, `warn` or `ignore` (see [Interrupted runs](guide.md#interrupted-runs)). |
@@ -91,6 +91,7 @@ from the machine image (`host`); otherwise it's installed when each job starts,
91
91
  | `volumes` | *none* | Folders on the EC2 machine to make available in every job, as `MACHINE_PATH:JOB_PATH`, with `:ro` for read-only, e.g. `[/data/refs:/refs:ro]`. |
92
92
  | `scheduling-priority` | *none* | Priority for every job (0-9999), for queues with a fair-share scheduling policy. Other queues ignore it, with a warning. |
93
93
  | `registry-credentials` | *none* | `REGISTRY=SECRET_ARN` for private registries outside AWS (see [Private images](guide.md#private-images)). |
94
+ | `secrets` | *none* | `NAME=ARN` of an SSM parameter or Secrets Manager secret: environment variables jobs get without the value passing through Batch (see [Secrets](guide.md#secrets)). Needs `execution-role-arn`. |
94
95
  | `job-definition` | *none* | Use an existing Batch job definition (name, `name:revision` or ARN) instead of the ones the plugin makes, e.g. where you aren't allowed to make them. It decides the image, job role, mounted folders and `/dev/shm`; vCPUs, memory, timeout and tags still come from the rules. If it doesn't mount the machine image's Snakemake, jobs install it when they start. |
95
96
  | `job-definition-prefix` | `snakemake` | How the job definitions the plugin makes are named. |
96
97
 
@@ -148,7 +149,8 @@ more, the whole setup with `scripts/setup.sh` (twice, as a second, separate setu
148
149
  account; with conda and pandas in the image, and `smkflex init`/`push`/`pull`), the published
149
150
  rna-seq-star-deseq2 pipeline on its test data (with `snakemake`, as a `smkflex` head job, and set
150
151
  up with `snakedeploy`), and the conda env cache on it (per machine: 12 builds instead of 52, 11
151
- instead of 18-21 minutes; from S3 on a second run: no builds, 7.5 minutes).
152
+ instead of 18-21 minutes; from S3 on a second run: no builds, 7.5 minutes), and a job
153
+ reading an SSM parameter through `aws-batch-flex-secrets` on EC2 (`run.sh secrets`).
152
154
 
153
155
  Only tested against a fake Batch: private registry
154
156
  credentials (outside AWS), `--aws-batch-flex-volumes`, a single Ctrl-C, a Spot instance being
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
  # Real-AWS conformance run, from this directory, with the profile setup.sh installed (or
3
- # profile/config.yaml here, see find-profile.sh). Usage: bash run.sh [script|fanout|conda|pipeline|pyimage|pyrule|pdsheet|entrypoint|shm|existing|ecr|rscript|wrapper|mixed|disk|spot|oom|rules ...] (default: script fanout)
3
+ # profile/config.yaml here, see find-profile.sh). Usage: bash run.sh [script|fanout|conda|pipeline|pyimage|pyrule|pdsheet|entrypoint|shm|existing|ecr|rscript|wrapper|mixed|disk|spot|oom|secrets|rules ...] (default: script fanout)
4
4
  # `mixed` = EC2 + Fargate queues in one run, `disk` = Fargate disk size from disk_mb
5
5
  # (both need enable_fargate=true in terraform), `spot` = fanout on the Spot queue (enable_spot_queue=true)
6
+ # `secrets` = a job gets an SSM parameter through aws-batch-flex-secrets (enable_secrets=true)
6
7
  # `rules` = checkpoint group shadow benchmark retries tempdir directory (one small workflow each)
7
8
  set -u
8
9
  . ./find-profile.sh
@@ -45,6 +46,8 @@ run() { # name, snakemake args...
45
46
  disk) check disk results/disk/check.txt "^disk ok";;
46
47
  oom) check oom results/oom/out.txt "^ok" && grep -q "ran out of memory with .* retrying with" conformance-oom.log \
47
48
  && echo " retried with more memory";;
49
+ secrets) check secrets results/secrets/out.txt "^ok$" && ! grep -q hello-ssm conformance-secrets.log \
50
+ && echo " the job got the parameter, and its value isn't in the log";;
48
51
  spot) check spot results/total.txt "$(( N * (N - 1) / 2 ))" && grep -q "queue $SQ," conformance-spot.log \
49
52
  && echo " jobs went to $SQ";;
50
53
  esac && pass+=($name) || fail+=($name)
@@ -98,7 +101,25 @@ for t in "${@:-script fanout}"; do
98
101
  --aws-batch-flex-install-prereqs -j 2;;
99
102
  spot) SQ=$(terraform -chdir=../../terraform output -raw spot_queue_name)
100
103
  run spot -s fanout.smk --config n_units=$N -j $N --aws-batch-flex-queue "$SQ";;
101
- rules) bash "$0" checkpoint group shadow benchmark retries tempdir directory; exit;;
104
+ secrets) # a test parameter, named under smkflex/ where the execution role may read; removed after
105
+ XR=$(terraform -chdir=../../terraform output -raw snakemake_profile | sed -n 's/^ *aws-batch-flex-execution-role-arn: //p')
106
+ if [ -z "$XR" ]; then
107
+ echo " no execution role: set enable_secrets = true in terraform.tfvars and apply"; fail+=(secrets)
108
+ else
109
+ REGION=$(grep '^aws-batch-flex-region:' "$CFG" | awk '{print $2}')
110
+ ACCT=$(aws sts get-caller-identity --query Account --output text)
111
+ P=/smkflex/conformance-test-token
112
+ aws ssm delete-parameter --name $P --region $REGION 2>/dev/null
113
+ if aws ssm put-parameter --name $P --type SecureString --value hello-ssm --region $REGION \
114
+ --tags Key=ManagedBy,Value=snakemake-batch-flex > /dev/null; then
115
+ run secrets -s secrets.smk --aws-batch-flex-execution-role-arn "$XR" \
116
+ --aws-batch-flex-secrets "SMKFLEX_TEST_TOKEN=arn:aws:ssm:$REGION:$ACCT:parameter$P"
117
+ else
118
+ echo " could not make the test parameter; nothing submitted"; fail+=(secrets)
119
+ fi
120
+ aws ssm delete-parameter --name $P --region $REGION && echo " deleted parameter $P"
121
+ fi;;
122
+ rules) for r in checkpoint group shadow benchmark retries tempdir directory; do run $r -s $r.smk -j 4; done;;
102
123
  checkpoint|group|shadow|benchmark|retries|tempdir|directory) run $name -s $name.smk -j 4;;
103
124
  esac
104
125
  done
@@ -0,0 +1,18 @@
1
+ # A secret from SSM Parameter Store (aws-batch-flex-secrets): ECS reads it when the job starts,
2
+ # so the value never passes through Batch. run.sh makes the parameter and removes it again.
3
+ container: "docker://debian:12"
4
+
5
+ rule all:
6
+ input: "results/secrets/out.txt"
7
+
8
+ rule secret:
9
+ output: "results/secrets/out.txt"
10
+ resources: mem_mb=512
11
+ shell:
12
+ """
13
+ case "${{SMKFLEX_TEST_TOKEN:-}}" in
14
+ hello-ssm) echo ok > {output} ;;
15
+ "") echo "SMKFLEX_TEST_TOKEN is not set" >&2; exit 1 ;;
16
+ *) echo "SMKFLEX_TEST_TOKEN has the wrong value" >&2; exit 1 ;;
17
+ esac
18
+ """
@@ -0,0 +1,53 @@
1
+ # Known pipelines on AWS Batch
2
+
3
+ Published Snakemake pipelines, each at a fixed release and with its own test data, run on real
4
+ AWS Batch through the plugin. They're the check before a release that the plugin works with
5
+ pipelines as people write them, not only with the small workflows in `../conformance/`.
6
+
7
+ | Name | Pipeline | What it exercises |
8
+ |---|---|---|
9
+ | `tutorial` | The Snakemake tutorial's workflow (`tutorial/`), on [snakemake-tutorial-data](https://github.com/snakemake/snakemake-tutorial-data) | conda envs, `script:`, `temp()`/`protected()`, logs, config |
10
+ | `rnaseq` | [rna-seq-star-deseq2](https://github.com/snakemake-workflows/rna-seq-star-deseq2) | wrappers, R scripts, Ensembl downloads |
11
+ | `kallisto` | [rna-seq-kallisto-sleuth](https://github.com/snakemake-workflows/rna-seq-kallisto-sleuth) | many `script:` steps (23 R scripts) |
12
+ | `nanopore` | [transcriptome-differential-expression](https://github.com/snakemake-workflows/transcriptome-differential-expression) | **not runnable on Batch as written** (below) |
13
+ | `varlociraptor` | [dna-seq-varlociraptor](https://github.com/snakemake-workflows/dna-seq-varlociraptor) | a large DAG, modules, meta-wrappers |
14
+ | `zarp` | [zarp](https://github.com/zavolanlab/zarp) | **not runnable on Batch as written** (below) |
15
+ | `grenepipe` | [grenepipe](https://github.com/lczech/grenepipe) | **needs Snakemake 8** (below) |
16
+
17
+ ```
18
+ bash run.sh --check tutorial # set it up and dry-run it here: no AWS, nothing to pay
19
+ bash run.sh rnaseq kallisto # on AWS, from this machine (EC2 queue of the profile)
20
+ MODE=head bash run.sh rnaseq # on AWS, with Snakemake itself in a head job (smkflex run)
21
+ ```
22
+
23
+ Each run clones the pipeline into `~/smkflex-pipelines/NAME` (`WORK=` to change), sets its test up
24
+ as its own CI does but from the top of the repository (the plugin can't run with
25
+ `--directory .test`), uploads the inputs with `smkflex push` to its own project folder
26
+ (`pipelines-NAME` in the bucket), and runs it. The log is `~/smkflex-pipelines/NAME.log`;
27
+ `results.tsv` here gets a line per run.
28
+
29
+ Costs: each takes about 15-60 minutes of small instances, most of it building conda envs.
30
+ Afterwards, `aws s3 rm --recursive <bucket prefix>/pipelines-NAME/` removes its files.
31
+
32
+ ## Not runnable as written
33
+
34
+ **nanopore** (transcriptome-differential-expression v2.6.0) finds each sample's reads by searching
35
+ the folder Snakemake runs in (`os.walk(Path.cwd())` in `workflow/rules/commons.smk`) and uses the
36
+ absolute path it finds. Every Batch job reads the Snakefile again in its own folder, where the
37
+ reads aren't (they come from the bucket) and the paths differ, so the jobs can't rebuild their
38
+ inputs. It needs every machine to see the same files at the same paths (a laptop, or a cluster's
39
+ shared filesystem); any executor without one has the same problem. The fix belongs in the
40
+ pipeline: build the read paths from `config["inputdir"]`, relative to the workflow folder.
41
+
42
+ **zarp** (v1.0.0-rc.1) names inputs by absolute paths and passes them to tools as params, which
43
+ work on Batch (jobs see files at the same paths as Snakemake). But its rules leave outputs
44
+ undeclared: `create_index_star` declares `chrName.txt` and `chrNameLength.txt` of the STAR
45
+ index, and STAR writes a dozen more files beside them. Snakemake only stores declared outputs,
46
+ so the rest of the index never reaches the bucket and `map_genome_star` can't open
47
+ `genomeParameters.txt`; the quantification merges fail the same way. A shared filesystem keeps
48
+ undeclared files, which is why it runs on a cluster. The fix belongs in the pipeline: declare
49
+ such folders with `directory()`.
50
+
51
+ **grenepipe** (v0.15.0, and its master branch in October 2026) pins Snakemake 8.15.2 and reads
52
+ `logger.mode`, which Snakemake 9 removed, so it stops at its first line with any Snakemake 9
53
+ ("'Logger' object has no attribute 'mode'"). The plugin needs Snakemake 9.
@@ -0,0 +1,133 @@
1
+ #!/usr/bin/env bash
2
+ # Known Snakemake pipelines on real AWS Batch, each with its own test data, at a fixed release.
3
+ # Usage: bash run.sh [--check] NAME [NAME ...] (one after the other; `all` for every one)
4
+ # --check set each one up and dry-run it here with plain Snakemake: no AWS, nothing to pay
5
+ # MODE=head bash run.sh NAME run it with `smkflex run --wait` (Snakemake on Batch too)
6
+ # FRESH=1 bash run.sh NAME clone and set it up again; otherwise a later run reuses the folder,
7
+ # so Snakemake carries on where the last run stopped, as it would for a user
8
+ # PROFILE=... the plugin's profile (default: ../conformance/profile)
9
+ # WORK=... where the pipelines are cloned (default: ~/smkflex-pipelines)
10
+ # Each is cloned into $WORK/NAME, set up as its own CI test does but run from the top of the
11
+ # repository (the plugin can't run with --directory .test), its inputs uploaded with smkflex push,
12
+ # then run, with --retries 2 (a job that ran out of memory is retried with twice as much, as most
13
+ # pipelines set no mem_mb), --keep-going (every failure in one run) and --rerun-incomplete (a run
14
+ # that was stopped carries on). The log is $WORK/NAME.log; results.tsv here gets one line per run.
15
+ set -u
16
+ HERE=$(cd "$(dirname "$0")" && pwd)
17
+ PROFILE=${PROFILE:-$HERE/../conformance/profile}
18
+ WORK=${WORK:-$HOME/smkflex-pipelines}
19
+ MODE=${MODE:-direct}
20
+ ALL="tutorial rnaseq kallisto nanopore varlociraptor zarp grenepipe"
21
+
22
+ # The test folder's contents at the top: its configs, sample sheets and data where its paths
23
+ # expect them (without the submodules' .git files, which only work at their own place). The
24
+ # repository's example config/ goes: its CI runs in .test, where there is none, and Snakemake
25
+ # would merge it into the test's --configfile.
26
+ overlay() { rm -rf config && tar -C .test --exclude=.git -cf - . | tar -xf -; }
27
+
28
+ # NAME: repository, release tag, setup (run in the clone), inputs to upload, snakemake arguments
29
+ recipe() {
30
+ case $1 in
31
+ tutorial) # the Snakemake tutorial's workflow (docs: "Basics"), on its data
32
+ REPO=snakemake/snakemake-tutorial-data TAG=v9.0.0
33
+ setup() { cp -r "$HERE/tutorial/." .; }
34
+ INPUTS="data" ARGS="--sdm conda -j 4";;
35
+ rnaseq)
36
+ REPO=snakemake-workflows/rna-seq-star-deseq2 TAG=v3.1.2
37
+ setup() { overlay; }
38
+ INPUTS="ngs-test-data" ARGS="--configfile config_basic/config.yaml --sdm conda -j 10 --default-resources mem_mb=4000 --retries 2 --keep-going --rerun-incomplete";;
39
+ kallisto) # goatools 1.6.4 imports what statsmodels 0.15 (Aug 2026) no longer has: pinned, as a user would
40
+ REPO=snakemake-workflows/rna-seq-kallisto-sleuth TAG=v4.1.1
41
+ setup() { overlay && echo " - statsmodels <0.15" >> workflow/envs/goatools.yaml; }
42
+ INPUTS="ngs-test-data resources config" ARGS="--sdm conda -j 10 --default-resources mem_mb=4000 --retries 2 --keep-going --rerun-incomplete";;
43
+ nanopore) # can't run on Batch: it finds its reads by searching the folder Snakemake runs in
44
+ # (os.walk(Path.cwd()), absolute paths), which each job does again in its own folder; see README
45
+ echo "nanopore: not runnable on remote executors as written (see README)" >&2; return 1
46
+ REPO=snakemake-workflows/transcriptome-differential-expression TAG=v2.6.0
47
+ setup() { overlay; }
48
+ INPUTS="ngs-test-data" ARGS="--configfile config-simple/config.yml --sdm conda -j 10 --default-resources mem_mb=4000 --retries 2 --keep-going --rerun-incomplete";;
49
+ varlociraptor)
50
+ REPO=snakemake-workflows/dna-seq-varlociraptor TAG=v6.11.4
51
+ setup() { overlay; }
52
+ INPUTS="data" ARGS="--configfile config-simple/config.yaml --sdm conda -j 10 --default-resources mem_mb=4000 --retries 2 --keep-going --rerun-incomplete";;
53
+ zarp) # can't run on Batch as written: its rules leave outputs undeclared (most of the STAR index),
54
+ # which only a shared filesystem keeps; see README
55
+ echo "zarp: needs a shared filesystem as written (see README)" >&2; return 1
56
+ # a container: per rule (biocontainers and others); its tests name ../input_files, and it
57
+ # makes input paths absolute (os.path.abspath), so they're uploaded by their absolute path
58
+ REPO=zavolanlab/zarp TAG=v1.0.0-rc.1
59
+ setup() { cp -r tests/input_files input_files
60
+ sed -i 's#\.\./input_files/#input_files/#g; s#\.\./\.\./images/#images/#g' input_files/*.yaml input_files/*.tsv; }
61
+ # one of its rules lists the pipeline's own zarp_multiqc_config.py as an input: from storage too
62
+ INPUTS="$WORK/zarp/input_files $WORK/zarp/workflow/scripts/zarp_multiqc_config.py" ARGS="--configfile input_files/config.yaml -j 10 --default-resources mem_mb=4000 --retries 2 --keep-going --rerun-incomplete";;
63
+ grenepipe) # needs Snakemake 8 (it pins 8.15.2 and uses logger.mode, gone in 9); the plugin needs 9
64
+ echo "grenepipe: needs Snakemake 8, the plugin needs 9 (see README)" >&2; return 1
65
+ # inputs by absolute path, as its example sets them up
66
+ REPO=lczech/grenepipe TAG=v0.15.0
67
+ setup() { bash example/prepare.sh && cp example/config.yaml config.yaml; }
68
+ INPUTS="$WORK/grenepipe/example" ARGS="--sdm conda -j 10 --default-resources mem_mb=4000 --retries 2 --keep-going --rerun-incomplete";;
69
+ *) echo "unknown pipeline $1 (known: $ALL)" >&2; return 1;;
70
+ esac
71
+ }
72
+
73
+ prepare() { # a fresh clone at the tag, set up
74
+ rm -rf "$WORK/$1" && mkdir -p "$WORK" || return 1
75
+ git -c url."https://github.com/".insteadOf="git@github.com:" clone -q --depth 1 --branch "$TAG" \
76
+ --recurse-submodules --shallow-submodules "https://github.com/$REPO" "$WORK/$1" || return 1
77
+ cd "$WORK/$1" && setup && printf 'ngs-test-data/\ninput_files/\n.prepared\n' >> .gitignore && touch .prepared
78
+ }
79
+
80
+ check=0; [ "${1:-}" = --check ] && { check=1; shift; }
81
+ if [ $# = 0 ]; then echo "Say which: bash run.sh [--check] NAME ... ($ALL, or all)" >&2; exit 2; fi
82
+ [ "$*" = all ] && set -- $ALL
83
+ pass=(); fail=()
84
+ for name in "$@"; do
85
+ recipe "$name" || { fail+=("$name"); continue; }
86
+ echo "=== $name ($REPO $TAG)"
87
+ log="$WORK/$name.log"
88
+ mkdir -p "$WORK"
89
+ if [ $check = 0 ] && [ "${FRESH:-0}" != 1 ] && [ -f "$WORK/$name/.prepared" ]; then
90
+ echo " reusing $WORK/$name (FRESH=1 to start again)"; : > "$log"
91
+ elif ! (prepare "$name") > "$log" 2>&1; then
92
+ echo " setup FAILED (see $log)"; tail -5 "$log" | sed 's/^/ /'; fail+=("$name"); continue
93
+ fi
94
+ if ! cd "$WORK/$name"; then
95
+ echo " setup FAILED (see $log)"; tail -5 "$log" | sed 's/^/ /'; fail+=("$name"); cd "$HERE"; continue
96
+ fi
97
+ if [ $check = 1 ]; then
98
+ # shellcheck disable=SC2086
99
+ if snakemake -n --workflow-profile none $ARGS >> "$log" 2>&1; then
100
+ echo " dry run OK: $(grep -E '^total +[0-9]+' "$log" | tail -1 | awk '{print $2}') jobs"; pass+=("$name")
101
+ else echo " dry run FAILED (see $log)"; fail+=("$name"); fi
102
+ cd "$HERE"; continue
103
+ fi
104
+ start=$(date +%s)
105
+ # shellcheck disable=SC2086
106
+ if smkflex init --profile "$PROFILE" --name "pipelines-$name" >> "$log" 2>&1 \
107
+ && smkflex push --profile "$PROFILE" $INPUTS >> "$log" 2>&1; then
108
+ if [ "$MODE" = head ]; then
109
+ smkflex run --profile "$PROFILE" --wait $ARGS >> "$log" 2>&1
110
+ else
111
+ snakemake --profile "$PROFILE" $ARGS >> "$log" 2>&1
112
+ fi
113
+ rc=$?
114
+ else rc=setup; fi
115
+ mins=$(( ($(date +%s) - start + 59) / 60 ))
116
+ steps=$(grep -oE '[0-9]+ of [0-9]+ steps \([0-9]+%\) done' "$log" | tail -1)
117
+ if [ "$rc" = 0 ]; then echo " PASS in $mins min ($steps)"; pass+=("$name")
118
+ else
119
+ # failed jobs per rule (an earlier one may have been retried and passed), then the last
120
+ # error, which is the one Snakemake gave up on
121
+ echo " FAILED ($rc) after $mins min${steps:+ at $steps}; failed jobs:"
122
+ grep "^Error in rule" "$log" | sort | uniq -c | sed 's/^ */ /'
123
+ echo " last error:"
124
+ awk '/^Error in rule|^MissingInputException|^WorkflowError/{buf=""} {buf=buf $0 "\n"} END{printf "%s", buf}' "$log" \
125
+ | grep -E "^Error in rule|^[A-Za-z]+(Exception|Error)|message:|container reason|end of log file|hint:|[Ee]rror|Unable|denied|No such" \
126
+ | grep -v -E "check log file|CalledProcessError|Exiting because|At least one job" | head -10 | cut -c1-220 | sed 's/^ */ /'
127
+ fail+=("$name")
128
+ fi
129
+ printf '%s\t%s\t%s\t%s\t%s\t%s min\t%s\n' "$(date +%F)" "$name" "$TAG" "$MODE" \
130
+ "$([ "$rc" = 0 ] && echo PASS || echo FAIL)" "$mins" "$steps" >> "$HERE/results.tsv"
131
+ cd "$HERE"
132
+ done
133
+ echo; echo "PASS: ${pass[*]:-none}"; echo "FAIL: ${fail[*]:-none}"