Skip to main content

Snakemake logger plugin that forwards workflow events to a panoptes server.

Project description

snakemake-logger-plugin-panoptes

A Snakemake 9 logger plugin that forwards workflow events to a running panoptes server, replacing the legacy --wms-monitor integration that was removed in Snakemake 9.

Install

pip install snakemake-logger-plugin-panoptes

Use

Start a panoptes server (see the panoptes README), then run Snakemake with the plugin enabled:

snakemake \
    --cores 1 \
    --logger panoptes \
    --logger-panoptes-address http://127.0.0.1:5000

You can also point at the address via an environment variable:

export SNAKEMAKE_LOGGER_PANOPTES_ADDRESS=http://127.0.0.1:5000
snakemake --cores 1 --logger panoptes

Settings

Flag Env var Default Description
--logger-panoptes-address SNAKEMAKE_LOGGER_PANOPTES_ADDRESS (required) Base URL of the panoptes server.
--logger-panoptes-timeout 10.0 Per-request HTTP timeout in seconds.

How it works

On workflow start the plugin calls GET /create_workflow to register a new workflow with the panoptes server and remembers the returned workflow id. It then translates Snakemake LogEvent records (JOB_INFO, JOB_STARTED, JOB_FINISHED, JOB_ERROR, SHELLCMD, PROGRESS, ERROR, RUN_INFO) into the JSON message format that panoptes' /update_workflow_status endpoint already understands.

Network errors are logged but never crash the workflow.

Development

pip install -e .[dev]   # editable install with test deps
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snakemake_logger_plugin_panoptes-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file snakemake_logger_plugin_panoptes-0.1.1.tar.gz.

File metadata

File hashes

Hashes for snakemake_logger_plugin_panoptes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ec4593d064c07e66cf49d0ec56f896d8be834da329a1cc10733b45101fcef729
MD5 2f653893c671a5bf814bade94290730c
BLAKE2b-256 6816d624f6977f0ce4d9a7c3dac964ecd2508415eb5507f16e789ac4b87eb224

See more details on using hashes here.

File details

Details for the file snakemake_logger_plugin_panoptes-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for snakemake_logger_plugin_panoptes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4dc53bbd421c849e369a838c23420c34071974aee4424cfcf0d6c98fdd70f4a
MD5 1164951490118912c4f5c0187cdd99d6
BLAKE2b-256 cdbf03ff2a1d9f90ecb06b7a92bba0e376c5a91a4f6c2cd879b45ac8ce7638e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page