patchworks 2.6.6__tar.gz → 2.6.7__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 (102) hide show
  1. {patchworks-2.6.6 → patchworks-2.6.7}/PKG-INFO +1 -1
  2. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/snakemake.md +7 -0
  3. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_run_multi.py +13 -0
  4. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/relate.py +18 -0
  5. {patchworks-2.6.6 → patchworks-2.6.7}/.github/workflows/docs.yml +0 -0
  6. {patchworks-2.6.6 → patchworks-2.6.7}/.github/workflows/lint.yml +0 -0
  7. {patchworks-2.6.6 → patchworks-2.6.7}/.github/workflows/release.yml +0 -0
  8. {patchworks-2.6.6 → patchworks-2.6.7}/.gitignore +0 -0
  9. {patchworks-2.6.6 → patchworks-2.6.7}/.markdownlint-cli2.yaml +0 -0
  10. {patchworks-2.6.6 → patchworks-2.6.7}/LICENSE +0 -0
  11. {patchworks-2.6.6 → patchworks-2.6.7}/README.md +0 -0
  12. {patchworks-2.6.6 → patchworks-2.6.7}/cliff.toml +0 -0
  13. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/chunks.md +0 -0
  14. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/cluster.md +0 -0
  15. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/io.md +0 -0
  16. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/merge_tile_labels.md +0 -0
  17. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/cellpose.md +0 -0
  18. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/dog.md +0 -0
  19. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/napari.md +0 -0
  20. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/ome_zarr.md +0 -0
  21. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/postprocess.md +0 -0
  22. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/relabel.md +0 -0
  23. {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/tile_process.md +0 -0
  24. {patchworks-2.6.6 → patchworks-2.6.7}/docs/assets/logo.png +0 -0
  25. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_2d.md +0 -0
  26. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_2d.py +0 -0
  27. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_3d.md +0 -0
  28. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_3d.py +0 -0
  29. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/custom.md +0 -0
  30. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/custom_method.py +0 -0
  31. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/dog.md +0 -0
  32. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/dog.py +0 -0
  33. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/standalone_merge.md +0 -0
  34. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/stardist.md +0 -0
  35. {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/stardist_2d.py +0 -0
  36. {patchworks-2.6.6 → patchworks-2.6.7}/docs/getting_started.md +0 -0
  37. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/custom_segmentation.md +0 -0
  38. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/gpu_distributed.md +0 -0
  39. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/label_relations.md +0 -0
  40. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/measurements.md +0 -0
  41. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/merging.md +0 -0
  42. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/ome_zarr_napari.md +0 -0
  43. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/performance.md +0 -0
  44. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/pitfalls.md +0 -0
  45. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/skip_empty.md +0 -0
  46. {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/tiling.md +0 -0
  47. {patchworks-2.6.6 → patchworks-2.6.7}/docs/index.md +0 -0
  48. {patchworks-2.6.6 → patchworks-2.6.7}/mkdocs.yml +0 -0
  49. {patchworks-2.6.6 → patchworks-2.6.7}/pyproject.toml +0 -0
  50. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/__init__.py +0 -0
  51. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_chunks.py +0 -0
  52. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_cluster.py +0 -0
  53. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_core.py +0 -0
  54. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_distributed.py +0 -0
  55. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_gpu.py +0 -0
  56. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_io.py +0 -0
  57. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_merge.py +0 -0
  58. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_notify.py +0 -0
  59. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_occupancy.py +0 -0
  60. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_postprocess.py +0 -0
  61. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_progress.py +0 -0
  62. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_relabel.py +0 -0
  63. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_relations.py +0 -0
  64. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/__init__.py +0 -0
  65. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/cellpose.py +0 -0
  66. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/dog.py +0 -0
  67. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/napari.py +0 -0
  68. {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/ome_zarr.py +0 -0
  69. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_allocation.py +0 -0
  70. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_core.py +0 -0
  71. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_distributed.py +0 -0
  72. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_dog.py +0 -0
  73. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_gpu.py +0 -0
  74. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_napari.py +0 -0
  75. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_notify.py +0 -0
  76. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_occupancy.py +0 -0
  77. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_ome_zarr.py +0 -0
  78. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_postprocess.py +0 -0
  79. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_progress.py +0 -0
  80. {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_relations.py +0 -0
  81. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/README.md +0 -0
  82. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/Snakefile +0 -0
  83. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/common.yaml +0 -0
  84. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config.yaml +0 -0
  85. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config_cilia.yaml +0 -0
  86. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config_cyto.yaml +0 -0
  87. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config_nuclei.yaml +0 -0
  88. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/multi.yaml +0 -0
  89. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/pixi.toml +0 -0
  90. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/profile/slurm/config.yaml +0 -0
  91. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/common.smk +0 -0
  92. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/convert.smk +0 -0
  93. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/merge.smk +0 -0
  94. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/segment.smk +0 -0
  95. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/_pw.py +0 -0
  96. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/build_occupancy.py +0 -0
  97. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/convert.py +0 -0
  98. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/fetch_model.py +0 -0
  99. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/merge.py +0 -0
  100. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/prepare_tiles.py +0 -0
  101. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/run_multi.py +0 -0
  102. {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/segment_tile.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: patchworks
3
- Version: 2.6.6
3
+ Version: 2.6.7
4
4
  Summary: Tiled processing of arbitrarily large images with globally consistent labels
5
5
  Project-URL: Homepage, https://github.com/imcf/patchworks
6
6
  Project-URL: Issues, https://github.com/imcf/patchworks/issues
@@ -415,6 +415,13 @@ results/image.zarr/labels/cyto_labels/
415
415
  up front — mainly useful to keep segmentation itself GPU-efficient
416
416
  across configs, not required for the relate step to work.)
417
417
 
418
+ !!! tip "The relate step's log"
419
+ Unlike `prepare`/`segment`/`merge`, the relate step isn't a Snakemake
420
+ rule, so it doesn't get a `log:` directive for free. It writes its own
421
+ log to `<work_dir>/logs/relate.log` (override with `relate.py --log`),
422
+ the same tee-to-file-and-stdout behaviour as the other steps — check
423
+ there instead of scrolling back through `srun`'s live output.
424
+
418
425
  See [Relating labels across segmentations](label_relations.md) for what
419
426
  `label_relations()` returns and how to save it yourself — the cluster
420
427
  workflow's own automation is below.
@@ -188,6 +188,19 @@ def test_relate_script_has_the_real_bookkeeping():
188
188
  assert "openpyxl" in src
189
189
 
190
190
 
191
+ def test_relate_writes_its_own_log():
192
+ """relate.py runs via srun, not a Snakemake rule -- nothing else wires up
193
+
194
+ its logging (see prepare/segment/merge's `log:` directives), so main()
195
+ has to call start_log() itself or its output only ever streams to
196
+ whatever invoked srun and is gone once that terminal scrolls past it.
197
+ """
198
+ src = (_workflow_dir() / "scripts" / "relate.py").read_text()
199
+ assert "from _pw import start_log" in src
200
+ assert "start_log(" in src
201
+ assert '"logs" / "relate.log"' in src
202
+
203
+
191
204
  def test_relate_rechunks_mismatched_label_arrays(tmp_path):
192
205
  """A chunk-layout mismatch must be rechunked away, not require a re-run.
193
206
 
@@ -10,6 +10,12 @@ e.g. under srun):
10
10
  python scripts/relate.py --work-dir /path/to/work_dir \
11
11
  --image-store /path/to/work_dir/image.zarr \
12
12
  --relations '[{"a": "nuclei_labels", "b": "cyto_labels", "output": "nuclei_to_cyto.xlsx"}]'
13
+
14
+ Unlike prepare/segment/merge, this doesn't run as a Snakemake rule, so nothing
15
+ wires up its own logs/<rule>/*.log by default -- srun just streams output to
16
+ whatever invoked it. main() calls start_log() itself instead, writing to
17
+ <work_dir>/logs/relate.log (override with --log), the same tee-to-file-and-
18
+ stdout behaviour the Snakemake-driven scripts get via _pw.start_log.
13
19
  """
14
20
 
15
21
  from __future__ import annotations
@@ -176,7 +182,19 @@ def main() -> None:
176
182
  "relations:"
177
183
  ),
178
184
  )
185
+ parser.add_argument(
186
+ "--log",
187
+ default=None,
188
+ help="log file path (default: <work-dir>/logs/relate.log)",
189
+ )
179
190
  args = parser.parse_args()
191
+
192
+ from _pw import start_log
193
+
194
+ log_path = args.log or str(Path(args.work_dir) / "logs" / "relate.log")
195
+ start_log(log_path)
196
+ print(f"[relate] logging to {log_path}", flush=True)
197
+
180
198
  run_relations(args.work_dir, args.image_store, json.loads(args.relations))
181
199
 
182
200
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes