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.6.tar.gz (13.3 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_snkmt-0.1.6.tar.gz.

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.6.tar.gz
Algorithm Hash digest
SHA256 deea560361829b5ce4782e6237a76ebcfd54549c1c51d8702c2bd269fcc571ab
MD5 f5f4b9a55c054f214367567435af9e25
BLAKE2b-256 3541c8d5aea1da7b39e1e71e66421f86d641465331c41d1a612494b5a18518b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for snakemake_logger_plugin_snkmt-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d9cdba94e1d51e1b876ef06b5758d5896d22594de0449de6ef2a8d0c1e0518e8
MD5 704046f7737f71f2756778bb8314fa68
BLAKE2b-256 b0b463492be0c9faeac50e1c399ee52ccc888f244535f2d937ee1ac6d39339ea

See more details on using hashes here.

Provenance

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