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.
- {patchworks-2.6.6 → patchworks-2.6.7}/PKG-INFO +1 -1
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/snakemake.md +7 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_run_multi.py +13 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/relate.py +18 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/.github/workflows/docs.yml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/.github/workflows/lint.yml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/.github/workflows/release.yml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/.gitignore +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/.markdownlint-cli2.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/LICENSE +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/README.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/cliff.toml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/chunks.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/cluster.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/io.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/merge_tile_labels.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/cellpose.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/dog.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/napari.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/plugins/ome_zarr.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/postprocess.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/relabel.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/api/tile_process.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/assets/logo.png +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_2d.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_2d.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_3d.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/cellpose_3d.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/custom.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/custom_method.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/dog.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/dog.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/standalone_merge.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/stardist.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/examples/stardist_2d.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/getting_started.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/custom_segmentation.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/gpu_distributed.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/label_relations.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/measurements.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/merging.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/ome_zarr_napari.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/performance.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/pitfalls.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/skip_empty.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/guide/tiling.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/docs/index.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/mkdocs.yml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/pyproject.toml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/__init__.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_chunks.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_cluster.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_core.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_distributed.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_gpu.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_io.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_merge.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_notify.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_occupancy.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_postprocess.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_progress.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_relabel.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/_relations.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/__init__.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/cellpose.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/dog.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/napari.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/src/patchworks/plugins/ome_zarr.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_allocation.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_core.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_distributed.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_dog.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_gpu.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_napari.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_notify.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_occupancy.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_ome_zarr.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_postprocess.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_progress.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/tests/test_relations.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/README.md +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/Snakefile +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/common.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config_cilia.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config_cyto.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/config_nuclei.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/config/multi.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/pixi.toml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/profile/slurm/config.yaml +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/common.smk +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/convert.smk +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/merge.smk +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/rules/segment.smk +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/_pw.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/build_occupancy.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/convert.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/fetch_model.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/merge.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/prepare_tiles.py +0 -0
- {patchworks-2.6.6 → patchworks-2.6.7}/workflow/scripts/run_multi.py +0 -0
- {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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|