pymmcore-plus 0.11.0__tar.gz → 0.11.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 (80) hide show
  1. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/PKG-INFO +3 -3
  2. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/pyproject.toml +2 -2
  3. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/_cli.py +2 -2
  4. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_mmcore_plus.py +2 -2
  5. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/_engine.py +3 -4
  6. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/metadata/functions.py +2 -2
  7. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_microscope.py +1 -1
  8. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_pixel_size_config.py +1 -1
  9. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/conftest.py +1 -0
  10. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_core.py +1 -1
  11. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_metadata.py +4 -4
  12. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/.gitignore +0 -0
  13. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/LICENSE +0 -0
  14. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/README.md +0 -0
  15. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/__init__.py +0 -0
  16. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/_build.py +0 -0
  17. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/_logger.py +0 -0
  18. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/_util.py +0 -0
  19. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/__init__.py +0 -0
  20. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_adapter.py +0 -0
  21. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_config.py +0 -0
  22. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_config_group.py +0 -0
  23. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_constants.py +0 -0
  24. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_device.py +0 -0
  25. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_metadata.py +0 -0
  26. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_property.py +0 -0
  27. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/_sequencing.py +0 -0
  28. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/events/__init__.py +0 -0
  29. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/events/_device_signal_view.py +0 -0
  30. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/events/_norm_slot.py +0 -0
  31. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/events/_prop_event_mixin.py +0 -0
  32. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/events/_protocol.py +0 -0
  33. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/events/_psygnal.py +0 -0
  34. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/core/events/_qsignals.py +0 -0
  35. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/install.py +0 -0
  36. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/__init__.py +0 -0
  37. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/_protocol.py +0 -0
  38. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/_runner.py +0 -0
  39. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/_thread_relay.py +0 -0
  40. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/events/__init__.py +0 -0
  41. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/events/_protocol.py +0 -0
  42. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/events/_psygnal.py +0 -0
  43. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/events/_qsignals.py +0 -0
  44. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/handlers/_5d_writer_base.py +0 -0
  45. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/handlers/__init__.py +0 -0
  46. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/handlers/_img_sequence_writer.py +0 -0
  47. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/handlers/_ome_tiff_writer.py +0 -0
  48. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/handlers/_ome_zarr_writer.py +0 -0
  49. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/handlers/_tensorstore_handler.py +0 -0
  50. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/mda/handlers/_util.py +0 -0
  51. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/metadata/__init__.py +0 -0
  52. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/metadata/schema.py +0 -0
  53. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/metadata/serialize.py +0 -0
  54. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/__init__.py +0 -0
  55. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_config_file.py +0 -0
  56. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_config_group.py +0 -0
  57. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_core_device.py +0 -0
  58. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_core_link.py +0 -0
  59. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_device.py +0 -0
  60. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/model/_property.py +0 -0
  61. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/py.typed +0 -0
  62. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/src/pymmcore_plus/seq_tester.py +0 -0
  63. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/__init__.py +0 -0
  64. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/io/test_image_sequence_writer.py +0 -0
  65. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/io/test_ome_tiff.py +0 -0
  66. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/io/test_zarr_writers.py +0 -0
  67. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/local_config.cfg +0 -0
  68. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_adapter_class.py +0 -0
  69. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_bench.py +0 -0
  70. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_cli.py +0 -0
  71. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_config_group_class.py +0 -0
  72. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_device_class.py +0 -0
  73. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_events.py +0 -0
  74. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_mda.py +0 -0
  75. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_misc.py +0 -0
  76. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_model.py +0 -0
  77. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_pixel_config_class.py +0 -0
  78. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_property_class.py +0 -0
  79. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_sequencing.py +0 -0
  80. {pymmcore_plus-0.11.0 → pymmcore_plus-0.11.1}/tests/test_thread_relay.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymmcore-plus
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: pymmcore superset providing improved APIs, event handling, and a pure python acquisition engine
5
5
  Project-URL: Source, https://github.com/pymmcore-plus/pymmcore-plus
6
6
  Project-URL: Tracker, https://github.com/pymmcore-plus/pymmcore-plus/issues
@@ -53,7 +53,7 @@ Requires-Dist: mkdocstrings-python==1.1.2; extra == 'docs'
53
53
  Requires-Dist: mkdocstrings==0.22.0; extra == 'docs'
54
54
  Provides-Extra: io
55
55
  Requires-Dist: tifffile>=2021.6.14; extra == 'io'
56
- Requires-Dist: zarr>=2.2; extra == 'io'
56
+ Requires-Dist: zarr<3,>=2.2; extra == 'io'
57
57
  Provides-Extra: test
58
58
  Requires-Dist: msgpack; extra == 'test'
59
59
  Requires-Dist: msgspec; extra == 'test'
@@ -65,7 +65,7 @@ Requires-Dist: rich; extra == 'test'
65
65
  Requires-Dist: tifffile>=2021.6.14; extra == 'test'
66
66
  Requires-Dist: typer>=0.4.2; extra == 'test'
67
67
  Requires-Dist: xarray; extra == 'test'
68
- Requires-Dist: zarr>=2.2; extra == 'test'
68
+ Requires-Dist: zarr<3,>=2.2; extra == 'test'
69
69
  Description-Content-Type: text/markdown
70
70
 
71
71
  # pymmcore-plus
@@ -52,7 +52,7 @@ dependencies = [
52
52
  # https://peps.python.org/pep-0621/#dependencies-optional-dependencies
53
53
  [project.optional-dependencies]
54
54
  cli = ["typer >=0.4.2", "rich >=10.2.0"]
55
- io = ["tifffile >=2021.6.14", "zarr >=2.2"]
55
+ io = ["tifffile >=2021.6.14", "zarr >=2.2,<3"]
56
56
  test = [
57
57
  "msgspec",
58
58
  "msgpack",
@@ -63,7 +63,7 @@ test = [
63
63
  "rich",
64
64
  "typer >=0.4.2",
65
65
  "tifffile >=2021.6.14",
66
- "zarr >=2.2",
66
+ "zarr >=2.2,<3",
67
67
  "xarray",
68
68
  ]
69
69
  dev = ["ipython", "mypy", "pdbpp", "pre-commit", "ruff", "tensorstore-stubs"]
@@ -31,7 +31,7 @@ def _show_version_and_exit(value: bool) -> None:
31
31
  import pymmcore
32
32
 
33
33
  typer.echo(f"pymmcore-plus v{pymmcore_plus.__version__}")
34
- typer.echo(f"pymmcore v{pymmcore.__version__}") # type: ignore [attr-defined]
34
+ typer.echo(f"pymmcore v{pymmcore.__version__}")
35
35
  typer.echo(f"MMCore v{pymmcore.CMMCore().getAPIVersionInfo()}")
36
36
  raise typer.Exit()
37
37
 
@@ -53,7 +53,7 @@ def _main(
53
53
  # fix for windows CI encoding and emoji printing
54
54
  if getattr(sys.stdout, "encoding", None) != "utf-8":
55
55
  with suppress(AttributeError):
56
- sys.stdout.reconfigure(encoding="utf-8") # type: ignore [attr-defined]
56
+ sys.stdout.reconfigure(encoding="utf-8") # type: ignore [union-attr]
57
57
 
58
58
 
59
59
  if "mkdocs" in sys.argv[0]: # pragma: no cover
@@ -1594,7 +1594,7 @@ class CMMCorePlus(pymmcore.CMMCore):
1594
1594
 
1595
1595
  try:
1596
1596
  channel_group = self.getPropertyFromCache("Core", "ChannelGroup")
1597
- channel = self.getCurrentConfigFromCache(channel_group)
1597
+ channel: str = self.getCurrentConfigFromCache(channel_group)
1598
1598
  except Exception:
1599
1599
  channel = "Default"
1600
1600
  tags["Channel"] = channel
@@ -2010,7 +2010,7 @@ class CMMCorePlus(pymmcore.CMMCore):
2010
2010
 
2011
2011
  :sparkles: *This method is new in `CMMCorePlus`.*
2012
2012
  """
2013
- _current = {
2013
+ _current: dict[str, str] = {
2014
2014
  self.getCameraDevice(): "Camera",
2015
2015
  self.getXYStageDevice(): "XYStage",
2016
2016
  self.getFocusDevice(): "Focus",
@@ -54,12 +54,11 @@ class MDAEngine(PMDAEngine):
54
54
  attempt to combine MDAEvents into a single `SequencedEvent` if
55
55
  [`core.canSequenceEvents()`][pymmcore_plus.CMMCorePlus.canSequenceEvents]
56
56
  reports that the events can be sequenced. This can be set after instantiation.
57
- By default, this is `False`, in order to avoid unexpected behavior, particularly
58
- in testing and demo scenarios. But in many "real world" scenarios, this can be
59
- set to `True` to improve performance.
57
+ By default, this is `True`, however in various testing and demo scenarios, you
58
+ may wish to set it to `False` in order to avoid unexpected behavior.
60
59
  """
61
60
 
62
- def __init__(self, mmc: CMMCorePlus, use_hardware_sequencing: bool = False) -> None:
61
+ def __init__(self, mmc: CMMCorePlus, use_hardware_sequencing: bool = True) -> None:
63
62
  self._mmc = mmc
64
63
  self.use_hardware_sequencing = use_hardware_sequencing
65
64
 
@@ -180,7 +180,7 @@ def image_info(core: CMMCorePlus) -> ImageInfo:
180
180
  if (mag_factor := core.getMagnificationFactor()) != 1.0:
181
181
  info["magnification_factor"] = mag_factor
182
182
  if (affine := core.getPixelSizeAffine(True)) != (1.0, 0.0, 0.0, 0.0, 1.0, 0.0):
183
- info["pixel_size_affine"] = affine # type: ignore [typeddict-item]
183
+ info["pixel_size_affine"] = affine
184
184
 
185
185
  with suppress(RuntimeError):
186
186
  if (roi := core.getROI()) != [0, 0, w, h]:
@@ -278,7 +278,7 @@ def pixel_size_config(core: CMMCorePlus, *, config_name: str) -> PixelSizeConfig
278
278
  }
279
279
  affine = core.getPixelSizeAffineByID(config_name)
280
280
  if affine != (1.0, 0.0, 0.0, 0.0, 1.0, 0.0):
281
- info["pixel_size_affine"] = affine # type: ignore [typeddict-item]
281
+ info["pixel_size_affine"] = affine
282
282
  return info
283
283
 
284
284
 
@@ -212,7 +212,7 @@ class Microscope:
212
212
  self.devices = [
213
213
  Device.create_from_core(core, name=name)
214
214
  for name in core.getLoadedDevices()
215
- if name != Keyword.CoreDevice
215
+ if name != Keyword.CoreDevice # type: ignore [comparison-overlap]
216
216
  ]
217
217
  if "core_device" not in exclude:
218
218
  self.core_device.update_from_core(core)
@@ -77,7 +77,7 @@ class PixelSizeGroup(ConfigGroup):
77
77
  preset: PixelSizePreset(
78
78
  name=preset,
79
79
  pixel_size_um=core.getPixelSizeUmByID(preset),
80
- affine=core.getPixelSizeAffineByID(preset), # type: ignore
80
+ affine=core.getPixelSizeAffineByID(preset),
81
81
  settings=[Setting(*d) for d in core.getPixelSizeConfigData(preset)],
82
82
  )
83
83
  for preset in core.getAvailablePixelSizeConfigs()
@@ -23,6 +23,7 @@ except ImportError:
23
23
  @pytest.fixture(params=PARAMS, scope="function")
24
24
  def core(request):
25
25
  core = pymmcore_plus.CMMCorePlus()
26
+ core.mda.engine.use_hardware_sequencing = False
26
27
  if request.param == "psygnal":
27
28
  core._events = CMMCoreSignaler()
28
29
  core.mda._signals = MDASignaler()
@@ -455,7 +455,7 @@ def test_lock_and_callbacks(core: CMMCorePlus, qtbot: "QtBot") -> None:
455
455
 
456
456
  # do some threading silliness here so we don't accidentally hang our
457
457
  # test if things go wrong have to use *got_lock* to check because we
458
- # can't assert in the function as theads don't throw their exceptions
458
+ # can't assert in the function as threads don't throw their exceptions
459
459
  # back into the calling thread.
460
460
  got_lock = False
461
461
 
@@ -85,13 +85,13 @@ def test_metadata_during_mda(
85
85
  @pytest.mark.parametrize("sequenced", [True, False], ids=["sequenced", "not-sequenced"])
86
86
  def test_multicam(core: CMMCorePlus, sequenced: bool) -> None:
87
87
  mc = "YoMulti"
88
- core.loadDevice("Camer2", "DemoCamera", "DCam")
88
+ core.loadDevice("Camera2", "DemoCamera", "DCam")
89
89
  core.loadDevice(mc, "Utilities", "Multi Camera")
90
90
  core.initializeDevice(mc)
91
- core.initializeDevice("Camer2")
92
- core.setProperty("Camer2", "BitDepth", "16")
91
+ core.initializeDevice("Camera2")
92
+ core.setProperty("Camera2", "BitDepth", "16")
93
93
  core.setProperty(mc, "Physical Camera 1", "Camera")
94
- core.setProperty(mc, "Physical Camera 2", "Camer2")
94
+ core.setProperty(mc, "Physical Camera 2", "Camera2")
95
95
  core.setCameraDevice(mc)
96
96
 
97
97
  mda = useq.MDASequence(
File without changes
File without changes