-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
π New repository
Here is the associated repository: https://github.com/DataLab-Platform/sigima
β¨ Objective
Create a standalone Python package named datalab-processing that consolidates the computation engine, data I/O logic (except HDF5), and the simple XML-RPC client for DataLab.
This package will serve as the non-GUI backend for DataLab, and provide reusable functionality for headless applications and remote control workflows.
π§ Scope of sigima
The sigima package will include:
- π§ Signal and image processing logic (
BaseProcessor,SignalProcessor,ImageProcessor) - ποΈ I/O and file format support for signals and images (except HDF5)
- π§© I/O plugin system (moved out of the GUI package)
- π§ͺ Internal validation and test datasets (optional)
- π¦ Type annotations and compatibility with
mypy,pytest, and other quality tools - π Lightweight XML-RPC client to control a remote instance of DataLab (migration of DataLab Simple Client features without the GUI part which is migrated to
sigimax- see Issue Createsigimax, a new GUI tools library for DataLabΒ #182)
Note: HDF5 file handling will temporarily remain in datalab-app, but all other input/output logic (including the plugin mechanism for custom readers/writers) will be moved to sigima.
β
To Extract into sigima
1. cdl.algorithms
- β All core functions operating on raw NumPy arrays
- π Refactored under
sigima.algorithms
2. cdl.computation
- β
All functions operating on
SignalObjandImageObj - π Refactored into two top-level modules:
sigima.signalβ forSignalObj-based operationssigima.imageβ forImageObj-based operations
3. cdl.core.model
- β³ Partially extract:
SignalObj,ImageObj- Other basic computation-related objects (e.g. wrappers for result types)
- β Leave GUI- or application-specific classes in DataLab
- π Refactored under
sigima.datatypes
4. cdl.core.io
- β³ Partially extract:
- I/O for signals/images that are not tied to HDF5 or GUI persistence
- β Exclude HDF5-specific or GUI-related I/O
- π Refactored under
sigima.io
5. cdl.plugins
- β Do not reuse existing plugin classes (tightly coupled to DataLab GUI)
- β
Instead, define a clean plugin interface under
sigima.plugins- For extendable compute operations
6. cdl.tests
- β
Migrate tests related to:
cdl.algorithmscdl.computation
- π Refactor under
tests/insigima, preserving coverage
7. cdl.utils
- β³ Only migrate utility functions strictly required by above modules
- π Refactor and isolate as
sigima.utils(minimal)
8. Test Infrastructure & Data
- β
Migrate reusable parts:
tests.data/- Core test helpers
- CI-compatible test layout
π Refactoring Considerations
- β
Isolate any dependency on
cdl.config,cdl.qt, orcdl.app - β Ensure standalone execution with no Qt/UI import chain
- β
Prepare
pyproject.tomlwith optionalpluginextras
π Proposed Package Layout
sigima/
βββ algorithms/ # NumPy-based processing functions
βββ signal/ # SignalObj-based operations (e.g., normalize, filter, resample)
β βββ __init__.py
β βββ processing.py
βββ image/ # ImageObj-based operations (e.g., ROI, threshold, morphology)
β βββ __init__.py
β βββ filters.py
βββ datatypes/ # SignalObj, ImageObj, Result wrappers
βββ io/ # Portable I/O for signal/image
βββ plugins/ # Plugin architecture for compute functions
βββ utils/ # Minimal utilities used by core modules
βββ tests/ # Pytest-compatible test suite
β βββ data/ # Test images/signals
β βββ ...
βββ __init__.py
βββ pyproject.toml
π Notes
- The name
sigimaemphasizes the unification of signal and image processing logic. - GUI-specific functionality remains in
datalab-app. - The library will be MIT-licensed and documented as a reusable scientific computing core.
- With this structure, common imports become clean and readable:
from sigima.signal import normalize
from sigima.image import enhance_contrastπ§ Tasks
- Extract computation and non-HDF5 I/O logic from
cdl/intosigima/ - Migrate the plugin-based I/O mechanism for signals/images
- Clean up internal dependencies and prepare
pyproject.tomlstructure - Integrate the simple XML-RPC client (previously
cdlclient), without the GUI part - Write unit tests and CI configuration (GitHub Actions)
- Add Sphinx documentation and usage examples
- Publish to PyPI as
sigima
π Context
This package replaces and unifies:
- the computational backend of the original DataLab codebase (
cdl) - (eventually) the external
cdlclientRPC wrapper - the future programmatic API surface of DataLab (headless usage, scripting, integration)
It complements:
datalab-platform: GUI frontend (HDF5 support remains here temporarily)sigimax: reusable GUI components and infrastructure
π Related
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request