wsi-patching 0.5.1__tar.gz → 0.5.3__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 (101) hide show
  1. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/.github/workflows/integration_tests.yaml +1 -0
  2. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/.github/workflows/unit_tests.yaml +1 -0
  3. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/PKG-INFO +2 -2
  4. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/pyproject.toml +1 -1
  5. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/core/pipeline.py +15 -20
  6. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/.github/workflows/docs.yml +0 -0
  7. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/.github/workflows/publish.yaml +0 -0
  8. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/.gitignore +0 -0
  9. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/LICENSE +0 -0
  10. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/README.md +0 -0
  11. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/docs/concepts.md +0 -0
  12. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/docs/extending.md +0 -0
  13. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/docs/index.md +0 -0
  14. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/docs/installation.md +0 -0
  15. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/docs/quickstart.md +0 -0
  16. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/docs/reference.md +0 -0
  17. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/examples/numpy_stream_writer_demo.py +0 -0
  18. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/examples/torch_stream_writer_demo.py +0 -0
  19. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/examples/webdataset_materialize_writer_demo.py +0 -0
  20. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/mkdocs.yml +0 -0
  21. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/__init__.py +0 -0
  22. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/annotations/__init__.py +0 -0
  23. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/annotations/add_cell_annotation_from_csv.py +0 -0
  24. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/assets/models/cellvit_tissue_detector.pt +0 -0
  25. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/backends/__init__.py +0 -0
  26. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/backends/cupy_numpy.py +0 -0
  27. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/backends/fastslide.py +0 -0
  28. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/backends/torch_device.py +0 -0
  29. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/core/__init__.py +0 -0
  30. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/core/chunking_and_batching.py +0 -0
  31. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/core/types/__init__.py +0 -0
  32. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/core/types/types.py +0 -0
  33. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/core/types/util_types.py +0 -0
  34. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/core/wsi_grid.py +0 -0
  35. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/custom_component/__init__.py +0 -0
  36. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/encoders/__init__.py +0 -0
  37. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/encoders/pngencoder.py +0 -0
  38. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/filtering/__init__.py +0 -0
  39. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/filtering/cellvit_tissue_classifier_filter.py +0 -0
  40. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/filtering/low_contrast_background_filter.py +0 -0
  41. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/filtering/otsu_filter.py +0 -0
  42. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/filtering/pen_artifact_filter.py +0 -0
  43. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/py.typed +0 -0
  44. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/regions_of_interest/__init__.py +0 -0
  45. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/regions_of_interest/attach_rois.py +0 -0
  46. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/regions_of_interest/roi_providers.py +0 -0
  47. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/regions_of_interest/rois.py +0 -0
  48. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/transforms/__init__.py +0 -0
  49. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/transforms/macenko_normalizer.py +0 -0
  50. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/transforms/reinhard_normalizer.py +0 -0
  51. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/utils/__init__.py +0 -0
  52. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/utils/logging_config.py +0 -0
  53. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/utils/meta_typing.py +0 -0
  54. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/utils/profiling.py +0 -0
  55. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/utils/wsi_thumbnail_visualization.py +0 -0
  56. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/__init__.py +0 -0
  57. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/materialize_writers/__init__.py +0 -0
  58. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/materialize_writers/materialize_writer_base.py +0 -0
  59. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/materialize_writers/webdataset/__init__.py +0 -0
  60. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/materialize_writers/webdataset/webdataset_loader.py +0 -0
  61. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/materialize_writers/webdataset/webdataset_writer.py +0 -0
  62. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/stream_writers/__init__.py +0 -0
  63. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/stream_writers/numpy_stream_writer.py +0 -0
  64. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/stream_writers/stream_writer_base.py +0 -0
  65. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/src/wsi_patching/writers/stream_writers/torch_stream_writer.py +0 -0
  66. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/benchmarks/conftest.py +0 -0
  67. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/benchmarks/test_benchmark_pipeline.py +0 -0
  68. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/benchmarks/test_benchmark_png_encoding.py +0 -0
  69. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/benchmarks/test_benchmark_tile_planning.py +0 -0
  70. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/integration/conftest.py +0 -0
  71. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/integration/test_materialize_pipeline.py +0 -0
  72. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/integration/test_resample_pipeline.py +0 -0
  73. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/integration/test_roi_pipeline.py +0 -0
  74. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/integration/test_streaming_pipeline.py +0 -0
  75. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/.gitkeep +0 -0
  76. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/annotations/test_add_cell_annotation_from_csv.py +0 -0
  77. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/backends/test_cupy_numpy.py +0 -0
  78. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/backends/test_fastslide.py +0 -0
  79. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/backends/test_torch_device.py +0 -0
  80. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/core/test_chunking_and_batching.py +0 -0
  81. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/core/test_pipeline.py +0 -0
  82. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/core/test_wsi_grid.py +0 -0
  83. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/filtering/test_cellvit_tissue_classifier_filter.py +0 -0
  84. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/filtering/test_low_contrast_background_filter.py +0 -0
  85. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/filtering/test_otsu_filter.py +0 -0
  86. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/filtering/test_pen_artifact_filter.py +0 -0
  87. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/regions_of_interest/test_attach_rois.py +0 -0
  88. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/regions_of_interest/test_roi_providers.py +0 -0
  89. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/regions_of_interest/test_rois.py +0 -0
  90. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/transforms/test_macenko_normalizer.py +0 -0
  91. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/transforms/test_reinhard_normalizer.py +0 -0
  92. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/utils/test_logging_config.py +0 -0
  93. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/utils/test_meta_typing.py +0 -0
  94. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/utils/test_profiling.py +0 -0
  95. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/writers/materialize_writers/test_materialize_writer_base.py +0 -0
  96. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/writers/materialize_writers/webdataset/test_webdataset_loader.py +0 -0
  97. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/writers/materialize_writers/webdataset/test_webdataset_writer.py +0 -0
  98. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/writers/stream_writers/test_numpy_stream_writer.py +0 -0
  99. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/writers/stream_writers/test_stream_writer_base.py +0 -0
  100. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/tests/unit/src/wsi_patching/writers/stream_writers/test_torch_stream_writer.py +0 -0
  101. {wsi_patching-0.5.1 → wsi_patching-0.5.3}/uv.lock +0 -0
@@ -7,6 +7,7 @@ on:
7
7
  - src/wsi_patching/**
8
8
  - tests/integration/**
9
9
  - .github/workflows/integration_tests.yaml
10
+ - pyproject.toml
10
11
 
11
12
  pull_request:
12
13
  branches: [main]
@@ -7,6 +7,7 @@ on:
7
7
  - src/wsi_patching/**
8
8
  - tests/unit/**
9
9
  - .github/workflows/unit_tests.yaml
10
+ - pyproject.toml
10
11
 
11
12
  pull_request:
12
13
  branches: [main]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wsi-patching
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: A High Performance Patching Library for Digital Pathology AI dataset creation.
5
5
  Project-URL: Homepage, https://github.com/amspath/wsi-patching-pipeline
6
6
  Project-URL: Repository, https://github.com/amspath/wsi-patching-pipeline
@@ -40,7 +40,7 @@ Classifier: Programming Language :: Python :: 3.13
40
40
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
41
41
  Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
42
42
  Requires-Python: <3.14,>=3.10
43
- Requires-Dist: fastslide==0.5.2
43
+ Requires-Dist: fastslide==0.7.3
44
44
  Requires-Dist: numpy>=1.24
45
45
  Requires-Dist: opencv-python-headless>=4.8
46
46
  Requires-Dist: orjson>=3.8
@@ -28,7 +28,7 @@ dependencies = [
28
28
  "numpy>=1.24",
29
29
  "webdataset>=0.2.86",
30
30
  "pillow>=9.0",
31
- "fastslide==0.5.2",
31
+ "fastslide==0.7.3",
32
32
  "orjson>=3.8",
33
33
  "opencv-python-headless>=4.8",
34
34
  "rtree>=1.0",
@@ -46,6 +46,16 @@ def _tname(t: Any) -> str:
46
46
  return str(t)
47
47
 
48
48
 
49
+ def _signal_end_of_queue(queue: Queue, stop_event: Event) -> None:
50
+ while True:
51
+ try:
52
+ queue.put(EndOfQueue(), block=True, timeout=0.5)
53
+ return
54
+ except Full:
55
+ if stop_event.is_set():
56
+ return
57
+
58
+
49
59
  class Stage(ContextAware, metaclass=StageMeta):
50
60
  input_type: Any = object
51
61
  output_type: Any = object
@@ -228,18 +238,12 @@ class Pipeline(Stage):
228
238
  except GeneratorExit:
229
239
  self.log.info("Consumer stopped early; terminating producers.")
230
240
  stop_event.set()
231
- try:
232
- producer_queue.put(EndOfQueue(), block=True, timeout=0.5)
233
- except Exception:
234
- pass
241
+ _signal_end_of_queue(producer_queue, stop_event)
235
242
  stop_all()
236
243
  raise
237
244
  except Exception:
238
245
  stop_event.set()
239
- try:
240
- producer_queue.put(EndOfQueue(), block=True, timeout=0.5)
241
- except Exception:
242
- pass
246
+ _signal_end_of_queue(producer_queue, stop_event)
243
247
  stop_all()
244
248
  raise
245
249
  finally:
@@ -273,10 +277,7 @@ class Pipeline(Stage):
273
277
  self.log.info("Materialization completed.")
274
278
  except Exception:
275
279
  stop_event.set()
276
- try:
277
- producer_queue.put(EndOfQueue(), block=True, timeout=0.5)
278
- except Exception:
279
- pass
280
+ _signal_end_of_queue(producer_queue, stop_event)
280
281
  stop_all()
281
282
  raise
282
283
  finally:
@@ -378,10 +379,7 @@ class Pipeline(Stage):
378
379
  def stop_all():
379
380
  with kill_lock:
380
381
  stop_event.set()
381
- try:
382
- queue.put(EndOfQueue(), block=True, timeout=0.5)
383
- except Exception:
384
- pass
382
+ _signal_end_of_queue(queue, stop_event)
385
383
 
386
384
  def supervisor():
387
385
  try:
@@ -414,10 +412,7 @@ class Pipeline(Stage):
414
412
  received += 1
415
413
  finally:
416
414
  # Always signal writer; avoid blocking forever
417
- try:
418
- queue.put(EndOfQueue(), block=True, timeout=0.5)
419
- except Exception:
420
- pass
415
+ _signal_end_of_queue(queue, stop_event)
421
416
 
422
417
  sup = Thread(target=supervisor, name="supervisor", daemon=True)
423
418
  sup.start()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes