The YamImageProcessor project provides a modular foundation for building a microscopic image processing desktop application. The system is split into clear layers covering core bootstrapping, processing workflows, UI presentation, and plugin discovery in l ine with the architectural design documents.
yam_processor/
├── core/ # Logging, settings, threading, and application bootstrap
├── processing/ # Image processing pipelines (to be implemented)
├── ui/ # Qt-based UI components (to be implemented)
└── plugins/ # Built-in and third-party extensions
The AppCore class coordinates the foundational services:
- Logging – centralised configuration with rotation and optional developer diagnostics.
- Settings – unified QSettings-based manager supporting JSON import/export for reproducible configurations.
- Threading – background task controller built on
ThreadPoolExecutorwith cooperative cancellation. - Plugins – discovery of modules in the configured plugin packages that expose a
register_module(app_core)function.
from yam_processor import AppCore
app_core = AppCore()
app_core.bootstrap()
# Application services (settings, logging, threading, plugins) are now ready.This repository currently focuses on establishing the foundation; additional processing pipelines and UI components can be buil t on top of the provided scaffolding.
- Create and activate a Python 3.10+ virtual environment (for example,
python -m venv .venvandsource .venv/bin/activateon macOS/Linux, or.venv\\Scripts\\activateon Windows). - Install the runtime dependencies with
pip install -r requirements.txt. - Optional: install the extended tooling defined in
requirements-dev.txtif you plan to run the full quality and testing suite.
With the environment active, start the main application shell via:
python preprocessing22.pyAlternatively, you can invoke the module launcher directly:
python -m core.application_launcherOn launch a startup dialog prompts you to choose which preprocessing modules should be available and whether diagnostics logging starts enabled. The selections persist across sessions, replacing the previous --diagnostics command-line switch.
On subsequent runs you can reactivate the existing virtual environment and repeat the same command without reinstalling the dependencies. If you prefer to start other entry points that ship with the project, the segmentation and feature extraction pipelines can be launched with:
python segmentation25.py
python extraction18.pyEach script presents the same startup dialog so you can tailor the enabled modules and diagnostics defaults before the main window opens.
The installed build number is exposed via yam_processor.__version__ and
yam_processor.get_version(). When package metadata is unavailable—such as
running from a source checkout—the helper returns "0.0.0" so tooling still
receives a stable string.
Update polling and telemetry are opt-in features controlled on
AppConfiguration. Both remain disabled by default:
from yam_processor import AppConfiguration, AppCore
config = AppConfiguration(
enable_update_checks=True,
telemetry_opt_in=True,
)
app_core = AppCore(config)
app_core.bootstrap()When telemetry is opted in, the flag is persisted through the settings manager
under the telemetry/opt_in key. Provide an explicit developer- or user-facing
toggle before enabling telemetry so consent is always captured.
Strings in the Qt user interface are translation-ready. See
docs/TRANSLATIONS.md for instructions on generating and
packaging language packs with Qt Linguist tools.
docs/DEVELOPER_GUIDE.md– guidance for authoring new processing modules, integrating withAppCore, and meeting logging and UI accessibility conventions.
This repository standardises formatting, linting, and type checking so contributors have a consistent baseline:
- Install the toolchain with
pip install -r requirements-dev.txt. - Format and lint the project via
scripts/format.sh, which runs Black, Flake8, and mypy with the configuration defined inpyproject.tomlandsetup.cfg.
pyproject.toml configures Black (88 character lines, targeting Python 3.10)
and applies strict mypy defaults suitable for the codebase. Flake8 mirrors the
same line length and enables flake8-bugbear for additional checks to keep the
codebase healthy.
Automated checks run through GitHub Actions on every
push and pull request. The workflow provisions Python 3.10, restores a cached
.venv, installs runtime dependencies from requirements.txt alongside the
tooling in requirements-dev.txt, and runs the same quality gates that
contributors use locally:
black --checkensures formatting stays consistent.flake8enforces style and bug-finding lint rules.mypyperforms static type analysis.pytest(withpytest-qt) exercises the test suite, including the Qt UI components in headless mode.
All jobs must pass before changes are merged. If any command fails locally, resolve the issue before pushing to avoid blocking CI.