snakemake-executor-plugin-aws-batch-flex 0.1.1__tar.gz → 0.2.1__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 (131) hide show
  1. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/.gitignore +1 -0
  2. snakemake_executor_plugin_aws_batch_flex-0.2.1/.release-please-manifest.json +3 -0
  3. snakemake_executor_plugin_aws_batch_flex-0.2.1/CHANGELOG.md +124 -0
  4. snakemake_executor_plugin_aws_batch_flex-0.2.1/PKG-INFO +348 -0
  5. snakemake_executor_plugin_aws_batch_flex-0.2.1/README.md +314 -0
  6. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/docs/further.md +28 -22
  7. snakemake_executor_plugin_aws_batch_flex-0.2.1/docs/guide.md +538 -0
  8. snakemake_executor_plugin_aws_batch_flex-0.2.1/docs/reference.md +235 -0
  9. snakemake_executor_plugin_aws_batch_flex-0.2.1/docs/setup.md +221 -0
  10. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/run.sh +23 -2
  11. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/conformance/secrets.smk +18 -0
  12. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/README.md +55 -0
  13. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/run.sh +133 -0
  14. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/tutorial/Snakefile +85 -0
  15. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/tutorial/config.yaml +6 -0
  16. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/tutorial/envs/calling.yaml +5 -0
  17. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/tutorial/envs/mapping.yaml +6 -0
  18. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/tutorial/envs/plot.yaml +7 -0
  19. snakemake_executor_plugin_aws_batch_flex-0.2.1/examples/pipelines/tutorial/scripts/plot-quals.py +10 -0
  20. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/smoke-test/README.md +4 -3
  21. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/pyproject.toml +3 -2
  22. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/bootstrap.py +87 -4
  23. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/bundle.py +42 -7
  24. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/condacache.py +4 -2
  25. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/executor.py +107 -5
  26. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/hints.py +17 -0
  27. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/hostenv.py +9 -6
  28. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/jobdefs.py +7 -2
  29. snakemake_executor_plugin_aws_batch_flex-0.2.1/src/snakemake_executor_plugin_aws_batch_flex/jobfixes.py +204 -0
  30. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/jobmonitor.py +2 -0
  31. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/patches.py +28 -10
  32. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/remote.py +15 -7
  33. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/settings.py +36 -1
  34. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/sources.py +45 -6
  35. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/transfer.py +7 -1
  36. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/usage.py +13 -2
  37. snakemake_executor_plugin_aws_batch_flex-0.2.1/terraform/README.md +80 -0
  38. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/fargate.tf +27 -4
  39. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/outputs.tf +2 -1
  40. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/variables.tf +6 -0
  41. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/fakeaws/sitecustomize.py +11 -1
  42. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_conda_mount.py +2 -0
  43. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_condacache.py +1 -0
  44. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_integration.py +181 -3
  45. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_prereqs.py +19 -0
  46. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_script_python.py +33 -3
  47. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_smkflex.py +62 -0
  48. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_units.py +195 -1
  49. snakemake_executor_plugin_aws_batch_flex-0.1.1/.release-please-manifest.json +0 -3
  50. snakemake_executor_plugin_aws_batch_flex-0.1.1/CHANGELOG.md +0 -71
  51. snakemake_executor_plugin_aws_batch_flex-0.1.1/PKG-INFO +0 -343
  52. snakemake_executor_plugin_aws_batch_flex-0.1.1/README.md +0 -310
  53. snakemake_executor_plugin_aws_batch_flex-0.1.1/docs/guide.md +0 -451
  54. snakemake_executor_plugin_aws_batch_flex-0.1.1/docs/reference.md +0 -195
  55. snakemake_executor_plugin_aws_batch_flex-0.1.1/docs/setup.md +0 -216
  56. snakemake_executor_plugin_aws_batch_flex-0.1.1/src/snakemake_executor_plugin_aws_batch_flex/jobfixes.py +0 -65
  57. snakemake_executor_plugin_aws_batch_flex-0.1.1/terraform/README.md +0 -43
  58. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/.github/workflows/release.yml +0 -0
  59. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/.github/workflows/tests.yml +0 -0
  60. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/LICENSE +0 -0
  61. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/docs/intro.md +0 -0
  62. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/environment.yml +0 -0
  63. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/auto.smk +0 -0
  64. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/benchmark.smk +0 -0
  65. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/checkpoint.smk +0 -0
  66. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/conda.smk +0 -0
  67. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/conda_named.smk +0 -0
  68. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/config/pdsheet.tsv +0 -0
  69. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/directory.smk +0 -0
  70. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/disk.smk +0 -0
  71. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/ecr.smk +0 -0
  72. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/entrypoint.smk +0 -0
  73. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/envs/tiny.yaml +0 -0
  74. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/fanout.smk +0 -0
  75. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/fargate.smk +0 -0
  76. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/find-profile.sh +0 -0
  77. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/group.smk +0 -0
  78. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/mixed.smk +0 -0
  79. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/oom.smk +0 -0
  80. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/orphan-test.sh +0 -0
  81. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/orphans.smk +0 -0
  82. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/pdsheet.smk +0 -0
  83. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/pipeline.smk +0 -0
  84. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/pyimage.smk +0 -0
  85. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/pyrule.smk +0 -0
  86. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/retries.smk +0 -0
  87. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/rscript.smk +0 -0
  88. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/script.smk +0 -0
  89. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/scripts/pandas_script.py +0 -0
  90. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/scripts/py_script.py +0 -0
  91. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/scripts/r_script.R +0 -0
  92. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/scripts/sh_script.sh +0 -0
  93. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/scripts/which_python.py +0 -0
  94. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/shadow.smk +0 -0
  95. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/shm.smk +0 -0
  96. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/tempdir.smk +0 -0
  97. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/conformance/wrapper.smk +0 -0
  98. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/examples/smoke-test/Snakefile +0 -0
  99. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/release-please-config.json +0 -0
  100. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/scripts/bake-ami.sh +0 -0
  101. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/scripts/cleanup-ami.sh +0 -0
  102. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/scripts/cleanup-jobdefs.sh +0 -0
  103. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/scripts/setup.sh +0 -0
  104. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/scripts/update-ami.sh +0 -0
  105. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/__init__.py +0 -0
  106. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/check.py +0 -0
  107. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/headjob.py +0 -0
  108. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/imageinfo.py +0 -0
  109. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/naming.py +0 -0
  110. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/orphans.py +0 -0
  111. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/preflight.py +0 -0
  112. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/profiles.py +0 -0
  113. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/sizing.py +0 -0
  114. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/src/snakemake_executor_plugin_aws_batch_flex/tags.py +0 -0
  115. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/.terraform.lock.hcl +0 -0
  116. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/main.tf +0 -0
  117. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/spot.tf +0 -0
  118. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/terraform.tfvars.example +0 -0
  119. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/userdata.snakemake.txt +0 -0
  120. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/terraform/versions.tf +0 -0
  121. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/conftest.py +0 -0
  122. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/fixtures/existing_userdata.txt +0 -0
  123. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_bake_script.py +0 -0
  124. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_cleanup_ami.py +0 -0
  125. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_cleanup_jobdefs.py +0 -0
  126. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_conformance.py +0 -0
  127. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_host_env.py +0 -0
  128. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_imageinfo.py +0 -0
  129. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_setup.py +0 -0
  130. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/tests/test_tags.py +0 -0
  131. {snakemake_executor_plugin_aws_batch_flex-0.1.1 → snakemake_executor_plugin_aws_batch_flex-0.2.1}/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,124 @@
1
+ # Changelog
2
+
3
+ ## [0.2.1](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/compare/v0.2.0...v0.2.1) (2026-10-31)
4
+
5
+
6
+ ### Documentation
7
+
8
+ * rewrite the docs for Snakemake users, with values for every option, and disclose AI assistance ([8116e61](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/8116e610b00bc107f1ac1317f34d0d7659f0fc0a))
9
+ * update what's been tested on AWS ([164b06c](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/164b06c8c06e34097081ba156c323272233eae85))
10
+
11
+ ## [0.2.0](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/compare/v0.1.1...v0.2.0) (2026-10-31)
12
+
13
+
14
+ ### Features
15
+
16
+ * 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))
17
+ * 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))
18
+ * 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))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * 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))
24
+ * 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))
25
+ * 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))
26
+ * 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))
27
+ * 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))
28
+ * 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))
29
+ * 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))
30
+ * clearer failures and safer transfers found in a review ([e3ba7a5](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/e3ba7a55a698b9feadcbbae5fbd58086a3624856))
31
+ * 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))
32
+ * 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))
33
+ * 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))
34
+ * 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))
35
+ * 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))
36
+ * smkflex init no longer keeps resources/ from the jobs ([893da48](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/893da48aaf130064fbfc4d8e2ce8ecd058239613))
37
+ * 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))
38
+ * 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))
39
+ * 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))
40
+ * 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))
41
+ * 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))
42
+ * 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))
43
+
44
+
45
+ ### Performance Improvements
46
+
47
+ * 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))
48
+
49
+
50
+ ### Documentation
51
+
52
+ * aws-batch-flex-secrets tested on AWS (EC2) ([7da69e7](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/7da69e7e3d9fe206734761f3be1e4c8c18f82130))
53
+ * jobs build conda envs with strict channel priority ([098c4e9](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/commit/098c4e9e9a70649731e1839821082fa23b3150d9))
54
+ * 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))
55
+
56
+ ## [0.1.1](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/compare/v0.1.0...v0.1.1) (2026-10-29)
57
+
58
+
59
+ ### Bug Fixes
60
+
61
+ * 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))
62
+ * 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))
63
+ * 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))
64
+ * 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))
65
+
66
+ ## 0.1.0 (2026-10-28)
67
+
68
+ First release. Needs Snakemake 9 (9.5 or newer) and Python 3.11 to 3.13. Tested on Linux; macOS
69
+ should work, and on Windows use WSL.
70
+
71
+ ### Features
72
+
73
+ * run each rule as an AWS Batch job in the image from its `container:` directive, without
74
+ Snakemake or Python in the image
75
+ * Snakemake from a machine image (AMI) mounted read-only into EC2 jobs, or installed when the job
76
+ starts (Fargate, or without the AMI)
77
+ * mix EC2, Spot and Fargate queues in one run (`batch_queue` per rule); the platform is detected
78
+ per queue
79
+ * per-rule `threads`, `mem_mb`, `runtime`, `gpu`, `/dev/shm` size (`batch_shm_mb`), Fargate disk
80
+ (`disk_mb`), tags, Spot retries, fair-share priority and existing job definitions
81
+ * images with an `ENTRYPOINT` (`["python3"]`, tini, entrypoint scripts): it's read from the image's
82
+ registry and the job's command is made to suit it, as Batch can't change it (`batch_entrypoint`
83
+ if the registry can't be read)
84
+ * Python `script:` rules run in the image's own Python (3.10 or newer)
85
+ * conda environments and wrappers in images without conda, with built environments reused per
86
+ machine and optionally kept in S3 (`conda-cache`)
87
+ * retry jobs that ran out of memory with more memory (`oom-memory-factor`)
88
+ * failed jobs show the end of their log, with hints for known causes (out of memory, full disk,
89
+ missing package or storage plugin, S3 permissions, an image `ENTRYPOINT` in the way)
90
+ * startup checks of the queue, compute environments and roles; jobs left over from an
91
+ interrupted run are cancelled
92
+ * end-of-run table of what each rule used (vCPU- and GiB-hours); costs come from AWS Billing, by
93
+ the tags `snakemake-run-id` and `snakemake-rule` that every job carries
94
+ * peak memory, busy vCPUs and disk use per rule, with `set-resources:` and `set-threads:`
95
+ suggestions to paste
96
+ * every job gets the whole workflow folder (what git tracks, or all that `.gitignore` doesn't
97
+ exclude, and `config/`), so scripts that `shell:` runs, imported modules and sample sheets
98
+ reach it without git; `data/`, `results/`, `logs/` and `benchmarks/` stay behind, and more than
99
+ 100 MB (`max-sources-mb`) stops the run at the start
100
+ * the same Snakemake and package versions in every job, pinned to the AMI's or the local ones
101
+ * a missing input says that jobs read inputs from the bucket, and the `smkflex push` that uploads it
102
+ * runs that can't work stop at the start: a `workdir:` directive, a job command too long for ECS
103
+ * `script:` rules and pandas work in images that bring their own conda libraries (bioconda's)
104
+ * jobs can't use the instances' credentials, and the launcher policy can't register privileged
105
+ job definitions
106
+ * `smkflex run`: run Snakemake itself on AWS in a head job, from the current folder or a git
107
+ repository (`--git`, `--rev`, `--path`, `--add`), with `.snakemake` state (also with
108
+ `--persistence-backend db`) kept between runs and saved while it runs; one run per project
109
+ * `smkflex logs`, `status` and `cancel` for those runs
110
+ * `smkflex init`, `push` and `pull`: a project folder in the bucket, uploading inputs and
111
+ downloading results at the paths Snakemake uses
112
+ * `smkflex check`: checks the whole setup and says what to fix
113
+ * `scripts/setup.sh`: one-command setup of the AMI, queue, compute environment, roles, bucket,
114
+ log group and `smkflex` profile, with optional Spot and Fargate queues
115
+ * `scripts/update-ami.sh`, `cleanup-ami.sh` and `cleanup-jobdefs.sh` to update the AMI and remove
116
+ the plugin's old images and job definitions
117
+ * Terraform setup with 30-day job logs, optional expiry of old files in the bucket, and an IAM
118
+ policy for people who only run pipelines that can't stop or change other Batch work
119
+ * private images: ECR through the IAM roles, other registries through Secrets Manager
120
+
121
+ ### Documentation
122
+
123
+ * README with a step-by-step setup from an empty AWS account to a finished test run
124
+ * guide, reference and setup pages in `docs/`, and runnable tests on AWS in `examples/conformance/`
@@ -0,0 +1,348 @@
1
+ Metadata-Version: 2.5
2
+ Name: snakemake-executor-plugin-aws-batch-flex
3
+ Version: 0.2.1
4
+ Summary: Snakemake executor plugin for AWS Batch that runs every rule in its own container image
5
+ Project-URL: Homepage, https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex
6
+ Project-URL: Documentation, https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex#getting-started
7
+ Project-URL: Issues, https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/issues
8
+ Project-URL: Changelog, https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/CHANGELOG.md
9
+ Author: Stephen Smith
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: aws,aws-batch,bioinformatics,executor,plugin,snakemake
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: boto3>=1.34
21
+ Requires-Dist: pyyaml
22
+ Requires-Dist: snakemake-interface-common<2,>=1.17.4
23
+ Requires-Dist: snakemake-interface-executor-plugins<10,>=9.3.2
24
+ Requires-Dist: snakemake-interface-storage-plugins<5,>=4.0.0
25
+ Provides-Extra: test
26
+ Requires-Dist: pandas; extra == 'test'
27
+ Requires-Dist: pytest; extra == 'test'
28
+ Requires-Dist: pytest-xdist; extra == 'test'
29
+ Requires-Dist: ruff; extra == 'test'
30
+ Requires-Dist: snakemake; extra == 'test'
31
+ Requires-Dist: snakemake-storage-plugin-fs; extra == 'test'
32
+ Requires-Dist: snakemake-storage-plugin-s3; extra == 'test'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # snakemake-executor-plugin-aws-batch-flex
36
+
37
+ A Snakemake executor plugin that runs each job on [AWS Batch](https://aws.amazon.com/batch/) in
38
+ the image named by its rule's `container:` directive: a stock image from Docker Hub,
39
+ quay.io/biocontainers, your own ECR repository, and so on. The images don't need Snakemake or
40
+ Python inside them.
41
+
42
+ **How it works.** On EC2, a Snakemake environment is baked into the machine image (AMI) that
43
+ Batch starts instances from, and mounted read-only into every job's container; this is how
44
+ Nextflow brings its AWS CLI to jobs. On Fargate, which has no instances to customise, Snakemake
45
+ is installed into the container when the job starts. Inputs and outputs go through S3 with
46
+ Snakemake's S3 storage plugin. Instances start when jobs arrive and stop when the queue is
47
+ empty, so you pay only while jobs run.
48
+
49
+ **How it differs from the aws-batch plugin.** The other AWS Batch executor in the plugin
50
+ catalog,
51
+ [snakemake-executor-plugin-aws-batch](https://github.com/snakemake/snakemake-executor-plugin-aws-batch),
52
+ runs `snakemake` inside each job's container, so every image a rule uses needs Snakemake and the
53
+ S3 storage plugin installed; biocontainers and other stock images can't be used as they are.
54
+ This plugin brings Snakemake to the job instead, so each rule can use any image, and conda envs
55
+ work in images without conda. It also:
56
+
57
+ - sets up the AWS side (AMI, queue, roles, bucket, profile) with one command;
58
+ - mixes EC2, Spot and Fargate queues in one run;
59
+ - can run Snakemake itself on AWS (`smkflex run`), so your machine can be switched off;
60
+ - retries jobs that ran out of memory with more memory;
61
+ - reports what each rule used at the end of a run, with `set-resources:` and `set-threads:`
62
+ suggestions to paste into your profile.
63
+
64
+ This page goes from an empty AWS account to a finished test run
65
+ ([Getting started](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex#getting-started)), then covers running your own workflows and the per-rule
66
+ resources. The rest is in three more pages:
67
+
68
+ - [Guide](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md): published pipelines, moving from a cluster, long runs with `smkflex`,
69
+ conda, the usage table, Spot and Fargate, private images, and troubleshooting;
70
+ - [Reference](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/reference.md): every profile setting and `smkflex` command, IAM, what has been
71
+ tested, and the limits;
72
+ - [Setup and upkeep](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/setup.md): university and company accounts, updating the machine image,
73
+ setting up by hand, and removing everything.
74
+
75
+ ## Getting started
76
+
77
+ These steps take under an hour. They assume you know Snakemake but not AWS.
78
+
79
+ The plugin needs Snakemake 9.5 or newer and Python 3.11 to 3.13. It has been tested on Linux.
80
+ On Windows, use [WSL](https://learn.microsoft.com/windows/wsl/install) and run everything inside
81
+ it. macOS should work but hasn't been tried.
82
+
83
+ ### 1. What you need
84
+
85
+ - An AWS account. Setting this up costs very little: building the machine image runs one small
86
+ machine for about 10 minutes, and keeping the image costs well under $1 a month. The test run
87
+ in step 5 costs a few cents. If your account comes from your university or company, read
88
+ [University and company accounts](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/setup.md#university-and-company-accounts) first.
89
+ - Somewhere to run commands: a laptop is fine. As with any remote executor, the machine running
90
+ `snakemake` has to stay on and online until the workflow finishes; `smkflex run` runs
91
+ Snakemake on AWS instead (see [Long runs](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#long-runs-smkflex)).
92
+
93
+ ### 2. Install the tools
94
+
95
+ Install [Miniforge](https://github.com/conda-forge/miniforge#install) if you don't already have
96
+ `conda`. Then get this repository and create an environment with everything you need (Python,
97
+ Snakemake, Terraform, the AWS command-line tool and `snakedeploy`):
98
+
99
+ ```bash
100
+ git clone https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex.git
101
+ cd snakemake-executor-plugin-aws-batch-flex
102
+ conda env create -f environment.yml
103
+ conda activate smk-aws
104
+ pip install -e .
105
+ ```
106
+
107
+ Run `conda activate smk-aws` again in every new terminal before the steps below.
108
+
109
+ Check it worked: `snakemake --version` should print a version number (9.x), and
110
+ `snakemake --help | grep aws-batch-flex` should list this plugin's settings.
111
+
112
+ ### 3. Connect to your AWS account
113
+
114
+ The command-line tools need an access key. In the [AWS console](https://console.aws.amazon.com/):
115
+
116
+ 1. Go to **IAM** > **Users** > **Create user**. Give it a name (e.g. `snakemake-admin`).
117
+ 2. On the permissions page choose **Attach policies directly** and tick **AdministratorAccess**.
118
+ (Setup creates machines, roles, a queue and a bucket, which needs broad permissions. Don't
119
+ use your account's root login for this.)
120
+ 3. Open the new user > **Security credentials** > **Create access key** > **Command Line
121
+ Interface (CLI)**. Copy the access key ID and secret access key.
122
+
123
+ Then in your terminal:
124
+
125
+ ```bash
126
+ aws configure
127
+ ```
128
+
129
+ Paste the two keys when asked. For the region, pick the one closest to you, e.g. `eu-west-1`
130
+ (Ireland) or `us-east-1` (N. Virginia), and use the same one everywhere below. Leave the output
131
+ format empty.
132
+
133
+ Check it worked: `aws sts get-caller-identity` should print your account number. (If you log in
134
+ through a university or company page instead, follow
135
+ [University and company accounts](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/setup.md#university-and-company-accounts) for this step.)
136
+
137
+ ### 4. Set up AWS
138
+
139
+ One script does the rest of the setup. It finds your account's default subnets, builds an AMI
140
+ with Snakemake on it (plus conda and pandas, which most published pipelines need), creates the
141
+ queue, compute environment, roles, log group and bucket with Terraform, and installs a global
142
+ Snakemake profile, `~/.config/snakemake/smkflex/config.yaml`, that sets the executor, your queue
143
+ and the S3 storage prefix. `snakemake --profile smkflex` then works in any folder. Use the
144
+ region you picked in step 3:
145
+
146
+ ```bash
147
+ bash scripts/setup.sh --region eu-west-1
148
+ ```
149
+
150
+ It asks twice before creating anything: before building the AMI, which takes 10 to 20 minutes,
151
+ and after showing the Terraform plan (about 20 new resources, nothing changed or removed). At
152
+ the end it checks the whole setup and prints `All good.`. If it stops partway, fix what it
153
+ reports and run the same command again; it continues where it stopped.
154
+
155
+ Options: `--fargate` also creates a Fargate queue and `--spot` a Spot queue (see
156
+ [Spot and Fargate queues](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#spot-and-fargate-queues)), `--extra-package NAME` adds a
157
+ Python package to the AMI, and `--no-conda` leaves conda out. `bash scripts/setup.sh --help`
158
+ lists the rest. To do each step by hand instead, see
159
+ [Setting up by hand](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/setup.md#setting-up-by-hand).
160
+
161
+ Nothing is running, or costing money, yet: instances start when jobs arrive and stop when the
162
+ queue is empty.
163
+
164
+ ### 5. Run the test workflow
165
+
166
+ ```bash
167
+ cd examples/smoke-test
168
+ snakemake --profile smkflex
169
+ ```
170
+
171
+ Snakemake submits two jobs. On the first run Batch has to start an instance, so the jobs wait
172
+ in `RUNNABLE` for a few minutes. Each job then runs in `debian:12`, which has no Python, and
173
+ writes its output to S3. The run ends with `3 of 3 steps (100%) done` and a table of what it
174
+ used.
175
+
176
+ Download the results from the bucket:
177
+
178
+ ```bash
179
+ smkflex pull results --profile smkflex
180
+ cat results/hello.txt results/sum.txt
181
+ ```
182
+
183
+ The first says hello from Debian and `image has NO python3`; the second is `45`. A few minutes
184
+ later the instance shuts down.
185
+
186
+ ### 6. Set a budget alert
187
+
188
+ Before running real pipelines, set a budget alert, so that a mistake (a huge job, a forgotten
189
+ setting) costs an email rather than a surprise bill. In the AWS console, go to **Billing and
190
+ Cost Management** > **Budgets** > **Create budget** > **Use a template** > **Monthly cost
191
+ budget**, and enter an amount (e.g. $50) and your email address. AWS then emails you at 85% and
192
+ 100% of it, and when the month's forecast goes over. It costs nothing.
193
+
194
+ As a rough guide, compute costs about $0.05 per vCPU-hour on on-demand instances (about a third
195
+ of that on Spot), so a job using 4 vCPUs for an hour costs about $0.20. The published RNA-seq
196
+ pipeline in [Running a published pipeline](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#running-a-published-pipeline) ran its
197
+ 53 test jobs for about $0.10; a real run with 20 samples of 30 million reads should cost a few
198
+ dollars (an estimate, not measured). S3 storage is about $0.02 per GB per month. The table at
199
+ the end of every run shows what that run used (see
200
+ [What a run used](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#what-a-run-used)).
201
+
202
+ That completes the setup. Next, depending on what you're running:
203
+
204
+ - a workflow of your own: [Your own workflow](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex#your-own-workflow);
205
+ - a pipeline from the Snakemake workflow catalog: [Running a published pipeline](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#running-a-published-pipeline);
206
+ - a pipeline you've been running on a cluster: read [Your own workflow](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex#your-own-workflow),
207
+ then [Coming from a cluster](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#coming-from-a-cluster).
208
+
209
+ ## Running your workflows
210
+
211
+ ### Your own workflow
212
+
213
+ Each rule runs as one Batch job, in the image its `container:` directive names:
214
+
215
+ ```python
216
+ rule count_lines:
217
+ input: "data/reads.txt"
218
+ output: "results/count.txt"
219
+ container: "docker://debian:12"
220
+ resources: mem_mb=1000
221
+ shell: "wc -l < {input} > {output}"
222
+ ```
223
+
224
+ The workflow runs with S3 as its default storage provider, so jobs read their inputs from the
225
+ bucket, never from your machine, and write their outputs there. In a folder with your
226
+ `Snakefile`:
227
+
228
+ ```bash
229
+ smkflex init # gives this project its own prefix in the bucket
230
+ smkflex push data # uploads data/reads.txt there
231
+ snakemake --profile smkflex # runs the workflow
232
+ smkflex pull results # downloads results/
233
+ ```
234
+
235
+ `smkflex init` writes a project profile, `profiles/default/config.yaml`, whose
236
+ `default-storage-prefix` is the project's own prefix (`s3://YOUR-BUCKET/snakemake/<folder name>`,
237
+ so each project's `results/` stay apart), and adds `data/`, `results/` and the like to the
238
+ folder's `.gitignore`. Snakemake loads that profile automatically on top of `--profile smkflex`,
239
+ so it's the place for this workflow's settings (`default-resources`, `set-resources`,
240
+ `software-deployment-method`, `retries`; see [Tuning jobs](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#tuning-jobs)), while
241
+ the global `smkflex` profile holds what every workflow shares (queue, bucket, roles).
242
+
243
+ Push whatever files and folders your rules and sample sheets name (`smkflex push reads
244
+ samples.tsv`), and pull whichever outputs you want (`smkflex pull results/qc`). Both skip files
245
+ that are already up to date (`--dry-run` lists what would be transferred) and also take absolute
246
+ paths (see [Coming from a cluster](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/guide.md#coming-from-a-cluster)). Paths that leave the
247
+ project folder (`../raw`) can't be mapped to storage; use an absolute path for those. If
248
+ something you push isn't git-ignored, `push` warns you, since `smkflex run` would otherwise send
249
+ it along with the workflow.
250
+
251
+ `export SNAKEMAKE_PROFILE=smkflex` saves typing `--profile` every time. Everything in the
252
+ [Snakemake docs](https://snakemake.readthedocs.io) applies, with the exceptions listed under
253
+ [Limits](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/reference.md#limits). `examples/conformance/` has one small workflow per feature
254
+ (scripts, conda, checkpoints, Fargate, ...).
255
+
256
+ ### Resources per rule
257
+
258
+ Each job's size, queue and other Batch settings come from its rule. This example sets every
259
+ option in the table below; a real rule only needs the few it uses:
260
+
261
+ ```python
262
+ rule align:
263
+ input: "data/{sample}.fq"
264
+ output: "results/{sample}.sam"
265
+ container: "docker://quay.io/biocontainers/bwa:0.7.17--h7132678_9"
266
+ threads: 8
267
+ retries: 4
268
+ resources:
269
+ mem_mb=16000,
270
+ runtime=120, # minutes
271
+ batch_shm_mb=4096, # EC2 only
272
+ disk_mb=100000, # Fargate only
273
+ gpu=1, # needs a queue with GPU instances
274
+ batch_queue="smkflex-big-queue",
275
+ batch_platform="ec2", # only if the queue can't be looked up
276
+ batch_tags="stage=align,project=rnaseq",
277
+ batch_spot_retries=3, # Spot queues
278
+ batch_priority=500, # fair-share queues
279
+ batch_script_python="host", # script: rules only
280
+ # batch_entrypoint='["python3"]', # only if the image's registry can't be read
281
+ # batch_job_definition="my-jobdef", # instead of the plugin's own; it then sets the image
282
+ shell: "bwa mem -t {threads} ref.fa {input} > {output}"
283
+ ```
284
+
285
+ | On the rule | Value | Default | What it does on AWS |
286
+ |---|---|---|---|
287
+ | `container:` | image, e.g. `"docker://quay.io/biocontainers/bwa:0.7.17--h7132678_9"` | *the `default-image` setting* | The image the job runs in. Any registry works (Docker Hub, quay.io, ghcr.io, ECR, ...); `docker://` is optional. Pin a version tag rather than `latest`. Images with an `ENTRYPOINT` work too: Batch can't override it, so the plugin reads it from the registry and builds a command it will run. |
288
+ | `threads:` | whole number of vCPUs | `1` | vCPUs requested. On EC2, a job bigger than the largest instance type the queue allows waits forever (the plugin warns after `runnable-warn-minutes`). On Fargate, vCPUs and memory are rounded up to the nearest size Fargate offers (at most 16 vCPUs and 120 GiB). |
289
+ | `mem_mb` or `mem_mib` (or `mem`) | whole MB or MiB, e.g. `mem_mb=16000`; or `mem="16G"` | *`default-resources`, else 2048 MiB* | Memory requested, a hard limit. 256 MiB is added for the Snakemake process in the job (`mem-overhead-mib`). A job that exceeds it is killed; with `retries` set, it's retried with twice the memory, then four times (`oom-memory-factor`). The end-of-run table shows what each rule really used. |
290
+ | `retries:` (a rule directive) | whole number | *Snakemake's `retries`, else 0* | Snakemake's usual retries (or `retries: 2` in the profile for every rule). A job that ran out of memory gets more on each retry (`oom-memory-factor`), unless the rule scales memory itself with `attempt`, e.g. `mem_mb=lambda wildcards, attempt: 4000 * attempt`; then its own figure is used as is. Jobs that lost their Spot instance are restarted by Batch instead (`batch_spot_retries`) and don't use these up. |
291
+ | `runtime` | minutes, or a string such as `"2h"` or `"90m"` | *no timeout* | Batch stops the job after this long (at least 1 minute). To give every rule a timeout, put `runtime` in `default-resources`. |
292
+ | `batch_shm_mb` | MiB, more than 0 | *Docker's 64 MB* | EC2 only: the size of `/dev/shm`, for tools that use shared memory, e.g. bwa-mem2 or PyTorch data loaders. What's stored there counts towards `mem_mb`. `shared_memory_size_mb` (the aws-batch plugin's name) also works. |
293
+ | `disk_mb` or `disk_mib` (or `disk`) | whole MB or MiB, e.g. `disk_mb=100000`; or `disk="100G"` | *twice the job's input size (Snakemake's default)* | Fargate only: scratch disk for the job, rounded up to 25 GiB steps, at most 200 GiB; jobs get at least 20 GiB (or `ephemeral-storage-gib`). Ignored on EC2, where jobs share their instance's disk (see [Limits](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/reference.md#limits)). |
294
+ | `gpu` | whole number of GPUs | *none* | GPUs requested. Needs a queue with GPU instances; not on Fargate. Untested. |
295
+ | `batch_queue` | queue name | *the `queue` setting* | Send this rule to another queue. EC2, Spot and Fargate queues can be mixed in one workflow; the plugin detects which is which. |
296
+ | `batch_platform` | `"ec2"` or `"fargate"` | *detected from the queue* | Force the platform; only needed if the plugin isn't allowed to describe the queue. |
297
+ | `batch_tags` | `"KEY=VALUE,KEY2=VALUE2"` | *none* | Extra tags on this rule's jobs, e.g. for cost reports. They override profile `tags` with the same key. |
298
+ | `batch_spot_retries` | whole number, `0` to `9` | *the `spot-retries` setting (2)* | How many times Batch restarts this rule's job if its Spot instance is reclaimed. `aws_batch_spot_attempts` (retries + 1, `1` to `10`; the aws-batch plugin's name) also works. |
299
+ | `batch_priority` | whole number, `0` to `9999` | *the `scheduling-priority` setting* | Scheduling priority, higher first. Only on queues with a fair-share policy. `aws_batch_scheduling_priority` also works. |
300
+ | `batch_job_definition` | job definition name, `name:revision` or ARN | *the `job-definition` setting* | Use an existing job definition for this rule; it decides the image (see the `job-definition` setting). |
301
+ | `batch_script_python` | `"image"` or `"host"` | *the `script-python` setting (`image`)* | For Python `script:` rules: `"host"` uses Snakemake's own Python instead of the image's. |
302
+ | `batch_entrypoint` | the image's `ENTRYPOINT` as a JSON list, e.g. `'["python3"]'`; `'[]'` for none | *read from the registry* | Only for when the plugin can't read the entrypoint from the registry (it then warns at the start): a private registry without `registry-credentials`, or no network access to it. |
303
+
304
+ To change resources without editing the Snakefile (for a published pipeline, say), use
305
+ `set-resources`, `set-threads` and `default-resources` in the project profile:
306
+
307
+ ```yaml
308
+ default-resources: [mem_mb=4000] # rules that set no memory
309
+ max-threads: 8 # caps rules written for big cluster nodes
310
+ set-resources:
311
+ align:
312
+ batch_queue: smkflex-big-queue
313
+ mem_mb: 32000
314
+ ```
315
+
316
+ These work as usual, and each has a small example in `examples/conformance/`: `shell:`;
317
+ `script:` in Python, R or bash; `run:`; `conda:` and `wrapper:`; `retries` and resources that
318
+ scale with `attempt`; `group:` (a group runs as one Batch job, so its rules must share an
319
+ image); checkpoints, `temp()`, `directory()`, `shadow:`, `log:` and `benchmark:`.
320
+
321
+ ### Most-used settings
322
+
323
+ Plugin settings go in a profile as `aws-batch-flex-NAME: value`, or on the command line as
324
+ `--aws-batch-flex-NAME value`; `setup.sh` writes the usual ones. The ones most often changed:
325
+
326
+ | Setting (`aws-batch-flex-...`) | Value | What it's for |
327
+ |---|---|---|
328
+ | `queue` | queue name | The Batch queue jobs go to. |
329
+ | `default-image` | image | The image for rules without `container:`. |
330
+ | `conda-cache` | `instance` (default), `none` or an `s3://` URL | Reuse built conda envs: shared per instance by default; an S3 URL also keeps a copy in S3 for later runs. |
331
+ | `oom-memory-factor` | number, `1` or more (default `2`) | How much more memory a job gets when it's retried after running out. |
332
+ | `spot-retries` | `0` to `9` (default `2`) | How many times Batch restarts a job whose Spot instance was reclaimed. |
333
+ | `tags` | list of `KEY=VALUE` | Extra tags on every job, e.g. to break costs down by project. |
334
+
335
+ All of them, with their defaults, are in the [Reference](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/reference.md#profile-settings).
336
+
337
+ ## AI assistance
338
+
339
+ This plugin was developed with an AI coding assistant (Claude Code, Anthropic), which wrote
340
+ code, tests and documentation under my direction. I designed the approach, reviewed the
341
+ changes, and ran the workflows listed under
342
+ [What's been tested](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/docs/reference.md#whats-been-tested) on real AWS Batch. I maintain the
343
+ plugin and am responsible for it; please report problems as
344
+ [issues](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/issues).
345
+
346
+ ## License
347
+
348
+ MIT, see [LICENSE](https://github.com/SSmith-NUIG/snakemake-executor-plugin-aws-batch-flex/blob/main/LICENSE).