A proof of concept for a decision engine to automate CryoEM workflows for structural biology
Project description
smartem-decisions
Smart data collection system for cryo-electron microscopy at Diamond Light Source.
Installation
SmartEM Agent (data collection)
pip install smartem-decisions[agent]
Windows executable: Download the latest smartem-agent-windows-vX.Y.Z.exe from GitHub Releases.
SmartEM Backend (API server)
pip install smartem-decisions[backend]
All components
pip install smartem-decisions[all]
Usage
Agent
Watch a directory for EPU output and send data to the backend:
# Basic usage
smartem-agent watch /path/to/epu/output --api-url http://localhost:8000
# Dry run (no API calls)
smartem-agent watch /path/to/epu/output --dry-run
# Verbose output
smartem-agent watch /path/to/epu/output -vv
Parse EPU data without watching:
smartem-agent parse dir /path/to/epu/output
smartem-agent parse session /path/to/EpuSession.dm
smartem-agent parse atlas /path/to/Atlas.dm
Backend
Start the API server and message consumer:
# HTTP API server
python -m smartem_backend.api_server
# Message queue consumer
python -m smartem_backend.consumer -v
Components
| Package | Description |
|---|---|
smartem_agent |
Data collection agent that monitors EPU output |
smartem_backend |
Core backend with HTTP API and message queue processing |
smartem_common |
Shared schemas, types, and utilities |
Installation Extras
| Extra | Description |
|---|---|
[agent] |
Agent dependencies (watchdog, lxml) |
[backend] |
Backend dependencies (FastAPI, SQLAlchemy, Pika) |
[common] |
Core schemas only (Pydantic) |
[images] |
Image processing (Pillow, mrcfile, tifffile) |
[dev] |
Development tools (pytest, ruff, pyright) |
[all] |
All dependencies |
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check src/
ruff format --check src/
# Type check
pyright
Documentation
Links
- PyPI: https://pypi.org/project/smartem-decisions/
- Repository: https://github.com/DiamondLightSource/smartem-decisions
- Issues: https://github.com/DiamondLightSource/smartem-decisions/issues
- Changelog: GitHub Releases
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smartem_decisions-0.1.0.tar.gz.
File metadata
- Download URL: smartem_decisions-0.1.0.tar.gz
- Upload date:
- Size: 255.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f175f9047a21a9bb29d25f4e6cf487ef608f671a5c3d80594c8c55e3e658a8fe
|
|
| MD5 |
386a0a4037bfb75d40d36f9fcd5a5174
|
|
| BLAKE2b-256 |
51acc17a4ee6a023071d8b1d2d060b7e99b69a34145671d249d13628a1ab607d
|
Provenance
The following attestation bundles were made for smartem_decisions-0.1.0.tar.gz:
Publisher:
release-smartem-decisions.yml on DiamondLightSource/smartem-decisions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smartem_decisions-0.1.0.tar.gz -
Subject digest:
f175f9047a21a9bb29d25f4e6cf487ef608f671a5c3d80594c8c55e3e658a8fe - Sigstore transparency entry: 844889613
- Sigstore integration time:
-
Permalink:
DiamondLightSource/smartem-decisions@6162171bcba4d46fd341b2952aa6752c106755f4 -
Branch / Tag:
refs/tags/smartem-decisions-v0.1.0 - Owner: https://github.com/DiamondLightSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-smartem-decisions.yml@6162171bcba4d46fd341b2952aa6752c106755f4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file smartem_decisions-0.1.0-py3-none-any.whl.
File metadata
- Download URL: smartem_decisions-0.1.0-py3-none-any.whl
- Upload date:
- Size: 130.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b23ae426d1074ae6dc4ffaaf7d6eff08884bff7f0335cf4269a20afd4124ffc
|
|
| MD5 |
bcaadb723a4a32ab5b41239ea8ed1e95
|
|
| BLAKE2b-256 |
7d0351534b54a029229485caaaf282176746f3744817af8edc17358dba0cbdaa
|
Provenance
The following attestation bundles were made for smartem_decisions-0.1.0-py3-none-any.whl:
Publisher:
release-smartem-decisions.yml on DiamondLightSource/smartem-decisions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smartem_decisions-0.1.0-py3-none-any.whl -
Subject digest:
8b23ae426d1074ae6dc4ffaaf7d6eff08884bff7f0335cf4269a20afd4124ffc - Sigstore transparency entry: 844889628
- Sigstore integration time:
-
Permalink:
DiamondLightSource/smartem-decisions@6162171bcba4d46fd341b2952aa6752c106755f4 -
Branch / Tag:
refs/tags/smartem-decisions-v0.1.0 - Owner: https://github.com/DiamondLightSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-smartem-decisions.yml@6162171bcba4d46fd341b2952aa6752c106755f4 -
Trigger Event:
push
-
Statement type: