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.4.tar.gz (13.2 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.4-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0ed30b7335225b0f48a2c21a7401e43d07e6488d18d627881a97825c59ccd5ab
MD5 2af8c1a2a79afb5fe6d5829a4c83fb91
BLAKE2b-256 a9c4ff67c8cbf0252f3d4da3b0434e707c23970b71827c1082f881976762dbf5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 32446b2f7abb0e7248a779c834e23aa1a705d17cca76babfb16109c533389f75
MD5 f2e5e0d9a764c92d2da3e15cd83caf3f
BLAKE2b-256 42ee470d1c0d47039eb02198b0031af4746d96dfdfe0c7a99f06f4744781b987

See more details on using hashes here.

Provenance

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