Filesystem Recording and Replay Tool for cryo-EM development and testing
Project description
smartem-epuplayer
EPU Recording and Replay Tool for cryo-EM development and testing.
Records all filesystem changes in a directory and can replay them elsewhere with configurable timing. Cross-platform support for Windows and Linux with diff-based incremental recording.
Installation
From PyPI
pip install smartem-epuplayer
From GitHub Releases (Windows executable)
Download the latest epuplayer-windows-vX.Y.Z.exe from GitHub Releases.
Usage
Recording
Record filesystem changes in a directory:
# Basic recording
epuplayer record /path/to/watch -o recording.tar.gz
# Include binary file content (larger archives)
epuplayer record /path/to/watch -o recording.tar.gz --no-skip-binary-content
# Force specific extensions to be treated as text/binary
epuplayer record /path/to/watch -o recording.tar.gz \
--force-text-extensions dm dat \
--force-binary-extensions log
Press Ctrl+C to stop recording.
Replaying
Replay a recording to a target directory:
# Default fast mode (100x speed, 1s max delay)
epuplayer replay recording.tar.gz /path/to/target
# Development mode (maximum speed for smoke tests)
epuplayer replay recording.tar.gz /path/to/target --dev-mode
# Exact timing (1x speed, original delays)
epuplayer replay recording.tar.gz /path/to/target --exact
# Custom settings
epuplayer replay recording.tar.gz /path/to/target --speed 50 --max-delay 2.0
# Burst mode (process events as fast as possible)
epuplayer replay recording.tar.gz /path/to/target --burst
# Skip integrity verification
epuplayer replay recording.tar.gz /path/to/target --no-verify
# Skip files that were unreadable during recording
epuplayer replay recording.tar.gz /path/to/target --skip-unreadable
Information
View recording metadata and statistics:
epuplayer info recording.tar.gz
Replay Modes
| Mode | Speed | Max Delay | Use Case |
|---|---|---|---|
--dev-mode |
1000x + burst | 0.1s | Smoke tests, rapid iteration |
--fast (default) |
100x | 1s | Integration testing |
--exact |
1x | None | Timing-sensitive debugging |
| Custom | Configurable | Configurable | Specific requirements |
Python API
from smartem_epuplayer import EPURecorder, EPUReplayer
# Recording
recorder = EPURecorder(
watch_dir="/path/to/watch",
output_file="recording.tar.gz",
skip_binary_content=True,
)
recorder.start_recording() # Blocks until Ctrl+C
# Replaying
replayer = EPUReplayer("recording.tar.gz", "/path/to/target")
replayer.replay(
speed_multiplier=100.0,
verify_integrity=True,
max_delay=1.0,
burst_mode=False,
)
Features
- Cross-platform: Works on Windows and Linux
- Diff-based recording: Tracks appends, truncations, and modifications efficiently
- Binary placeholder mode: Reduces archive size by replacing binary files with placeholders
- Integrity verification: SHA256 hash verification during replay
- Configurable timing: Multiple replay speed options for different testing scenarios
- Portable archives: POSIX path format for cross-platform replay
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check .
ruff format --check .
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_epuplayer-1.0.2.tar.gz.
File metadata
- Download URL: smartem_epuplayer-1.0.2.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7546186649ff5ca8226ddbe61c0b330c245e67c65b3d54f10f7fb30314c4eaeb
|
|
| MD5 |
328b5f55d6ced2c35ca89b041bc6c195
|
|
| BLAKE2b-256 |
62a78f29eb7d596babd7f97d6c143622368f3bd2fc551a32be02ef3fc03c526b
|
Provenance
The following attestation bundles were made for smartem_epuplayer-1.0.2.tar.gz:
Publisher:
release-epuplayer.yml on DiamondLightSource/smartem-devtools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smartem_epuplayer-1.0.2.tar.gz -
Subject digest:
7546186649ff5ca8226ddbe61c0b330c245e67c65b3d54f10f7fb30314c4eaeb - Sigstore transparency entry: 836982296
- Sigstore integration time:
-
Permalink:
DiamondLightSource/smartem-devtools@9d37ad8fb718077918713a6a331aeac6f0e9245d -
Branch / Tag:
refs/tags/epuplayer-v1.0.2 - Owner: https://github.com/DiamondLightSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-epuplayer.yml@9d37ad8fb718077918713a6a331aeac6f0e9245d -
Trigger Event:
push
-
Statement type:
File details
Details for the file smartem_epuplayer-1.0.2-py3-none-any.whl.
File metadata
- Download URL: smartem_epuplayer-1.0.2-py3-none-any.whl
- Upload date:
- Size: 15.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 |
6138e5cde887da54631abcd957c112b7bee8374abdba384c637a58d9270f67ab
|
|
| MD5 |
f35a3a980ed414985dac35137dd4c16f
|
|
| BLAKE2b-256 |
b26d52ece1afef08a27214e32d4131d574558c5a631e91f788a6be11b554b606
|
Provenance
The following attestation bundles were made for smartem_epuplayer-1.0.2-py3-none-any.whl:
Publisher:
release-epuplayer.yml on DiamondLightSource/smartem-devtools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smartem_epuplayer-1.0.2-py3-none-any.whl -
Subject digest:
6138e5cde887da54631abcd957c112b7bee8374abdba384c637a58d9270f67ab - Sigstore transparency entry: 836982335
- Sigstore integration time:
-
Permalink:
DiamondLightSource/smartem-devtools@9d37ad8fb718077918713a6a331aeac6f0e9245d -
Branch / Tag:
refs/tags/epuplayer-v1.0.2 - Owner: https://github.com/DiamondLightSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-epuplayer.yml@9d37ad8fb718077918713a6a331aeac6f0e9245d -
Trigger Event:
push
-
Statement type: