Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mmcore sha and add ParallelDeviceInitialization feature flag to stub #127

Merged
merged 8 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
python -m pip install numpy${{ matrix.numpy }}

- name: Run tests
run: pytest -v
run: pytest -v tests --color=yes

build_wheels:
if: github.event_name != 'pull_request'
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ recursive-include mmCoreAndDevices/MMDevice *.h *.cpp
recursive-include mmCoreAndDevices/MMCore *.h *.cpp

prune mmCoreAndDevices/MMDevice/unittest
prune mmCoreAndDevices/tools
prune mmCoreAndDevices/MMCore/unittest
prune mmCoreAndDevices/MMCoreJ_wrap
prune mmCoreAndDevices/DeviceAdapters
Expand Down
2 changes: 1 addition & 1 deletion mmCoreAndDevices
Submodule mmCoreAndDevices updated 244 files
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://peps.python.org/pep-0517/
[build-system]
requires = ["setuptools ==72.1.0", "swig >=4.1", "numpy>=2.0.0"]
requires = ["setuptools ==72.1.0", "swig ==4.2.1", "numpy>=2.0.0"]
build-backend = "setuptools.build_meta"

# https://peps.python.org/pep-0621/
Expand Down
20 changes: 16 additions & 4 deletions src/pymmcore/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ PixelSizeConfigName = NewType("PixelSizeConfigName", str)
StateLabel = NewType("StateLabel", str)
"""User-defined label for a specific state in a state device."""

FeatureFlag = Literal[
"StrictInitializationChecks",
"ParallelDeviceInitialization",
]

class CMMCore:
def __init__(self) -> None: ...
def addGalvoPolygonVertex(
Expand Down Expand Up @@ -336,9 +341,7 @@ class CMMCore:
"""Enable or disable logging of debug messages."""
# the Literal hint helps people know what the valid options are, but the fallback
# to str makes it more future proof so that it's still valid to enter any string
def enableFeature(
self, name: Literal["StrictInitializationChecks"] | str, enable: bool
) -> None:
def enableFeature(self, name: FeatureFlag | str, enable: bool) -> None:
"""Enable or disable the given Core feature.

Core features control whether experimental functionality (which is subject
Expand All @@ -351,6 +354,11 @@ class CMMCore:
attempted on a device that is not successfully initialized. When disabled,
no exception is thrown and a warning is logged (and the operation may
potentially cause incorrect behavior or a crash).
- "ParallelDeviceInitialization" (default: enabled) When enabled, serial ports
are initialized in serial order, and all other devices are in parallel, using
multiple threads, one per device module. Early testing shows this to be
reliable, but switch this off when issues are encountered during
device initialization.
"""
def enableStderrLog(self, enable: bool) -> None:
"""Enables or disables log message display on the standard console."""
Expand Down Expand Up @@ -771,7 +779,11 @@ class CMMCore:
def incrementalFocus(self) -> None:
"""Performs incremental focus for the one-shot focusing device."""
def initializeAllDevices(self) -> None:
"""Calls Initialize() method for each loaded device."""
"""Calls Initialize() method for each loaded device.

See `ParallelDeviceInitialization` feature flag for controlling the order of
initialization.
"""
def initializeCircularBuffer(self) -> None:
"""Initialize circular buffer based on the current camera settings."""
def initializeDevice(self, label: DeviceLabel | str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/pymmcore/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "11.1.1.71.4.dev0"
__version__ = "11.2.1.71.0.dev0"
Loading