Snakemake logger plugin for snakesee workflow monitoring
Project description
snakemake-logger-plugin-snakesee
A Snakemake logger plugin that integrates with snakesee for enhanced workflow monitoring.
Overview
This plugin captures real-time workflow events directly from Snakemake's execution engine and writes them to a JSONL file that snakesee can read. This provides more accurate and timely job status information than log parsing alone.
Installation
pip install snakemake-logger-plugin-snakesee
Or install alongside snakesee:
pip install snakesee snakemake-logger-plugin-snakesee
Usage
Run Snakemake with the snakesee logger:
snakemake --logger snakesee --cores 4
In another terminal, run snakesee to monitor:
snakesee watch
The plugin writes workflow events to .snakesee_events.jsonl in the workflow directory. Snakesee automatically detects and reads these events for real-time updates.
Benefits
Using the logger plugin provides:
- Instant job detection: Jobs are reported immediately when they start/finish, not when log lines are parsed
- Accurate timing: Job durations are calculated from actual execution timestamps
- Direct wildcard access: Wildcard values come directly from Snakemake, not regex parsing
- Reliable error tracking: Failed jobs are detected via Snakemake events, not log patterns
Configuration
| Setting | Default | Description |
|---|---|---|
event_file |
.snakesee_events.jsonl |
Path to event file (relative to workflow directory) |
buffer_size |
1 |
Events to buffer before flush (1 = immediate) |
Event Types
The plugin emits the following event types:
| Event | Description |
|---|---|
workflow_started |
Workflow initialization |
job_submitted |
Job queued for execution |
job_started |
Job execution began |
job_finished |
Job completed successfully |
job_error |
Job failed |
progress |
Overall progress update |
Event File Format
Events are written as JSON Lines (one JSON object per line):
{"event_type":"workflow_started","timestamp":1703001234.123}
{"event_type":"job_submitted","timestamp":1703001235.0,"job_id":1,"rule_name":"align","wildcards":{"sample":"A"}}
{"event_type":"job_started","timestamp":1703001235.5,"job_id":1}
{"event_type":"job_finished","timestamp":1703001335.5,"job_id":1,"duration":100.0}
{"event_type":"progress","timestamp":1703001335.6,"completed_jobs":1,"total_jobs":10}
Backward Compatibility
Snakesee works with or without this plugin:
- Without plugin: Uses log parsing and metadata files (existing behavior)
- With plugin: Uses real-time events for enhanced accuracy
The plugin is completely optional - snakesee will automatically use events when available and fall back to log parsing otherwise.
Requirements
- Python 3.11+
- Snakemake 8.0+ (for logger plugin support)
- snakemake-interface-logger-plugins >= 1.0.0
License
MIT
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
File details
Details for the file snakemake_logger_plugin_snakesee-0.1.1.tar.gz.
File metadata
- Download URL: snakemake_logger_plugin_snakesee-0.1.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55db2a9f0ba716221450995fba6772108dc0536f572db4f525a2647e480135b2
|
|
| MD5 |
3056111f1ded1bb0815503850f5b6d96
|
|
| BLAKE2b-256 |
f090dc8378103611b510a5476d5359850e50fc27e2819bc64206057eb25b1877
|
Provenance
The following attestation bundles were made for snakemake_logger_plugin_snakesee-0.1.1.tar.gz:
Publisher:
publish-logger-plugin.yml on nh13/snakesee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
snakemake_logger_plugin_snakesee-0.1.1.tar.gz -
Subject digest:
55db2a9f0ba716221450995fba6772108dc0536f572db4f525a2647e480135b2 - Sigstore transparency entry: 1192022790
- Sigstore integration time:
-
Permalink:
nh13/snakesee@453d6609e2264b0d6965d9ad17a9335d6bad74f6 -
Branch / Tag:
refs/tags/snakesee-logger-0.1.1 - Owner: https://github.com/nh13
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-logger-plugin.yml@453d6609e2264b0d6965d9ad17a9335d6bad74f6 -
Trigger Event:
push
-
Statement type: