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.8.tar.gz (17.1 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.8-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.8.tar.gz
Algorithm Hash digest
SHA256 91b84b7931d61383843f2bb8bf7e224fb61e4aa6ed81091434661838b553beaf
MD5 900ff3c3f91b6c6fa56413d9d5512f1a
BLAKE2b-256 14e7294a42a3503b3f35e63bdef6e461c8c98c65607a2a994c8850e4d9ae2c6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for snakemake_logger_plugin_snkmt-0.1.8.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.8-py3-none-any.whl.

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 694d56a3331f2f1b331ee0499fdaf9c359fda3c567bacfedc83841dd161f04e8
MD5 8bccaec8c5dd90c52ba8fec1cf4130ca
BLAKE2b-256 c3e6e50e2449ebecd8e7b50d1400bd6c0d6100da878ce55b624531778be05ee4

See more details on using hashes here.

Provenance

The following attestation bundles were made for snakemake_logger_plugin_snkmt-0.1.8-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