Skip to main content

Snakemake logger plugin that writes logs to SQLite database.

Project description

Snakemake Logger Plugin: snkmt

This plugin is still under development and thus may not be fully stable or feature-complete. Use it at your own discretion and report any issues or suggestions to the repository's issue tracker.

Introduction

This is the logging plugin for use with snkmt, a monitoring tool for Snakemake workflows. Please refer to snkmt's documentation for more details.

Usage

  1. Install via pip: pip install snakemake-logger-plugin-snkmt
  2. Run Snakemake with the --logger snkmt option to enable the snkmt logger.

Note: Regular Snakemake logs will continue to be written to stderr when using this plugin, so it may appear that the plugin is not doing anything. This behavior will change in future versions.

Options

  • --logger-snkmt-db </path/to/sqlite.db>" Where to write the snkmt DB.

Development

This project uses pixi for environment management.

Setting up the development environment

  1. Clone the repository:

    git clone https://github.com/cademirch/snakemake-logger-plugin-snkmt.git
    cd snakemake-logger-plugin-snkmt
    
  2. Install dependencies using pixi:

    pixi install
    
  3. Activate the development environment:

    pixi shell -e dev
    

Available development tasks

Run these commands with pixi run (or just use the command directly if you're in a pixi shell):

  • Quality control: pixi run qc - Runs formatting, linting, and type checking
  • Testing: pixi run test - Runs pytest with coverage reporting
  • Demo: pixi run demo - Runs a demonstration Snakemake workflow using the plugin
  • Individual QC tasks:
    • pixi run format - Format code with ruff
    • pixi run lint - Lint code with ruff
    • pixi run type-check - Type check with mypy

Testing the plugin

To test the plugin with a real Snakemake workflow, use the demo task:

pixi run demo

This will:

  1. Run a simple Snakemake workflow in tests/demo/ using the snkmt logger
  2. Create a SQLite database at tests/demo/snkmt.db with the logged workflow data
  3. Clean up the demo directory afterward

You can also run the demo manually without cleanup using:

pixi run snk_demo

License

This project is licensed under the MIT License. See the LICENSE file for details.

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_snkmt-0.1.7.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

snakemake_logger_plugin_snkmt-0.1.7-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file snakemake_logger_plugin_snkmt-0.1.7.tar.gz.

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.7.tar.gz
Algorithm Hash digest
SHA256 1687a734fae04bdfea1c89eca689f8103862284d9f871171743e700eb1137ad6
MD5 340d27d9e1006870a496bea5c416fd01
BLAKE2b-256 553104ca04722645ee0cf6ee4f8c619f7aca096ed178544100eee5fa01a9df49

See more details on using hashes here.

Provenance

The following attestation bundles were made for snakemake_logger_plugin_snkmt-0.1.7.tar.gz:

Publisher: release-please.yml on cademirch/snakemake-logger-plugin-snkmt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file snakemake_logger_plugin_snkmt-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 17595cf201dc00cc9f5d7a043618628209271cb827d84086895e88e5e625310a
MD5 2367a9d3d02336152c02adfdfcdfff43
BLAKE2b-256 aea74c7cd1d138772494256aa044a16b0b4d3c57f9af4b01c7a98e74f3df033c

See more details on using hashes here.

Provenance

The following attestation bundles were made for snakemake_logger_plugin_snkmt-0.1.7-py3-none-any.whl:

Publisher: release-please.yml on cademirch/snakemake-logger-plugin-snkmt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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