bindsight 0.3.5__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 (396) hide show
  1. bindsight-0.3.5/.dockerignore +14 -0
  2. bindsight-0.3.5/.editorconfig +18 -0
  3. bindsight-0.3.5/.gitattributes +17 -0
  4. bindsight-0.3.5/.github/CODEOWNERS +2 -0
  5. bindsight-0.3.5/.github/ISSUE_TEMPLATE/bug_report.yml +84 -0
  6. bindsight-0.3.5/.github/ISSUE_TEMPLATE/config.yml +9 -0
  7. bindsight-0.3.5/.github/ISSUE_TEMPLATE/reproducibility.yml +68 -0
  8. bindsight-0.3.5/.github/PULL_REQUEST_TEMPLATE.md +28 -0
  9. bindsight-0.3.5/.github/dependabot.yml +50 -0
  10. bindsight-0.3.5/.github/workflows/ci.yml +168 -0
  11. bindsight-0.3.5/.github/workflows/docker.yml +65 -0
  12. bindsight-0.3.5/.github/workflows/docs.yml +55 -0
  13. bindsight-0.3.5/.github/workflows/draft-pdf.yml +59 -0
  14. bindsight-0.3.5/.github/workflows/manuscript-pdf.yml +80 -0
  15. bindsight-0.3.5/.github/workflows/release-artifacts.yml +88 -0
  16. bindsight-0.3.5/.gitignore +133 -0
  17. bindsight-0.3.5/ARCHITECTURE.md +536 -0
  18. bindsight-0.3.5/CHANGELOG.md +2757 -0
  19. bindsight-0.3.5/CITATION.cff +42 -0
  20. bindsight-0.3.5/CODE_OF_CONDUCT.md +132 -0
  21. bindsight-0.3.5/CONTRIBUTING.md +149 -0
  22. bindsight-0.3.5/COPYRIGHT +24 -0
  23. bindsight-0.3.5/Dockerfile +44 -0
  24. bindsight-0.3.5/LICENSE +681 -0
  25. bindsight-0.3.5/LICENSING.md +104 -0
  26. bindsight-0.3.5/PKG-INFO +495 -0
  27. bindsight-0.3.5/README.md +407 -0
  28. bindsight-0.3.5/SECURITY.md +74 -0
  29. bindsight-0.3.5/SUPPORT.md +34 -0
  30. bindsight-0.3.5/Snakefile +173 -0
  31. bindsight-0.3.5/benchmarks/PROVENANCE.md +62 -0
  32. bindsight-0.3.5/benchmarks/README.md +48 -0
  33. bindsight-0.3.5/benchmarks/RUN_ON_KAGGLE.md +173 -0
  34. bindsight-0.3.5/benchmarks/binders.fasta +50 -0
  35. bindsight-0.3.5/benchmarks/binders.tsv +15 -0
  36. bindsight-0.3.5/benchmarks/build_eval_set.py +540 -0
  37. bindsight-0.3.5/benchmarks/calibration/CALIBRATION.md +88 -0
  38. bindsight-0.3.5/benchmarks/calibration/PRECISION.md +140 -0
  39. bindsight-0.3.5/benchmarks/calibration/README.md +321 -0
  40. bindsight-0.3.5/benchmarks/calibration/RESULTS.json +618 -0
  41. bindsight-0.3.5/benchmarks/calibration/analyse.py +1031 -0
  42. bindsight-0.3.5/benchmarks/calibration/prepare_decoy_target.py +97 -0
  43. bindsight-0.3.5/benchmarks/calibration/stage_scrambles.py +237 -0
  44. bindsight-0.3.5/benchmarks/calibration/submit_calibration.py +141 -0
  45. bindsight-0.3.5/benchmarks/calibration/target/Q96NY8_ig_v.pdb +865 -0
  46. bindsight-0.3.5/benchmarks/designer_benchmark/DESIGNER_BENCHMARK.md +152 -0
  47. bindsight-0.3.5/benchmarks/designer_benchmark/README.md +51 -0
  48. bindsight-0.3.5/benchmarks/designer_benchmark/RESULTS.md +29 -0
  49. bindsight-0.3.5/benchmarks/designer_benchmark/RUN_FREE_GPU.md +114 -0
  50. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_0_seq0.fasta +2 -0
  51. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_0_seq0_complex.cif +2566 -0
  52. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_0_seq1.fasta +2 -0
  53. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_0_seq1_complex.cif +2553 -0
  54. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_1_seq0.fasta +2 -0
  55. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_1_seq0_complex.cif +2322 -0
  56. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_1_seq1.fasta +2 -0
  57. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_1_seq1_complex.cif +2281 -0
  58. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_2_seq0.fasta +2 -0
  59. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_2_seq0_complex.cif +2284 -0
  60. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_2_seq1.fasta +2 -0
  61. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_2_seq1_complex.cif +2279 -0
  62. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_3_seq0.fasta +2 -0
  63. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_3_seq0_complex.cif +2453 -0
  64. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_3_seq1.fasta +2 -0
  65. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_3_seq1_complex.cif +2450 -0
  66. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_4_seq0.fasta +2 -0
  67. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_4_seq0_complex.cif +2367 -0
  68. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_4_seq1.fasta +2 -0
  69. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_4_seq1_complex.cif +2328 -0
  70. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_5_seq0.fasta +2 -0
  71. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_5_seq0_complex.cif +2473 -0
  72. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_5_seq1.fasta +2 -0
  73. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_5_seq1_complex.cif +2444 -0
  74. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_6_seq0.fasta +2 -0
  75. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_6_seq0_complex.cif +2304 -0
  76. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_6_seq1.fasta +2 -0
  77. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_6_seq1_complex.cif +2196 -0
  78. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_7_seq0.fasta +2 -0
  79. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_7_seq0_complex.cif +2196 -0
  80. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_7_seq1.fasta +2 -0
  81. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_7_seq1_complex.cif +2183 -0
  82. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_8_seq0.fasta +2 -0
  83. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_8_seq0_complex.cif +2538 -0
  84. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_8_seq1.fasta +2 -0
  85. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_8_seq1_complex.cif +2607 -0
  86. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_9_seq0.fasta +2 -0
  87. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_9_seq0_complex.cif +2696 -0
  88. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_9_seq1.fasta +2 -0
  89. bindsight-0.3.5/benchmarks/designer_benchmark/binders/P04626_binder_9_seq1_complex.cif +2660 -0
  90. bindsight-0.3.5/benchmarks/designer_benchmark/binders/developability.tsv +21 -0
  91. bindsight-0.3.5/benchmarks/designer_benchmark/binders/embedding_coords.tsv +21 -0
  92. bindsight-0.3.5/benchmarks/designer_benchmark/binders/embedding_space.png +0 -0
  93. bindsight-0.3.5/benchmarks/designer_benchmark/binders/metrics.jsonl +20 -0
  94. bindsight-0.3.5/benchmarks/designer_benchmark/embed_binders.py +60 -0
  95. bindsight-0.3.5/benchmarks/designer_benchmark/prepare_erbb2_target.py +73 -0
  96. bindsight-0.3.5/benchmarks/designer_benchmark/results.json +46 -0
  97. bindsight-0.3.5/benchmarks/designer_benchmark/score_developability.py +74 -0
  98. bindsight-0.3.5/benchmarks/designer_benchmark/score_run.py +246 -0
  99. bindsight-0.3.5/benchmarks/designer_benchmark/target/P04626_domain_IV.pdb +1081 -0
  100. bindsight-0.3.5/benchmarks/gpu_capacity/README.md +40 -0
  101. bindsight-0.3.5/benchmarks/gpu_capacity/t4-ca9-377aa.log +475 -0
  102. bindsight-0.3.5/benchmarks/known.tsv +10 -0
  103. bindsight-0.3.5/benchmarks/provenance_join/README.md +88 -0
  104. bindsight-0.3.5/benchmarks/provenance_join/SHA256SUMS +1 -0
  105. bindsight-0.3.5/benchmarks/provenance_join/ro-crate-metadata.json +1862 -0
  106. bindsight-0.3.5/benchmarks/provenance_join/run_manifest.jsonld +473 -0
  107. bindsight-0.3.5/benchmarks/run_designer_benchmark.py +155 -0
  108. bindsight-0.3.5/benchmarks/run_study.py +217 -0
  109. bindsight-0.3.5/benchmarks/sources.json +32 -0
  110. bindsight-0.3.5/benchmarks/study/README.md +38 -0
  111. bindsight-0.3.5/benchmarks/study/RESULTS.md +203 -0
  112. bindsight-0.3.5/benchmarks/study/figures/outcome_classes.png +0 -0
  113. bindsight-0.3.5/benchmarks/study/figures/surfaced_ranks.png +0 -0
  114. bindsight-0.3.5/benchmarks/study/results.json +1589 -0
  115. bindsight-0.3.5/benchmarks/study/run_log.json +152 -0
  116. bindsight-0.3.5/bindsight/README.md +44 -0
  117. bindsight-0.3.5/bindsight/__init__.py +15 -0
  118. bindsight-0.3.5/bindsight/benchmark/__init__.py +71 -0
  119. bindsight-0.3.5/bindsight/benchmark/core.py +497 -0
  120. bindsight-0.3.5/bindsight/benchmark/defaults.py +28 -0
  121. bindsight-0.3.5/bindsight/benchmark/designer_bench.py +899 -0
  122. bindsight-0.3.5/bindsight/benchmark/outcomes.py +508 -0
  123. bindsight-0.3.5/bindsight/benchmark/panel.py +621 -0
  124. bindsight-0.3.5/bindsight/benchmark/rediscovery.py +1153 -0
  125. bindsight-0.3.5/bindsight/benchmark/statistics.py +622 -0
  126. bindsight-0.3.5/bindsight/benchmark/study.py +1153 -0
  127. bindsight-0.3.5/bindsight/benchmark/study_figures.py +164 -0
  128. bindsight-0.3.5/bindsight/benchmark/study_report.py +607 -0
  129. bindsight-0.3.5/bindsight/cli.py +2429 -0
  130. bindsight-0.3.5/bindsight/config.py +451 -0
  131. bindsight-0.3.5/bindsight/cost.py +258 -0
  132. bindsight-0.3.5/bindsight/deg/__init__.py +7 -0
  133. bindsight-0.3.5/bindsight/deg/pydeseq2_runner.py +285 -0
  134. bindsight-0.3.5/bindsight/design/__init__.py +23 -0
  135. bindsight-0.3.5/bindsight/design/_common.py +501 -0
  136. bindsight-0.3.5/bindsight/design/bindcraft.py +78 -0
  137. bindsight-0.3.5/bindsight/design/boltzgen.py +79 -0
  138. bindsight-0.3.5/bindsight/design/developability.py +140 -0
  139. bindsight-0.3.5/bindsight/design/embeddings.py +165 -0
  140. bindsight-0.3.5/bindsight/design/prescreen.py +169 -0
  141. bindsight-0.3.5/bindsight/design/protocol.py +111 -0
  142. bindsight-0.3.5/bindsight/design/rfdiff_mpnn.py +93 -0
  143. bindsight-0.3.5/bindsight/epitopes/__init__.py +7 -0
  144. bindsight-0.3.5/bindsight/epitopes/surface_bind.py +134 -0
  145. bindsight-0.3.5/bindsight/export/__init__.py +7 -0
  146. bindsight-0.3.5/bindsight/export/ro_crate.py +595 -0
  147. bindsight-0.3.5/bindsight/io/__init__.py +19 -0
  148. bindsight-0.3.5/bindsight/io/cbioportal.py +118 -0
  149. bindsight-0.3.5/bindsight/io/gdc.py +343 -0
  150. bindsight-0.3.5/bindsight/io/paths.py +124 -0
  151. bindsight-0.3.5/bindsight/pipelines/__init__.py +9 -0
  152. bindsight-0.3.5/bindsight/pipelines/caveats.py +60 -0
  153. bindsight-0.3.5/bindsight/pipelines/discover.py +1443 -0
  154. bindsight-0.3.5/bindsight/pipelines/full_run.py +410 -0
  155. bindsight-0.3.5/bindsight/plugins.py +335 -0
  156. bindsight-0.3.5/bindsight/provenance/__init__.py +34 -0
  157. bindsight-0.3.5/bindsight/provenance/append.py +199 -0
  158. bindsight-0.3.5/bindsight/provenance/fragments.py +216 -0
  159. bindsight-0.3.5/bindsight/provenance/manifest.py +506 -0
  160. bindsight-0.3.5/bindsight/rank/__init__.py +7 -0
  161. bindsight-0.3.5/bindsight/rank/scoring.py +355 -0
  162. bindsight-0.3.5/bindsight/report/__init__.py +39 -0
  163. bindsight-0.3.5/bindsight/report/format.py +100 -0
  164. bindsight-0.3.5/bindsight/report/html.py +645 -0
  165. bindsight-0.3.5/bindsight/report/showcase.py +653 -0
  166. bindsight-0.3.5/bindsight/report/templates/report.css +67 -0
  167. bindsight-0.3.5/bindsight/report/templates/report.html.j2 +420 -0
  168. bindsight-0.3.5/bindsight/report/theme.py +231 -0
  169. bindsight-0.3.5/bindsight/report/web/__init__.py +35 -0
  170. bindsight-0.3.5/bindsight/report/web/app.py +624 -0
  171. bindsight-0.3.5/bindsight/report/web/static/binder_viewer.js +245 -0
  172. bindsight-0.3.5/bindsight/report/web/static/bindsight.css +455 -0
  173. bindsight-0.3.5/bindsight/report/web/static/charts.js +425 -0
  174. bindsight-0.3.5/bindsight/report/web/static/vendor/3Dmol-min.js +2 -0
  175. bindsight-0.3.5/bindsight/report/web/static/vendor/3Dmol.LICENSE +90 -0
  176. bindsight-0.3.5/bindsight/report/web/static/your_data_check.js +370 -0
  177. bindsight-0.3.5/bindsight/report/web/templates/base.html.j2 +48 -0
  178. bindsight-0.3.5/bindsight/report/web/templates/evidence.html.j2 +341 -0
  179. bindsight-0.3.5/bindsight/report/web/templates/overview.html.j2 +140 -0
  180. bindsight-0.3.5/bindsight/report/web/templates/runs.html.j2 +125 -0
  181. bindsight-0.3.5/bindsight/report/web/templates/try.html.j2 +155 -0
  182. bindsight-0.3.5/bindsight/report/web/templates/your_data.html.j2 +46 -0
  183. bindsight-0.3.5/bindsight/runners/__init__.py +7 -0
  184. bindsight-0.3.5/bindsight/runners/colab.py +158 -0
  185. bindsight-0.3.5/bindsight/runners/job_exec.py +1110 -0
  186. bindsight-0.3.5/bindsight/runners/kaggle.py +425 -0
  187. bindsight-0.3.5/bindsight/runners/kaggle_kernel.py +489 -0
  188. bindsight-0.3.5/bindsight/runners/local_docker.py +154 -0
  189. bindsight-0.3.5/bindsight/runners/mock.py +167 -0
  190. bindsight-0.3.5/bindsight/runners/modal_runner.py +199 -0
  191. bindsight-0.3.5/bindsight/runners/notebook.py +116 -0
  192. bindsight-0.3.5/bindsight/runners/notebook_content.py +217 -0
  193. bindsight-0.3.5/bindsight/runners/protocol.py +81 -0
  194. bindsight-0.3.5/bindsight/runners/source_wheel.py +104 -0
  195. bindsight-0.3.5/bindsight/runners/tools.py +997 -0
  196. bindsight-0.3.5/bindsight/structures/__init__.py +7 -0
  197. bindsight-0.3.5/bindsight/structures/alphafolddb.py +93 -0
  198. bindsight-0.3.5/bindsight/structures/plddt.py +92 -0
  199. bindsight-0.3.5/bindsight/structures/topology.py +227 -0
  200. bindsight-0.3.5/bindsight/surfaceome/__init__.py +42 -0
  201. bindsight-0.3.5/bindsight/surfaceome/data/surfaceome_extended.tsv +4814 -0
  202. bindsight-0.3.5/bindsight/surfaceome/data/surfy_offline.txt +17 -0
  203. bindsight-0.3.5/bindsight/surfaceome/data/surfy_v1.ensembl.tsv +3380 -0
  204. bindsight-0.3.5/bindsight/surfaceome/data/surfy_v1.uniprot.txt +2901 -0
  205. bindsight-0.3.5/bindsight/surfaceome/surfy.py +441 -0
  206. bindsight-0.3.5/bindsight/targets/__init__.py +7 -0
  207. bindsight-0.3.5/bindsight/targets/ensembl_uniprot.py +56 -0
  208. bindsight-0.3.5/bindsight/targets/gtex.py +250 -0
  209. bindsight-0.3.5/bindsight/targets/open_targets.py +239 -0
  210. bindsight-0.3.5/bindsight/validate/__init__.py +7 -0
  211. bindsight-0.3.5/bindsight/validate/af2_ig.py +49 -0
  212. bindsight-0.3.5/bindsight/validate/boltz2.py +256 -0
  213. bindsight-0.3.5/bindsight/validate/chai1r.py +42 -0
  214. bindsight-0.3.5/bindsight/validate/protocol.py +188 -0
  215. bindsight-0.3.5/codemeta.json +73 -0
  216. bindsight-0.3.5/data/surface_bind/README.md +61 -0
  217. bindsight-0.3.5/docs/README.md +41 -0
  218. bindsight-0.3.5/docs/assets/favicon.svg +16 -0
  219. bindsight-0.3.5/docs/assets/figures/outcome_classes.png +0 -0
  220. bindsight-0.3.5/docs/assets/figures/surfaced_ranks.png +0 -0
  221. bindsight-0.3.5/docs/assets/js/binder_viewer.js +245 -0
  222. bindsight-0.3.5/docs/assets/js/your_data_check.js +370 -0
  223. bindsight-0.3.5/docs/assets/logo.svg +21 -0
  224. bindsight-0.3.5/docs/assets/og-image.png +0 -0
  225. bindsight-0.3.5/docs/assets/structures/P04626_binder_0_seq0_complex.cif +2566 -0
  226. bindsight-0.3.5/docs/assets/structures/P04626_binder_0_seq1_complex.cif +2553 -0
  227. bindsight-0.3.5/docs/assets/structures/P04626_binder_1_seq0_complex.cif +2322 -0
  228. bindsight-0.3.5/docs/assets/structures/P04626_binder_1_seq1_complex.cif +2281 -0
  229. bindsight-0.3.5/docs/assets/structures/P04626_binder_2_seq0_complex.cif +2284 -0
  230. bindsight-0.3.5/docs/assets/structures/P04626_binder_2_seq1_complex.cif +2279 -0
  231. bindsight-0.3.5/docs/assets/structures/P04626_binder_3_seq0_complex.cif +2453 -0
  232. bindsight-0.3.5/docs/assets/structures/P04626_binder_3_seq1_complex.cif +2450 -0
  233. bindsight-0.3.5/docs/assets/structures/P04626_binder_4_seq0_complex.cif +2367 -0
  234. bindsight-0.3.5/docs/assets/structures/P04626_binder_4_seq1_complex.cif +2328 -0
  235. bindsight-0.3.5/docs/assets/structures/P04626_binder_5_seq0_complex.cif +2473 -0
  236. bindsight-0.3.5/docs/assets/structures/P04626_binder_5_seq1_complex.cif +2444 -0
  237. bindsight-0.3.5/docs/assets/structures/P04626_binder_6_seq0_complex.cif +2304 -0
  238. bindsight-0.3.5/docs/assets/structures/P04626_binder_6_seq1_complex.cif +2196 -0
  239. bindsight-0.3.5/docs/assets/structures/P04626_binder_7_seq0_complex.cif +2196 -0
  240. bindsight-0.3.5/docs/assets/structures/P04626_binder_7_seq1_complex.cif +2183 -0
  241. bindsight-0.3.5/docs/assets/structures/P04626_binder_8_seq0_complex.cif +2538 -0
  242. bindsight-0.3.5/docs/assets/structures/P04626_binder_8_seq1_complex.cif +2607 -0
  243. bindsight-0.3.5/docs/assets/structures/P04626_binder_9_seq0_complex.cif +2696 -0
  244. bindsight-0.3.5/docs/assets/structures/P04626_binder_9_seq1_complex.cif +2660 -0
  245. bindsight-0.3.5/docs/assets/vendor/3Dmol-min.js +2 -0
  246. bindsight-0.3.5/docs/assets/vendor/3Dmol.LICENSE +90 -0
  247. bindsight-0.3.5/docs/colab-design-howto.md +223 -0
  248. bindsight-0.3.5/docs/glossary.md +62 -0
  249. bindsight-0.3.5/docs/how-to-use.md +288 -0
  250. bindsight-0.3.5/docs/index.md +168 -0
  251. bindsight-0.3.5/docs/positioning.md +84 -0
  252. bindsight-0.3.5/docs/results.md +226 -0
  253. bindsight-0.3.5/docs/robots.txt +4 -0
  254. bindsight-0.3.5/docs/stylesheets/extra.css +347 -0
  255. bindsight-0.3.5/docs/try-your-data.md +39 -0
  256. bindsight-0.3.5/docs/use-cases.md +178 -0
  257. bindsight-0.3.5/docs/what-is-bindsight.md +356 -0
  258. bindsight-0.3.5/envs/README.md +26 -0
  259. bindsight-0.3.5/envs/constraints.txt +50 -0
  260. bindsight-0.3.5/envs/discover.yaml +36 -0
  261. bindsight-0.3.5/examples/README.md +29 -0
  262. bindsight-0.3.5/examples/benchmark_held_out.yaml +92 -0
  263. bindsight-0.3.5/examples/demo/config.yaml +54 -0
  264. bindsight-0.3.5/examples/provenance_join.yaml +110 -0
  265. bindsight-0.3.5/examples/tcga_luad.yaml +88 -0
  266. bindsight-0.3.5/mkdocs.yml +89 -0
  267. bindsight-0.3.5/overrides/main.html +79 -0
  268. bindsight-0.3.5/paper/LICENSE +414 -0
  269. bindsight-0.3.5/paper/README.md +356 -0
  270. bindsight-0.3.5/paper/biorxiv/manuscript.tex +483 -0
  271. bindsight-0.3.5/paper/paper.bib +214 -0
  272. bindsight-0.3.5/paper/paper.md +219 -0
  273. bindsight-0.3.5/paper/validation/manuscript.md +342 -0
  274. bindsight-0.3.5/pyproject.toml +322 -0
  275. bindsight-0.3.5/requirements.txt +29 -0
  276. bindsight-0.3.5/scripts/README.md +37 -0
  277. bindsight-0.3.5/scripts/assemble_manifest.py +93 -0
  278. bindsight-0.3.5/scripts/build_docs_results.py +701 -0
  279. bindsight-0.3.5/scripts/build_surfaceome_extension.py +138 -0
  280. bindsight-0.3.5/scripts/build_surfy_gene_map.py +117 -0
  281. bindsight-0.3.5/scripts/build_surfy_list.py +189 -0
  282. bindsight-0.3.5/scripts/check_pinned_environment.py +141 -0
  283. bindsight-0.3.5/scripts/make_og_image.py +171 -0
  284. bindsight-0.3.5/scripts/run_deg.py +87 -0
  285. bindsight-0.3.5/scripts/run_design.py +81 -0
  286. bindsight-0.3.5/scripts/run_discover.py +126 -0
  287. bindsight-0.3.5/scripts/run_rank.py +62 -0
  288. bindsight-0.3.5/scripts/run_report.py +81 -0
  289. bindsight-0.3.5/scripts/run_validate.py +53 -0
  290. bindsight-0.3.5/tests/README.md +44 -0
  291. bindsight-0.3.5/tests/__init__.py +2 -0
  292. bindsight-0.3.5/tests/conftest.py +198 -0
  293. bindsight-0.3.5/tests/fixtures/embeddings/binders_esm2_t6.npy +0 -0
  294. bindsight-0.3.5/tests/fixtures/gtex/gtex_median_subset.gct +9 -0
  295. bindsight-0.3.5/tests/fixtures/plddt/AF-TEST1-F1-model_v6.cif +21 -0
  296. bindsight-0.3.5/tests/fixtures/surface_bind/.commit_sha +1 -0
  297. bindsight-0.3.5/tests/fixtures/surface_bind/sites/P04626/sites.json +4 -0
  298. bindsight-0.3.5/tests/fixtures/tiny_counts.tsv +6 -0
  299. bindsight-0.3.5/tests/fixtures/tiny_design.tsv +7 -0
  300. bindsight-0.3.5/tests/fixtures/topology/P04626.topology.json +1 -0
  301. bindsight-0.3.5/tests/test_alphafolddb_client.py +51 -0
  302. bindsight-0.3.5/tests/test_assemble_manifest.py +134 -0
  303. bindsight-0.3.5/tests/test_author_metadata_agrees.py +243 -0
  304. bindsight-0.3.5/tests/test_backend_capability.py +146 -0
  305. bindsight-0.3.5/tests/test_bare_install.py +226 -0
  306. bindsight-0.3.5/tests/test_benchmark.py +194 -0
  307. bindsight-0.3.5/tests/test_benchmark_indication.py +550 -0
  308. bindsight-0.3.5/tests/test_benchmark_outcomes.py +327 -0
  309. bindsight-0.3.5/tests/test_benchmark_panel.py +297 -0
  310. bindsight-0.3.5/tests/test_benchmark_statistics.py +548 -0
  311. bindsight-0.3.5/tests/test_benchmark_study.py +486 -0
  312. bindsight-0.3.5/tests/test_cache_key_scope.py +223 -0
  313. bindsight-0.3.5/tests/test_calibration_analysis.py +1037 -0
  314. bindsight-0.3.5/tests/test_calibration_staging.py +223 -0
  315. bindsight-0.3.5/tests/test_caveats.py +38 -0
  316. bindsight-0.3.5/tests/test_cbioportal.py +75 -0
  317. bindsight-0.3.5/tests/test_cheap_profile.py +234 -0
  318. bindsight-0.3.5/tests/test_check_pinned_environment.py +167 -0
  319. bindsight-0.3.5/tests/test_cli.py +442 -0
  320. bindsight-0.3.5/tests/test_cli_demo_and_report.py +81 -0
  321. bindsight-0.3.5/tests/test_cli_doctor.py +38 -0
  322. bindsight-0.3.5/tests/test_config.py +338 -0
  323. bindsight-0.3.5/tests/test_contrast.py +797 -0
  324. bindsight-0.3.5/tests/test_correctness_regressions.py +2435 -0
  325. bindsight-0.3.5/tests/test_cost.py +142 -0
  326. bindsight-0.3.5/tests/test_counted_self_claims.py +378 -0
  327. bindsight-0.3.5/tests/test_css_cascade.py +176 -0
  328. bindsight-0.3.5/tests/test_deg_input_validation.py +296 -0
  329. bindsight-0.3.5/tests/test_deg_runner.py +151 -0
  330. bindsight-0.3.5/tests/test_demo_e2e.py +111 -0
  331. bindsight-0.3.5/tests/test_design_target_chain.py +631 -0
  332. bindsight-0.3.5/tests/test_designer_bench.py +601 -0
  333. bindsight-0.3.5/tests/test_designers_validators.py +597 -0
  334. bindsight-0.3.5/tests/test_developability.py +69 -0
  335. bindsight-0.3.5/tests/test_docs_binder_viewer.py +366 -0
  336. bindsight-0.3.5/tests/test_docs_claims.py +2111 -0
  337. bindsight-0.3.5/tests/test_docs_results.py +126 -0
  338. bindsight-0.3.5/tests/test_docs_results_generator.py +304 -0
  339. bindsight-0.3.5/tests/test_documented_commands.py +355 -0
  340. bindsight-0.3.5/tests/test_embeddings.py +135 -0
  341. bindsight-0.3.5/tests/test_empty_is_not_absent.py +136 -0
  342. bindsight-0.3.5/tests/test_ensembl_uniprot.py +27 -0
  343. bindsight-0.3.5/tests/test_enumerations_match_their_source.py +164 -0
  344. bindsight-0.3.5/tests/test_eval_set.py +122 -0
  345. bindsight-0.3.5/tests/test_export_ro_crate.py +377 -0
  346. bindsight-0.3.5/tests/test_failure_taxonomy.py +655 -0
  347. bindsight-0.3.5/tests/test_gdc.py +141 -0
  348. bindsight-0.3.5/tests/test_gpu_capacity_claim.py +137 -0
  349. bindsight-0.3.5/tests/test_gtex.py +119 -0
  350. bindsight-0.3.5/tests/test_job_exec.py +691 -0
  351. bindsight-0.3.5/tests/test_job_exec_retention.py +61 -0
  352. bindsight-0.3.5/tests/test_join_end_to_end.py +264 -0
  353. bindsight-0.3.5/tests/test_joss_paper_sections.py +97 -0
  354. bindsight-0.3.5/tests/test_kaggle_kernel.py +503 -0
  355. bindsight-0.3.5/tests/test_licensing_review.py +75 -0
  356. bindsight-0.3.5/tests/test_manifest.py +525 -0
  357. bindsight-0.3.5/tests/test_manuscript_pdf_workflow.py +247 -0
  358. bindsight-0.3.5/tests/test_manuscript_typesets.py +133 -0
  359. bindsight-0.3.5/tests/test_no_hosted_space.py +445 -0
  360. bindsight-0.3.5/tests/test_no_streamlit.py +319 -0
  361. bindsight-0.3.5/tests/test_no_zenodo.py +274 -0
  362. bindsight-0.3.5/tests/test_non_cancer_cohort.py +168 -0
  363. bindsight-0.3.5/tests/test_notebook_helpers.py +55 -0
  364. bindsight-0.3.5/tests/test_open_targets_client.py +166 -0
  365. bindsight-0.3.5/tests/test_package_imports.py +70 -0
  366. bindsight-0.3.5/tests/test_packaging_pins.py +898 -0
  367. bindsight-0.3.5/tests/test_pipelines_discover.py +557 -0
  368. bindsight-0.3.5/tests/test_pipelines_full_run.py +361 -0
  369. bindsight-0.3.5/tests/test_plddt.py +42 -0
  370. bindsight-0.3.5/tests/test_provenance_join_artifact.py +177 -0
  371. bindsight-0.3.5/tests/test_published_numbers_match_artifacts.py +1459 -0
  372. bindsight-0.3.5/tests/test_rank.py +451 -0
  373. bindsight-0.3.5/tests/test_rediscovery.py +195 -0
  374. bindsight-0.3.5/tests/test_remote_job_durability.py +293 -0
  375. bindsight-0.3.5/tests/test_report_failed_run.py +244 -0
  376. bindsight-0.3.5/tests/test_report_html.py +1005 -0
  377. bindsight-0.3.5/tests/test_report_lazy_import.py +89 -0
  378. bindsight-0.3.5/tests/test_requirements_mirror.py +337 -0
  379. bindsight-0.3.5/tests/test_run_self_contained.py +415 -0
  380. bindsight-0.3.5/tests/test_runners_colab.py +89 -0
  381. bindsight-0.3.5/tests/test_runners_mock.py +35 -0
  382. bindsight-0.3.5/tests/test_runners_modal_local.py +102 -0
  383. bindsight-0.3.5/tests/test_runners_tools.py +250 -0
  384. bindsight-0.3.5/tests/test_showcase.py +263 -0
  385. bindsight-0.3.5/tests/test_silent_success.py +1337 -0
  386. bindsight-0.3.5/tests/test_snakemake_dag.py +225 -0
  387. bindsight-0.3.5/tests/test_study_nulls.py +659 -0
  388. bindsight-0.3.5/tests/test_surface_bind.py +128 -0
  389. bindsight-0.3.5/tests/test_surfy_offline.py +62 -0
  390. bindsight-0.3.5/tests/test_surfy_vendored.py +171 -0
  391. bindsight-0.3.5/tests/test_target_chain_artifact.py +124 -0
  392. bindsight-0.3.5/tests/test_third_party_plugins.py +317 -0
  393. bindsight-0.3.5/tests/test_topology.py +59 -0
  394. bindsight-0.3.5/tests/test_topology_gpi.py +170 -0
  395. bindsight-0.3.5/tests/test_untested_ready_rows.py +404 -0
  396. bindsight-0.3.5/tests/test_web_ui.py +1147 -0
@@ -0,0 +1,14 @@
1
+ .git
2
+ .github
3
+ .venv
4
+ .snakemake
5
+ site/
6
+ runs/
7
+ results/
8
+ data/
9
+ **/__pycache__/
10
+ *.pyc
11
+ .pytest_cache/
12
+ .mypy_cache/
13
+ .ruff_cache/
14
+ paper/
@@ -0,0 +1,18 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ [*.{yaml,yml,json,toml}]
12
+ indent_size = 2
13
+
14
+ [*.md]
15
+ trim_trailing_whitespace = false
16
+
17
+ [Makefile]
18
+ indent_style = tab
@@ -0,0 +1,17 @@
1
+ * text=auto eol=lf
2
+
3
+ *.py text diff=python
4
+ *.md text
5
+ *.yaml text
6
+ *.yml text
7
+ *.toml text
8
+ *.cff text
9
+ Snakefile text
10
+
11
+ # Binary-y data
12
+ *.parquet binary
13
+ *.tar.gz binary
14
+ *.gz binary
15
+ *.zip binary
16
+ *.cif binary
17
+ *.pdb binary
@@ -0,0 +1,2 @@
1
+ # Every change is reviewed by the maintainer.
2
+ * @mikhaeelatefrizk
@@ -0,0 +1,84 @@
1
+ name: Bug report
2
+ description: Something does not work, or works differently from what the docs say.
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for reporting. The most useful bug reports for this project say
9
+ what you ran, what happened, and whether it happens on a clean clone —
10
+ that last one matters, because the defect class this repository keeps
11
+ finding is code that works only on the machine that wrote it.
12
+
13
+ - type: textarea
14
+ id: what-you-ran
15
+ attributes:
16
+ label: The command you ran
17
+ description: Paste it exactly, including flags and the config file if there was one.
18
+ render: shell
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ id: what-happened
24
+ attributes:
25
+ label: What happened
26
+ description: Paste the error or the wrong output. Full traceback if there is one.
27
+ render: shell
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ id: what-expected
33
+ attributes:
34
+ label: What you expected instead
35
+ description: If a document told you to expect something else, link it.
36
+ validations:
37
+ required: true
38
+
39
+ - type: input
40
+ id: version
41
+ attributes:
42
+ label: Version
43
+ description: "Output of `bindsight --version`."
44
+ placeholder: "0.3.5"
45
+ validations:
46
+ required: true
47
+
48
+ - type: textarea
49
+ id: doctor
50
+ attributes:
51
+ label: "`bindsight doctor` output"
52
+ description: >-
53
+ This reports your dependencies, caches and vendored data, and resolves
54
+ most environment questions in one paste.
55
+ render: shell
56
+
57
+ - type: dropdown
58
+ id: install
59
+ attributes:
60
+ label: How you installed it
61
+ options:
62
+ - "git clone + pip install -e"
63
+ - "conda/mamba from envs/discover.yaml"
64
+ - "Docker"
65
+ - "Other"
66
+ validations:
67
+ required: true
68
+
69
+ - type: input
70
+ id: platform
71
+ attributes:
72
+ label: OS and Python version
73
+ placeholder: "Windows 11, Python 3.12"
74
+ validations:
75
+ required: true
76
+
77
+ - type: checkboxes
78
+ id: clean-clone
79
+ attributes:
80
+ label: Does it happen on a clean clone?
81
+ options:
82
+ - label: >-
83
+ I tried it in a fresh clone with a fresh virtualenv (or I cannot,
84
+ and have said why above).
@@ -0,0 +1,9 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Question about using bindsight
4
+ url: https://github.com/mikhaeelatefrizk/bindsight/discussions
5
+ about: >-
6
+ How do I do X, will it work on my data, what does this number mean.
7
+ - name: Security vulnerability
8
+ url: https://github.com/mikhaeelatefrizk/bindsight/security/policy
9
+ about: Please report privately rather than in a public issue.
@@ -0,0 +1,68 @@
1
+ name: A published number does not reproduce
2
+ description: You followed the documented steps and got a different figure.
3
+ labels: ["reproducibility", "bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ This project's whole argument is that its claims are checkable, so a
9
+ number that does not reproduce is a serious bug, not a support question.
10
+ Please report it even if you suspect you did something wrong — an
11
+ instruction that is easy to follow incorrectly is also a defect.
12
+
13
+ - type: input
14
+ id: figure
15
+ attributes:
16
+ label: Which number
17
+ description: The figure as published, and where you read it.
18
+ placeholder: "recall@20 = 1 of 17, in benchmarks/study/RESULTS.md"
19
+ validations:
20
+ required: true
21
+
22
+ - type: input
23
+ id: got
24
+ attributes:
25
+ label: What you got instead
26
+ validations:
27
+ required: true
28
+
29
+ - type: textarea
30
+ id: steps
31
+ attributes:
32
+ label: Exactly what you ran
33
+ description: >-
34
+ Every command, in order. If you followed a document, link it and say
35
+ which step you started from.
36
+ render: shell
37
+ validations:
38
+ required: true
39
+
40
+ - type: dropdown
41
+ id: tier
42
+ attributes:
43
+ label: Which reproduction tier
44
+ description: See "Reproducing the results" in the README.
45
+ options:
46
+ - "1 — regenerate a published page from committed artifacts (offline)"
47
+ - "2 — re-run the rediscovery study (network, CPU-hours)"
48
+ - "3 — re-run the binder design (GPU)"
49
+ validations:
50
+ required: true
51
+
52
+ - type: input
53
+ id: commit
54
+ attributes:
55
+ label: Commit you ran at
56
+ description: "Output of `git rev-parse --short HEAD`."
57
+ validations:
58
+ required: true
59
+
60
+ - type: textarea
61
+ id: environment
62
+ attributes:
63
+ label: Environment
64
+ description: >-
65
+ `bindsight doctor` output, plus the GPU if tier 3. For tier 2, whether
66
+ `data/gdc_cache/` was already populated — a stale cache is the most
67
+ common cause of a moved number.
68
+ render: shell
@@ -0,0 +1,28 @@
1
+ ## What this changes
2
+
3
+ <!-- One paragraph. What was wrong or missing, and what the change does about it. -->
4
+
5
+ ## Why
6
+
7
+ <!-- The reasoning, not a restatement of the diff. If it fixes a defect, say how
8
+ the defect could happen; if it adds a claim, say what backs it. -->
9
+
10
+ ## Checks
11
+
12
+ - [ ] `python -m pytest -q` passes
13
+ - [ ] `ruff check bindsight tests scripts benchmarks` and
14
+ `ruff format --check bindsight tests scripts benchmarks` pass
15
+ - [ ] `mypy bindsight scripts benchmarks` passes
16
+ - [ ] If it changes a published number, the artifact was regenerated and the
17
+ generator produces no diff
18
+ - [ ] If it adds a guard, the guard was **mutation-tested**: the defect
19
+ reintroduced, the guard confirmed to fail, the tree restored
20
+
21
+ ## If this touches a claim
22
+
23
+ - [ ] Every surface stating the affected figure is updated, not just the one I
24
+ was reading
25
+ - [ ] Any withdrawn figure still travels with its withdrawal
26
+
27
+ <!-- The failure this project keeps finding is a change that is correct in the
28
+ file it was made in and leaves five other files asserting the old thing. -->
@@ -0,0 +1,50 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "monthly"
7
+ open-pull-requests-limit: 5
8
+ groups:
9
+ dev-tooling:
10
+ patterns: ["ruff", "mypy", "pytest*", "types-*"]
11
+ # The scientific stack is pinned with upper bounds on purpose: these are the
12
+ # libraries whose release can move a number a run reports. Their updates
13
+ # should be deliberate and accompanied by a re-scored artifact, not merged
14
+ # because CI went green.
15
+ #
16
+ # This list is exactly `SCIENTIFIC_STACK - PRESENTATION_ONLY` from
17
+ # `bindsight/provenance/manifest.py`, which is the project's own declaration
18
+ # of which distributions move a reported number. It was a hand-written
19
+ # subset of six, and had silently stopped covering its category: `pyarrow`,
20
+ # `scikit-learn`, `h5py`, `torch`, `transformers`, `anndata`, `biopython`,
21
+ # `numcodecs` and `zarr` were all outside it. The bot duly opened pull
22
+ # requests for three of them, one of which also proposed widening the
23
+ # `pyarrow<25` bound that exists to keep a published result re-derivable.
24
+ #
25
+ # `matplotlib` is deliberately absent: the manifest records it as
26
+ # presentation-only, so its releases move pixels rather than numbers.
27
+ #
28
+ # `tests/test_packaging_pins.py` asserts this list still equals that
29
+ # declaration, so it cannot quietly fall behind it again.
30
+ ignore:
31
+ - dependency-name: "anndata"
32
+ - dependency-name: "biopython"
33
+ - dependency-name: "formulaic"
34
+ - dependency-name: "formulaic-contrasts"
35
+ - dependency-name: "h5py"
36
+ - dependency-name: "numcodecs"
37
+ - dependency-name: "numpy"
38
+ - dependency-name: "pandas"
39
+ - dependency-name: "pyarrow"
40
+ - dependency-name: "pydeseq2"
41
+ - dependency-name: "scikit-learn"
42
+ - dependency-name: "scipy"
43
+ - dependency-name: "torch"
44
+ - dependency-name: "transformers"
45
+ - dependency-name: "zarr"
46
+
47
+ - package-ecosystem: "github-actions"
48
+ directory: "/"
49
+ schedule:
50
+ interval: "monthly"
@@ -0,0 +1,168 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ lint:
16
+ name: Lint (ruff + mypy)
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v7
20
+ - uses: actions/setup-python@v7
21
+ with:
22
+ python-version: "3.11"
23
+ cache: "pip"
24
+ - name: Install
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e ".[dev,discover,report]"
28
+ - name: Ruff check
29
+ run: ruff check bindsight tests scripts benchmarks
30
+ - name: Ruff format
31
+ run: ruff format --check bindsight tests scripts benchmarks
32
+ # Blocking. pyproject sets strict = true and CI swallowed the result with
33
+ # `|| true`, so 53 errors accumulated unnoticed -- including the arity bug
34
+ # that left the Snakemake front-end dead for five weeks. That front-end is
35
+ # scripts/, which this step did not check: the justification named a
36
+ # directory outside its own scope.
37
+ - name: mypy
38
+ run: mypy bindsight scripts benchmarks
39
+
40
+ test:
41
+ name: Test (Python ${{ matrix.python-version }} on ${{ matrix.os }})
42
+ runs-on: ${{ matrix.os }}
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ os: [ubuntu-latest, macos-latest, windows-latest]
47
+ # 3.13 is here because pyproject's classifiers claim it. An interpreter
48
+ # the project claims and does not test is an untested claim.
49
+ python-version: ["3.11", "3.12", "3.13"]
50
+ steps:
51
+ - uses: actions/checkout@v7
52
+ - uses: actions/setup-python@v7
53
+ with:
54
+ python-version: ${{ matrix.python-version }}
55
+ cache: "pip"
56
+ - name: Install
57
+ run: |
58
+ python -m pip install --upgrade pip
59
+ pip install -e ".[dev,discover,report]"
60
+ # The Snakemake front-end is now exercised in CI. It runs offline via
61
+ # BINDSIGHT_CACHE_DIR and adds ~15 s. Linux only: Snakemake's Windows
62
+ # support is unreliable, and the test skips itself elsewhere, so this
63
+ # keeps the signal trustworthy rather than flaky.
64
+ - name: Install the workflow extra (Linux only)
65
+ if: runner.os == 'Linux'
66
+ run: pip install -e ".[workflow]"
67
+ # Coverage is configured in pyproject and was disabled here by --no-cov,
68
+ # so it had never actually run. It now runs AND gates: --cov-fail-under
69
+ # fails the build if coverage regresses below the floor. Kept a couple of
70
+ # points under the ~77% baseline so ordinary churn doesn't flake, while a
71
+ # real drop (e.g. a whole module left untested) still trips it.
72
+ - name: Pytest (no GPU, no slow)
73
+ run: pytest -m "not gpu and not slow" --maxfail=5 -q --cov-fail-under=75
74
+
75
+ # `envs/constraints.txt` calls itself "the exact versions this release was
76
+ # resolved and tested against". Only the Dockerfile ever applied it; the
77
+ # matrix above installs unpinned, so the pins governed the container and
78
+ # nothing else. That is why a Dependabot PR widening a pyproject range was the
79
+ # only one of four that changed what CI resolved — the others edited a file no
80
+ # job read.
81
+ #
82
+ # The matrix stays unpinned on purpose: it proves the code works across three
83
+ # Pythons and three platforms. This job proves the *recorded* environment
84
+ # still resolves and still produces the committed artifacts, which is the
85
+ # claim the file actually makes.
86
+ pinned:
87
+ name: Pinned environment (constraints.txt)
88
+ runs-on: ubuntu-latest
89
+ steps:
90
+ - uses: actions/checkout@v7
91
+ - uses: actions/setup-python@v7
92
+ with:
93
+ python-version: "3.11"
94
+ cache: "pip"
95
+ - name: Install exactly what the release records
96
+ run: |
97
+ python -m pip install --upgrade pip
98
+ pip install -c envs/constraints.txt -e ".[dev,discover,report]"
99
+ - name: The installed versions are the recorded ones
100
+ run: python scripts/check_pinned_environment.py
101
+ - name: Regenerating the published pages changes nothing
102
+ run: |
103
+ python scripts/build_docs_results.py
104
+ # Every output the generator writes, assets included. It copies
105
+ # figures, the twenty predicted complexes, the vendored viewer and its
106
+ # licence into docs/assets, and the diff once covered only the two
107
+ # markdown files -- so a benchmark re-run that moved a figure but not
108
+ # the prose passed this gate while the committed image silently
109
+ # diverged from the data behind it. The pathspec is the whole
110
+ # directory rather than a list of its subdirectories, for the same
111
+ # reason: a list stops covering what is added after it.
112
+ git diff --exit-code -- docs/results.md docs/glossary.md docs/assets
113
+ # git diff does not see untracked files, and that mattered the moment
114
+ # the generator started writing per-design assets: a re-run that
115
+ # produced a new design would write an uncommitted .cif, the page
116
+ # would offer it, this gate would stay green, and the published site
117
+ # would 404 on the one structure nobody had committed.
118
+ test -z "$(git status --porcelain --untracked-files=all -- docs/assets)"
119
+
120
+ build:
121
+ name: Build wheel + sdist
122
+ runs-on: ubuntu-latest
123
+ needs: [lint, test]
124
+ steps:
125
+ - uses: actions/checkout@v7
126
+ - uses: actions/setup-python@v7
127
+ with:
128
+ python-version: "3.11"
129
+ - name: Install build deps
130
+ run: pip install build twine
131
+ - name: Build
132
+ run: python -m build
133
+ - name: Twine check
134
+ run: twine check dist/*
135
+ - name: Upload artifacts
136
+ uses: actions/upload-artifact@v7
137
+ with:
138
+ name: dist
139
+ path: dist/
140
+
141
+ gate:
142
+ # One check for the branch ruleset on `main` to require.
143
+ #
144
+ # Naming the nine matrix jobs there instead would pin the ruleset to the
145
+ # matrix: add a Python version or drop an OS and those contexts no longer
146
+ # exist, so every merge would wait forever on a check that will never
147
+ # report, and someone would have to edit the ruleset by hand to recover.
148
+ # This job's name never changes.
149
+ #
150
+ # Which makes `needs` the entire guarantee, so it is held to the rest of
151
+ # this file by tests/test_packaging_pins.py rather than by memory.
152
+ name: All CI jobs passed
153
+ runs-on: ubuntu-latest
154
+ needs: [lint, test, pinned, build]
155
+ # Without this the gate is skipped when anything it needs fails, and a
156
+ # skipped required check never reports -- the merge would block on silence
157
+ # rather than on the failure, which reads like an outage.
158
+ if: always()
159
+ steps:
160
+ - name: Every job above must have succeeded
161
+ env:
162
+ RESULTS: ${{ toJSON(needs) }}
163
+ run: |
164
+ printf '%s\n' "$RESULTS"
165
+ if printf '%s' "$RESULTS" | grep -qE '"result": *"(failure|cancelled|skipped)"'; then
166
+ echo "::error::a job this gate depends on did not succeed"
167
+ exit 1
168
+ fi
@@ -0,0 +1,65 @@
1
+ name: Docker
2
+
3
+ # Build the CPU image on every PR (verifies the Dockerfile), and build + push
4
+ # to GHCR on pushes to main / tags.
5
+ on:
6
+ push:
7
+ branches: [main]
8
+ tags: ["v*"]
9
+ pull_request:
10
+ branches: [main]
11
+ workflow_dispatch:
12
+
13
+ env:
14
+ IMAGE: ghcr.io/${{ github.repository }}
15
+
16
+ jobs:
17
+ docker:
18
+ runs-on: ubuntu-latest
19
+ permissions:
20
+ contents: read
21
+ packages: write
22
+ steps:
23
+ - uses: actions/checkout@v7
24
+ - uses: docker/setup-buildx-action@v4
25
+ - name: Log in to GHCR
26
+ if: github.event_name != 'pull_request' && vars.PUBLISH_GHCR == 'true'
27
+ uses: docker/login-action@v4
28
+ with:
29
+ registry: ghcr.io
30
+ username: ${{ github.actor }}
31
+ password: ${{ secrets.GITHUB_TOKEN }}
32
+ - name: Build (and push on non-PR)
33
+ uses: docker/build-push-action@v7
34
+ with:
35
+ context: .
36
+ # Publishing is opt-in. It needs two account-level settings that
37
+ # `permissions:` cannot grant: the ghcr.io package must list this
38
+ # repository under Manage Actions access with role Write (the
39
+ # package predates the current repository object -- the repository
40
+ # was recreated on 2026-09-14 -- and nothing re-links them on its
41
+ # own), and the repository variable PUBLISH_GHCR must be `true`.
42
+ # Until both were done, every push-to-main run failed on
43
+ # `denied: permission_denied: write_package` and none on the build,
44
+ # so a red X reported a settings problem as a code problem on every
45
+ # commit -- which is how a check stops being read at all. The build
46
+ # below runs either way, so a broken Dockerfile still fails here.
47
+ #
48
+ # Both are in place as of 0.3.1. The `org.opencontainers.image.source`
49
+ # label in the Dockerfile keeps the package connected to this
50
+ # repository object from here on.
51
+ push: ${{ github.event_name != 'pull_request' && vars.PUBLISH_GHCR == 'true' }}
52
+ # A version tag on tag pushes. The workflow triggers on `v*` and
53
+ # published only `:latest` and `:<sha>`, so a release produced no
54
+ # tag anyone could pin to — and `:latest` moved under them instead.
55
+ tags: |
56
+ ${{ env.IMAGE }}:latest
57
+ ${{ env.IMAGE }}:${{ github.sha }}
58
+ ${{ startsWith(github.ref, 'refs/tags/') && format('{0}:{1}', env.IMAGE, github.ref_name) || '' }}
59
+ cache-from: type=gha
60
+ cache-to: type=gha,mode=max
61
+ - name: Say so when the image was built but not published
62
+ if: github.event_name != 'pull_request' && vars.PUBLISH_GHCR != 'true'
63
+ run: |
64
+ echo "::notice title=Image built, not published::The image built successfully and was NOT pushed to ghcr.io: the repository variable PUBLISH_GHCR is not 'true'. Publishing also needs the package to list this repository under Manage Actions access with role Write."
65
+
@@ -0,0 +1,55 @@
1
+ name: Docs
2
+
3
+ # Build the mkdocs-material site and publish it to GitHub Pages.
4
+ # Enable once in repo Settings → Pages → Source: "GitHub Actions".
5
+
6
+ on:
7
+ push:
8
+ branches: [main]
9
+ paths:
10
+ - "docs/**"
11
+ - "overrides/**"
12
+ - "mkdocs.yml"
13
+ - ".github/workflows/docs.yml"
14
+ # docs/results.md is generated from the committed benchmark results, so a
15
+ # new benchmark run must republish the site.
16
+ - "benchmarks/**"
17
+ - "bindsight/report/showcase.py"
18
+ - "scripts/build_docs_results.py"
19
+ workflow_dispatch:
20
+
21
+ permissions:
22
+ contents: read
23
+ pages: write
24
+ id-token: write
25
+
26
+ concurrency:
27
+ group: pages
28
+ cancel-in-progress: false
29
+
30
+ jobs:
31
+ build-deploy:
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - uses: actions/checkout@v7
35
+ - uses: actions/setup-python@v7
36
+ with:
37
+ python-version: "3.11"
38
+ cache: "pip"
39
+ # The core install is enough: bindsight.report resolves render_run lazily,
40
+ # so the results generator reaches report/showcase.py without pulling in
41
+ # pandas or jinja2. tests/test_report_lazy_import.py guards that.
42
+ - name: Install docs deps
43
+ run: pip install -e ".[docs]" # the extra exists for exactly this; one place holds the bound
44
+ - name: Regenerate the results page from benchmarks/
45
+ run: python scripts/build_docs_results.py
46
+ # --strict fails the build on broken internal links. It caught nine
47
+ # already-live 404s the first time it was switched on.
48
+ - name: Build site
49
+ run: mkdocs build --strict --site-dir site
50
+ - name: Upload Pages artifact
51
+ uses: actions/upload-pages-artifact@v5
52
+ with:
53
+ path: site
54
+ - name: Deploy to GitHub Pages
55
+ uses: actions/deploy-pages@v5
@@ -0,0 +1,59 @@
1
+ name: Draft PDF (JOSS)
2
+
3
+ on:
4
+ push:
5
+ paths:
6
+ - 'paper/paper.md'
7
+ - 'paper/paper.bib'
8
+ - '.github/workflows/draft-pdf.yml'
9
+ workflow_dispatch:
10
+ release:
11
+ types: [published]
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ paper:
18
+ runs-on: ubuntu-latest
19
+ name: Compile JOSS paper.md to PDF
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ - name: Build draft PDF
23
+ # Pinned to a commit, not to `@master`: whatever lands on that
24
+ # branch would otherwise run here unreviewed, in the workflow that
25
+ # builds the submitted paper. This SHA is what the `v1.0` tag points
26
+ # at and what `master` pointed at when it was pinned, so it is a
27
+ # no-op today. (The repository also carries a typo'd `v.1.0` tag
28
+ # pointing somewhere older -- do not reach for it.)
29
+ uses: openjournals/openjournals-draft-action@85a18372e48f551d8af9ddb7a747de685fbbb01c # v1.0
30
+ with:
31
+ journal: joss
32
+ paper-path: paper/paper.md
33
+ - name: Upload as artifact
34
+ uses: actions/upload-artifact@v7
35
+ with:
36
+ name: paper
37
+ path: paper/paper.pdf
38
+ if-no-files-found: error
39
+
40
+ attach:
41
+ name: Attach to the release
42
+ needs: paper
43
+ if: github.event_name == 'release'
44
+ runs-on: ubuntu-latest
45
+ permissions:
46
+ contents: write
47
+ steps:
48
+ - uses: actions/download-artifact@v8
49
+ with:
50
+ name: paper
51
+ path: paper
52
+ - env:
53
+ GH_TOKEN: ${{ github.token }}
54
+ TAG: ${{ github.event.release.tag_name }}
55
+ # Renamed so the asset says which document it is next to the wheel,
56
+ # the sdist and the bioRxiv manuscript's PDF.
57
+ run: |
58
+ cp paper/paper.pdf "bindsight-${TAG}-joss-paper.pdf"
59
+ gh release upload "$TAG" "bindsight-${TAG}-joss-paper.pdf" --clobber --repo "${{ github.repository }}"