Skip to content

Commit a90e511

Browse files
committed
Compatible with snakemake-interface-logger-plugins>=1.2.3
1 parent e02373d commit a90e511

7 files changed

Lines changed: 13 additions & 5 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"python-envs.defaultEnvManager": "ms-python.python:conda",
3-
"python-envs.defaultPackageManager": "ms-python.python:conda",
2+
"python-envs.defaultEnvManager": "ms-python.python:venv",
3+
"python-envs.defaultPackageManager": "ms-python.python:pip",
44
"python-envs.pythonProjects": []
55
}

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ A Snakemake logger plugin designed to be used with **[FlowO](https://github.com/
44

55
**Demo page: [flowo online](https://zhanghaomiao.github.io/flowo)**
66

7+
**Important:** This plugin is designed to be used together with FlowO and requires FlowO to function correctly. It is not a standalone monitoring tool.
8+
79
## 🎈 Features
810

911
- Stores Snakemake workflow execution data in PostgreSQL database
@@ -32,10 +34,13 @@ The following environment variables are available for configuration in the `.env
3234
- `POSTGRES_PASSWORD`: PostgreSQL password (default: flowo_password)
3335
- `POSTGRES_DB`: PostgreSQL database name (default: flowo_logs)
3436
- `POSTGRES_HOST`: PostgreSQL host (default: localhost)
35-
- `POSTGRES_PORT`: PostgreSQL port (default: localhost: 5432)
37+
- `POSTGRES_PORT`: PostgreSQL port (default: 5432)
3638
- `FLOWO_USER`: User displayed in Flowo
3739
- `FLOWO_WORKING_PATH`: Snakemake execution project path
3840

41+
**Note:** The PostgreSQL database used by this plugin is configured in FlowO. Ensure FlowO is properly set up before using this logger plugin.
42+
```
43+
3944
## 🚀 Usage
4045
Basic usage
4146
```bash

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "snakemake-logger-plugin-flowo"
7-
version = "0.1.8"
7+
version = "0.1.9"
88
description = "A Snakemake logger plugin that stores workflow execution data in PostgreSQL"
99
readme = "README.md"
1010
requires-python = ">=3.12"

snakemake_logger_plugin_flowo/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,8 @@ def needs_rulegraph(self) -> bool:
5151
"""Whether this plugin requires the DAG rulegraph."""
5252
return True
5353

54+
def emit(self, record):
55+
return PostgresqlLogHandler.emit(self, record)
56+
5457

5558
__all__ = ["LogHandler"]

snakemake_logger_plugin_flowo/event_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def handle(
9292
self, record: LogRecord, session: Session, context: Dict[str, Any]
9393
) -> None:
9494
workflow_data = parsers.WorkflowStarted.from_record(record)
95-
95+
logger.info(f"Starting workflow with ID: {workflow_data.workflow_id}")
9696
workflow = Workflow(
9797
id=workflow_data.workflow_id,
9898
snakefile=workflow_data.snakefile,
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)