Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
856 commits
Select commit Hold shift + click to select a range
e05cb7b
Spell runtime equivalence records as dataclasses
trissim May 17, 2026
686a558
Collapse orientation boundary jitter wrapper
trissim May 17, 2026
6e22106
Remove runtime equivalence cleanup wrappers
trissim May 17, 2026
0ee8e77
Centralize expected measurement fact completion
trissim May 17, 2026
677ebc5
Use pair derivation contract directly
trissim May 17, 2026
cd2048e
Use threshold pair tolerance contract directly
trissim May 17, 2026
2529335
Centralize measurement feature category priority
trissim May 17, 2026
445556d
Update runtime equivalence refactor queue
trissim May 17, 2026
02ffba0
Normalize aggregate shape descriptor semantics
trissim May 17, 2026
f81fcb9
Own required runtime measurement projection
trissim May 17, 2026
cdb2af8
Own sparse object boundary equivalence
trissim May 17, 2026
820a36a
Name runtime row and feature semantics
trissim May 17, 2026
d53562b
Own runtime row value predicates
trissim May 17, 2026
15bb23a
Own runtime measurement subject projection
trissim May 17, 2026
1ec0d63
Own semantic measurement name projection
trissim May 17, 2026
e5f6317
Own measurement normalization boundaries
trissim May 17, 2026
16d8e0e
Own runtime equivalence projection boundaries
trissim May 17, 2026
09e51bd
Eliminate runtime equivalence advisor debt
trissim May 17, 2026
668795c
Plan remaining OpenHCS refactor sequences
trissim May 17, 2026
bea5286
Clean up source assignment model semantics
trissim May 17, 2026
35ef743
Split ZMQ debug control and progress boundaries
trissim May 17, 2026
5ca89da
Decompose ZMQ orchestrator execution phases
trissim May 17, 2026
6611508
Extract GUI widget workflow services
trissim May 17, 2026
2e95f81
Cover debug GUI paused-worker workflow
trissim May 17, 2026
60e5112
Trim CellProfiler runtime compatibility reexports
trissim May 17, 2026
1030b5b
Remove stale GUI workflow bridges
trissim May 17, 2026
0531212
Adopt public workflow hooks from vendored runtimes
trissim May 17, 2026
794509c
Decompose pipeline editor debug and presentation roles
trissim May 17, 2026
21e78bd
Decompose PyQt main window lifecycle workflows
trissim May 17, 2026
d226139
Make plate viewer state explicit
trissim May 17, 2026
c140aba
Clean PyQt managed window contracts
trissim May 17, 2026
648631f
Promote PyQt lifecycle contracts
trissim May 17, 2026
aa6851e
Decompose ZMQ server manager progress roles
trissim May 17, 2026
a2ed091
Register artifact plan roles
trissim May 17, 2026
8c21672
Nominalize CellProfiler source binding matching
trissim May 17, 2026
e39a08d
Materialize measurement cache invalidation policies
trissim May 17, 2026
8171d49
Promote CellProfiler payload value authorities
trissim May 17, 2026
bbe98d7
Use dataclass runtime adapter records
trissim May 17, 2026
0bb76d9
Tighten CellProfiler adapter domain boundaries
trissim May 17, 2026
27b267c
Extract CellProfiler optional resolution carriers
trissim May 17, 2026
bd4a551
Route CellProfiler source plane resolution through authorities
trissim May 17, 2026
e277adf
Nominalize CellProfiler runtime profiling events
trissim May 17, 2026
f75d9e0
Collapse CellProfiler plane projection wrappers
trissim May 17, 2026
9aad368
Reuse image stack authority for CP masks
trissim May 17, 2026
f35023e
Refactor image stack layout authorities
trissim May 17, 2026
fd157ed
Inline CP adapter registry preparation
trissim May 17, 2026
26696ba
Collapse single-use source match resolver
trissim May 17, 2026
363ea77
Plan next architectural refactor campaigns
trissim May 17, 2026
0a1dade
Nominalize source schema workspace projection
trissim May 17, 2026
76dfed3
Introduce shared viewer protocol authorities
trissim May 17, 2026
3337eae
Centralize viewer process launch policy
trissim May 17, 2026
154b56b
Declare CellProfiler settings binding families
trissim May 17, 2026
9581bf3
Centralize CellProfiler threshold binding context
trissim May 17, 2026
3266981
Declare remaining CP binding strategy families
trissim May 17, 2026
d324690
Refactor CP settings binding stages
trissim May 17, 2026
99624fb
Declare ExpandOrShrink mode bindings
trissim May 17, 2026
7367732
Derive CellProfiler settings public APIs
trissim May 17, 2026
d635dc6
Nominalize ZMQ execution submissions
trissim May 17, 2026
f60ca06
Route debug control through nominal router
trissim May 17, 2026
498d585
Derive FlagImage public API
trissim May 17, 2026
f34fc54
Derive CellProfiler package exports
trissim May 17, 2026
5540aaa
Declare GrayToColor resolver families
trissim May 17, 2026
5c092b6
Declare module function resolution families
trissim May 17, 2026
34129a7
Spell CP infrastructure notes as dataclasses
trissim May 17, 2026
57992b4
Share CP import tuple validation
trissim May 17, 2026
d666f35
Centralize SaveImages bit-depth conversion
trissim May 17, 2026
46a7d56
Nominalize CP statistics aggregation
trissim May 17, 2026
c40308f
Nominalize CP worm measurement rows
trissim May 17, 2026
d13041d
Nominalize DisplayPlatemap strategies
trissim May 17, 2026
f00f1db
Inline CP setting label normalization
trissim May 17, 2026
cc08d49
Centralize CP child-count feature projection
trissim May 17, 2026
90b2065
Nominalize CP display axis records
trissim May 17, 2026
d8ba6ad
Share CP repeated setting sequences
trissim May 17, 2026
d1f2879
Reduce CP advisor boundary debt
trissim May 18, 2026
62c46ec
Implement callable request binding cleanup
trissim May 18, 2026
6a9166a
Plan full-repo advisor refactor campaigns
trissim May 18, 2026
e51d830
Centralize measurement table axis queries
trissim May 18, 2026
5cec1fe
Share Napari streaming handler axis
trissim May 18, 2026
11b7a8d
Register AST validation family
trissim May 18, 2026
26c6511
Add Ashlar request records
trissim May 18, 2026
721a5e1
Add MFD preset spec authority
trissim May 18, 2026
4d5cb96
Split plate view event handling
trissim May 18, 2026
fe8086a
Split compiled plate execution phases
trissim May 18, 2026
adc98f9
Update full repo advisor triage
trissim May 18, 2026
bc03060
Plan remaining full repo refactor campaigns
trissim May 18, 2026
5f0b26b
Refactor compiled plate orchestration stages
trissim May 18, 2026
b2f149a
Extract shared Napari viewer protocol authorities
trissim May 18, 2026
6d29fc2
Tighten Napari viewer dispatch routes
trissim May 18, 2026
59caceb
Centralize Napari dimension label policy
trissim May 18, 2026
cbce827
Extract Napari shape label rasterizer
trissim May 18, 2026
1a8d494
Centralize viewer process lifecycle handling
trissim May 18, 2026
ea0fb2b
Type viewer control ping requests
trissim May 18, 2026
c45d1b3
Table-drive viewer platform policies
trissim May 18, 2026
d92b20d
Centralize Napari viewer request projection
trissim May 18, 2026
fd08723
Use viewer protocol ack statuses
trissim May 18, 2026
e1f734a
Make viewer lifecycle ping hook nominal
trissim May 18, 2026
5a492b3
Extract Napari layer state store
trissim May 18, 2026
534631f
Extract Napari batch processor store
trissim May 18, 2026
3e72240
Centralize Napari detached process entrypoint
trissim May 18, 2026
ef4e17a
Make viewer lifecycle state nominal
trissim May 18, 2026
837909c
Fix Napari cleanup registration import
trissim May 18, 2026
a1cdbe0
Collapse duplicate Napari stream server
trissim May 18, 2026
bd066c0
Extract Napari component value tracking
trissim May 18, 2026
824fd9f
Remove dead Napari data handler
trissim May 18, 2026
4039196
Type DXF mask stack dimensional projection
trissim May 18, 2026
ceb9b4f
Type self-supervised segmentation volume projection
trissim May 18, 2026
13571ae
Type focus torch dimensional dispatch
trissim May 18, 2026
637137a
Type deconvolution input projections
trissim May 18, 2026
1e3ed93
Update remaining debt focus queue
trissim May 18, 2026
10cf117
paper: reframe OpenHCS manuscript around workflow platform
trissim May 18, 2026
276fa62
Refactor image browser result handling
trissim May 18, 2026
5998a2f
Type progress tree projection
trissim May 18, 2026
e8b26c3
Declare dual editor UI contracts
trissim May 18, 2026
e81c874
Type step parameter editor actions
trissim May 18, 2026
6799380
Extract plate view grid model
trissim May 18, 2026
acef0c4
Split plate selection lifecycle
trissim May 18, 2026
1dcd339
Extract image browser catalog controls
trissim May 18, 2026
3234980
Split progress tree builder roles
trissim May 18, 2026
ad14477
Split step parameter editor file handling
trissim May 18, 2026
e5654bd
Refactor CellProfiler threshold authorities
trissim May 18, 2026
59babe7
Refactor radial distribution authorities
trissim May 18, 2026
f4d6d47
Add radial distribution request authority
trissim May 18, 2026
492c5cc
Refactor CellProfiler watershed authorities
trissim May 18, 2026
fe6fec4
Derive selected CellProfiler exports
trissim May 18, 2026
b40cffb
Derive thresholding exports
trissim May 18, 2026
dc94c6e
Refactor JAX NLM dimensional dispatch
trissim May 18, 2026
f6280c6
Refactor pyclesperanto mask dispatch
trissim May 18, 2026
ea51b69
Plan remaining advisor campaigns
trissim May 18, 2026
3ac2248
Refactor CellProfiler projection strategy materialization
trissim May 18, 2026
e1235aa
Remove dead CellProfiler illumination helpers
trissim May 18, 2026
7544ed7
Nominalize morphology footprint offsets
trissim May 18, 2026
1f4c378
Remove dead threshold quantization helper
trissim May 18, 2026
aeb0449
Nominalize experimental layout row roles
trissim May 18, 2026
6fd9109
Centralize experimental analysis scope policy
trissim May 18, 2026
aacbd53
Nominalize CellProfiler morphology stats families
trissim May 18, 2026
f24aab3
Extract CellProfiler grid coordinate policy
trissim May 18, 2026
900002e
Centralize CellProfiler runtime profiling
trissim May 19, 2026
ce3229d
Name CellProfiler watershed semantic literals
trissim May 19, 2026
b94bf6e
Name CellProfiler threshold backend registry key
trissim May 19, 2026
ed2c54f
Name OpenHCS microscope type marker
trissim May 19, 2026
a41140c
Extract LLM prompt parameter policy
trissim May 19, 2026
9223f8a
Nominalize function selector filters
trissim May 19, 2026
d71e123
Make PyQt service adapter dependencies explicit
trissim May 19, 2026
c88f221
Clean OpenHCS microscope metadata authority
trissim May 19, 2026
d7b8e68
Remove dead ImageXpress file rebuild helper
trissim May 19, 2026
1c72e58
Name CellProfiler morphology semantic keys
trissim May 19, 2026
ce5ff66
Extract FillObjects mode strategies
trissim May 19, 2026
6b7265c
Tighten robust threshold center strategy
trissim May 19, 2026
1a45302
Refactor runtime registry strategy dispatch
trissim May 19, 2026
123b208
Share cell counting analysis model types
trissim May 19, 2026
fc60b85
Centralize cell counting watershed threshold authority
trissim May 19, 2026
6b79b2c
Extract MaskObjects policy strategies
trissim May 19, 2026
33bf837
Register runtime artifact cache families
trissim May 19, 2026
3b3d23f
Extract experimental analysis exclusion matcher
trissim May 19, 2026
cc162de
Centralize cell count result construction
trissim May 19, 2026
24e47a7
Nominalize cell count colocalization metrics
trissim May 19, 2026
80b90bf
Remove dead cell counting GPU helpers
trissim May 19, 2026
85013d5
Extract CellProfiler global threshold strategies
trissim May 19, 2026
fa6c73e
Register watershed threshold method strategies
trissim May 19, 2026
3bb870c
Centralize colocalization analyzer catalog
trissim May 19, 2026
8603bb5
Centralize cell detection method catalog
trissim May 19, 2026
3910105
Remove backend threshold apply wrapper
trissim May 19, 2026
14864a2
Nominalize illumination rank median helpers
trissim May 19, 2026
266468a
Derive illumination public exports
trissim May 19, 2026
b538ba7
Derive morphology public exports
trissim May 19, 2026
d23b9b2
Inline registry runtime invocation shells
trissim May 19, 2026
6ca8957
Clean registry source layout
trissim May 19, 2026
de1ce1c
Expand experimental analysis layout
trissim May 19, 2026
7f87f30
Extract experimental analysis location values
trissim May 19, 2026
50777a7
Extract Metaxpress layout discovery
trissim May 19, 2026
3675e1e
Split experimental plate layout parser
trissim May 19, 2026
508d5b3
Nominalize CP threshold helper strategies
trissim May 19, 2026
fd2cc07
Move CP threshold center behavior into hooks
trissim May 19, 2026
f8a560c
Reuse CP threshold histogram primitives
trissim May 19, 2026
316ccc8
Delegate CP threshold diagnostics primitives
trissim May 19, 2026
1905a2e
Harden CP merge operation strategy
trissim May 19, 2026
22f4943
Move OpenCV morphology helper onto backend
trissim May 19, 2026
46458ce
Move SciPy fill holes onto morphology backend
trissim May 19, 2026
06f095a
Share CP morphology relabel algebra
trissim May 19, 2026
3c7d112
Share CP morphology label summary
trissim May 19, 2026
bc997c6
Own CP resize runtime context
trissim May 19, 2026
8fd8071
Own CP binary shrink pattern algebra
trissim May 19, 2026
55f8015
Clean CP Zernike public projections
trissim May 19, 2026
50d55d0
Move CP Zernike helpers onto strategy
trissim May 19, 2026
f630c72
Share CP Zernike scoring algebra
trissim May 19, 2026
d31fa7e
Derive CP colocalization exports
trissim May 19, 2026
cf1953d
Nominalize CP colocalization mask handling
trissim May 19, 2026
84143f4
Centralize CP colocalization phase logging
trissim May 19, 2026
8714660
Collapse CP Costes prefix context
trissim May 19, 2026
866ec3e
Extract CP colocalization Costes kernels
trissim May 19, 2026
3ba5d7c
Split CP Costes prefix kernels
trissim May 19, 2026
8de20ab
Stage CP object colocalization metrics
trissim May 19, 2026
4f0af75
Nominalize CP illumination mask normalization
trissim May 19, 2026
29286ca
Use typed CP runtime callable invocations
trissim May 19, 2026
8e79bdd
Register CP grid definition contexts
trissim May 19, 2026
ddbe41e
Inline CP backend authority wrappers
trissim May 19, 2026
4e81179
Thread CP tracking frames through request records
trissim May 19, 2026
3a512ae
Derive CP edge Sobel strategy leaves
trissim May 19, 2026
c890866
Share CP relationship parent selection algebra
trissim May 19, 2026
1950298
Extract CP alignment mutual information kernels
trissim May 19, 2026
ab6bd93
Spell CP texture companion surfaces nominally
trissim May 19, 2026
7a348bd
Share BBBC parser and handler shells
trissim May 19, 2026
06f04da
Derive small CP export surfaces
trissim May 19, 2026
0e10cda
Replace plate-map aggregation class generation
trissim May 19, 2026
96ffa98
Collapse GrayToColor input resolver declarations
trissim May 19, 2026
e45d504
Use rule rows for CP function resolution
trissim May 19, 2026
819ae69
Declare GrayToColor binding strategies explicitly
trissim May 19, 2026
71db5fb
Spell CP binding strategy leaves explicitly
trissim May 19, 2026
2530b9c
Split LLM prompt service authorities
trissim May 19, 2026
5b7c023
Extract image browser filter controller
trissim May 19, 2026
8fd8480
Extract plate selection controller
trissim May 19, 2026
d7c8581
Extract plate subdirectory controller
trissim May 19, 2026
88ae607
Type PyQt dispatch axes
trissim May 19, 2026
60712a6
Reuse CP morphology worm geometry authority
trissim May 19, 2026
44f9d04
Derive more CP export surfaces
trissim May 19, 2026
e9813e0
Declare PyQt provider contracts
trissim May 19, 2026
d20c86e
Derive CP classification export surfaces
trissim May 19, 2026
2faf3ec
Use inherited AutoRegister method strategies
trissim May 19, 2026
290f9d1
Template CP illumination smoothing helpers
trissim May 19, 2026
f3cc70f
Centralize CP rank median profiling
trissim May 19, 2026
1e9129c
Clean CP illumination backend authorities
trissim May 19, 2026
0571bbf
Use inherited CP morphology registry policy
trissim May 19, 2026
ee80ac8
Nominalize CP function catalog exports
trissim May 19, 2026
4350a63
Share CP enum metadata construction
trissim May 19, 2026
1a1c20e
Split CP secondary propagation kernels
trissim May 19, 2026
30697dd
Split CP object intensity kernels
trissim May 19, 2026
c9c2728
Split CP threshold diagnostics kernels
trissim May 19, 2026
218a4d8
Split CP threshold primitive kernels
trissim May 19, 2026
d867444
Split CP weighted Otsu kernels
trissim May 19, 2026
7710e42
Split CP histogram threshold kernels
trissim May 19, 2026
93d0544
Fix PlateManagerWidget Qt signal initialization
trissim May 19, 2026
0f4c479
Fix PipelineEditor debug workflow signal connection
trissim May 19, 2026
574cd1f
Fix PyQt time-travel step editor state
trissim May 20, 2026
7dc186f
Complete CellProfiler and PyQt integration refactor
trissim May 20, 2026
fe5d7e6
Derive CellProfiler contracts outside pipeline code
trissim May 20, 2026
07b1b2d
Preserve CellProfiler runtime materialization contracts
trissim May 20, 2026
6d00a6f
Fix nested form flash registration
trissim May 20, 2026
a52d1a9
Update PolyStore streaming metadata handling
trissim May 20, 2026
7ffb790
Preserve CellProfiler artifact metadata for streaming
trissim May 21, 2026
1aa1c84
Apply scoped borders to source binding tables
trissim May 21, 2026
ad9e110
Fix CellProfiler source-bound runtime parity
trissim May 24, 2026
d3a6535
Update runtime support submodules
trissim May 24, 2026
2ee4a2f
Make source anchor resolution explicit
trissim May 24, 2026
dc3da1e
Strengthen CellProfiler runtime abstractions
trissim May 24, 2026
f79d0a4
Unify measurement scope semantics
trissim May 24, 2026
0e48ce6
Promote measurement row semantics
trissim May 24, 2026
6096fed
Strengthen measurement row queries
trissim May 24, 2026
5c37590
Refine CellProfiler runtime measurement semantics
trissim May 25, 2026
6ffc21c
Add Bio-Formats HCS support and refactor PyQt UI
trissim May 26, 2026
cc7c9c7
Fix GUI startup after PyQt refactor
trissim May 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ dmypy.json
output/
*.json
!examples/*.json
!benchmark/manifests/official23_plus_monolayer.json
!benchmark/manifests/extra_provided_not_in_23_axis1.json
!benchmark/manifests/official23_plus_extra6_axis1.json
tests/integration/tests_data/

# Embedded repositories
Expand All @@ -134,6 +137,7 @@ archive/
audit/
plans/*
!plans/root-artifact-cleanup.md
!plans/core_surface_reduction_plan_20260509.md
semantic_matrix_analyzer/
tools/
bin/
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[submodule "external/arraybridge"]
path = external/arraybridge
url = https://github.com/OpenHCSDev/arraybridge.git
branch = main
branch = benchmark-platform
[submodule "external/metaclass-registry"]
path = external/metaclass-registry
url = https://github.com/OpenHCSDev/metaclass-registry.git
Expand All @@ -25,7 +25,7 @@
[submodule "external/PolyStore"]
path = external/PolyStore
url = https://github.com/OpenHCSDev/PolyStore.git
branch = main
branch = cellprofiler-raster-image-formats
[submodule "external/pyqt-reactive"]
path = external/pyqt-reactive
url = https://github.com/OpenHCSDev/PyQT-reactive.git
Expand Down
81 changes: 81 additions & 0 deletions benchmark/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
"""Public API for the benchmark platform."""

from __future__ import annotations

import importlib
from typing import Any

import openhcs as _openhcs_dependency_bootstrap # noqa: F401


_PUBLIC_EXPORTS: dict[str, tuple[str, str]] = {
"DatasetSpec": ("benchmark.contracts.dataset", "DatasetSpec"),
"AcquiredDataset": ("benchmark.contracts.dataset", "AcquiredDataset"),
"MetricCollector": ("benchmark.contracts.metric", "MetricCollector"),
"BenchmarkResult": ("benchmark.contracts.tool_adapter", "BenchmarkResult"),
"ToolAdapter": ("benchmark.contracts.tool_adapter", "ToolAdapter"),
"ToolAdapterError": ("benchmark.contracts.tool_adapter", "ToolAdapterError"),
"ToolExecutionError": ("benchmark.contracts.tool_adapter", "ToolExecutionError"),
"ToolNotInstalledError": ("benchmark.contracts.tool_adapter", "ToolNotInstalledError"),
"ToolVersionError": ("benchmark.contracts.tool_adapter", "ToolVersionError"),
"DatasetAcquisitionError": (
"benchmark.datasets.acquire",
"DatasetAcquisitionError",
),
"acquire_dataset": ("benchmark.datasets.acquire", "acquire_dataset"),
"BBBC021_SINGLE_PLATE": (
"benchmark.datasets.registry",
"BBBC021_SINGLE_PLATE",
),
"DATASET_REGISTRY": ("benchmark.datasets.registry", "DATASET_REGISTRY"),
"get_dataset_spec": ("benchmark.datasets.registry", "get_dataset_spec"),
"PipelineSpec": ("benchmark.pipelines.registry", "PipelineSpec"),
"NUCLEI_SEGMENTATION": (
"benchmark.pipelines.registry",
"NUCLEI_SEGMENTATION",
),
"PIPELINE_REGISTRY": ("benchmark.pipelines.registry", "PIPELINE_REGISTRY"),
"get_pipeline_spec": ("benchmark.pipelines.registry", "get_pipeline_spec"),
"TimeMetric": ("benchmark.metrics.time", "TimeMetric"),
"MemoryMetric": ("benchmark.metrics.memory", "MemoryMetric"),
"OpenHCSAxisSelection": ("benchmark.adapters.openhcs", "OpenHCSAxisSelection"),
"BenchmarkCaseProgress": ("benchmark.progress", "BenchmarkCaseProgress"),
"BenchmarkProgressEvent": ("benchmark.progress", "BenchmarkProgressEvent"),
"BenchmarkProgressEventKind": (
"benchmark.progress",
"BenchmarkProgressEventKind",
),
"BenchmarkProgressSnapshot": (
"benchmark.progress",
"BenchmarkProgressSnapshot",
),
"iter_progress_events": ("benchmark.progress", "iter_progress_events"),
"summarize_progress": ("benchmark.progress", "summarize_progress"),
"CellProfilerAdapter": (
"benchmark.adapters.cellprofiler",
"CellProfilerAdapter",
),
"OpenHCSAdapter": ("benchmark.adapters.openhcs", "OpenHCSAdapter"),
"CellProfilerCompatibilityResult": (
"benchmark.runner",
"CellProfilerCompatibilityResult",
),
"run_benchmark": ("benchmark.runner", "run_benchmark"),
"run_cellprofiler_compatibility_benchmark": (
"benchmark.runner",
"run_cellprofiler_compatibility_benchmark",
),
}


def __getattr__(name: str) -> Any:
"""Load public benchmark symbols on demand."""
if name not in _PUBLIC_EXPORTS:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
module_name, attribute_name = _PUBLIC_EXPORTS[name]
value = getattr(importlib.import_module(module_name), attribute_name)
globals()[name] = value
return value


__all__ = tuple(_PUBLIC_EXPORTS)
28 changes: 28 additions & 0 deletions benchmark/adapters/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""Tool adapters."""

from __future__ import annotations

import importlib
from typing import Any


_PUBLIC_EXPORTS: dict[str, tuple[str, str]] = {
"CellProfilerAdapter": (
"benchmark.adapters.cellprofiler",
"CellProfilerAdapter",
),
"OpenHCSAdapter": ("benchmark.adapters.openhcs", "OpenHCSAdapter"),
}


def __getattr__(name: str) -> Any:
"""Load adapter classes on demand."""
if name not in _PUBLIC_EXPORTS:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
module_name, attribute_name = _PUBLIC_EXPORTS[name]
value = getattr(importlib.import_module(module_name), attribute_name)
globals()[name] = value
return value


__all__ = tuple(_PUBLIC_EXPORTS)
Loading
Loading