Skip to content

Commit a116228

Browse files
author
jmzhang
committed
fixed
1 parent 1f0fd37 commit a116228

3 files changed

Lines changed: 29 additions & 52 deletions

File tree

README.md

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,46 @@
11
# Snakemake Logger Plugin - Flowo
22

3-
A Snakemake logger plugin that stores workflow execution data in PostgreSQL.
3+
A Snakemake logger plugin that stores workflow execution data in PostgreSQL, making your workflow management more efficient and fun! 🎉
44

5-
## Features
5+
## 🎈 Features
66

7-
- Stores Snakemake workflow execution data in PostgreSQL database
8-
- Tracks jobs, rules, files, and errors
9-
- Provides comprehensive logging and monitoring capabilities
10-
- Easy integration with existing Snakemake workflows
7+
- Stores Snakemake workflow execution data in PostgreSQL database 🚀
8+
- Tracks jobs, rules, files, and errors 🔍
9+
- Provides comprehensive logging and monitoring capabilities 🚨
10+
- Easy integration with existing Snakemake workflows 🔄
1111

12-
## Installation
12+
## 💻 Installation
1313

1414
```bash
1515
pip install snakemake-logger-plugin-flowo
1616
```
17-
18-
## Usage
19-
20-
### 1. Configure Database
21-
22-
Set up your PostgreSQL database and configure the connection:
17+
## 🔧 Configuration
2318

2419
```bash
25-
export POSTGRES_USER=snakemake
26-
export POSTGRES_PASSWORD=snakemake_password
27-
export POSTGRES_DB=snakemake_logs
28-
```
20+
# To generate the default configuration file, run the following command:
21+
# This will create the default .env configuration file in your $HOME/.config/flowo/ directory.
22+
flowo --generate-config
2923

30-
### 2. Use with Snakemake
31-
32-
Run your Snakemake workflow with the logger plugin:
33-
34-
```bash
35-
snakemake --logger flowo
24+
# After generating the .env file, open it with your preferred text editor to adjust the settings:
25+
vim $HOME/.config/flowo/.env
3626
```
27+
The following environment variables are available for configuration in the `.env` file:
3728

38-
## Configuration
29+
- `POSTGRES_USER`: PostgreSQL username (default: flowo)
30+
- `POSTGRES_PASSWORD`: PostgreSQL password (default: flowo_password)
31+
- `POSTGRES_DB`: PostgreSQL database name (default: flowo_logs)
32+
- `POSTGRES_HOST`: PostgreSQL host (default: localhost)
33+
- `POSTGRES_PORT`: PostgreSQL port (default: localhost: 5432)
34+
- `FLOWO_USER`:
35+
- `FLOWO_WORKING_PATH`:
3936

40-
The plugin can be configured using environment variables:
41-
42-
- `POSTGRES_USER`: PostgreSQL username (default: snakemake)
43-
- `POSTGRES_PASSWORD`: PostgreSQL password (default: snakemake_password)
44-
- `POSTGRES_DB`: PostgreSQL database name (default: snakemake_logs)
45-
- `SQL_ECHO`: Enable SQL query logging (default: False)
46-
47-
## Development
48-
49-
### Setup
37+
## 🚀 Usage
5038

5139
```bash
52-
git clone <repository-url>
53-
cd snakemake-logger-plugin-flowo
54-
uv sync
40+
snakemake --logger flowo
5541
```
5642

57-
### Build
58-
59-
```bash
60-
uv build
61-
```
6243

63-
## License
44+
## 📜 License
6445

6546
MIT License

snakemake_logger_plugin_flowo/__main__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def generate_config():
1212
POSTGRES_USER=flowo
1313
POSTGRES_PASSWORD=flowo_password
1414
POSTGRES_DB=flowo_logs
15-
POSTGRES_HOST=172.16.3.223
15+
POSTGRES_HOST=localhost
1616
POSTGRES_PORT=5432
1717
1818
### APP setting
@@ -31,11 +31,7 @@ def main():
3131
action="store_true",
3232
help="Generate default config at ~/.config/flowo/.env",
3333
)
34-
parser.add_argument(
35-
"--health-check",
36-
action="store_true",
37-
help="Run the new function",
38-
)
34+
3935
args = parser.parse_args()
4036
if args.generate_config:
4137
generate_config()

snakemake_logger_plugin_flowo/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def format(self, record):
3636

3737

3838
class Settings(BaseSettings):
39-
POSTGRES_USER: str = "snakemake"
40-
POSTGRES_PASSWORD: str = "snakemake_password"
41-
POSTGRES_DB: str = "snakemake_logs"
39+
POSTGRES_USER: str = "flowo"
40+
POSTGRES_PASSWORD: str = "flowo_password"
41+
POSTGRES_DB: str = "flowo_logs"
4242
POSTGRES_HOST: str | None = None
4343
POSTGRES_PORT: str | None = None
4444
SQL_ECHO: bool = False

0 commit comments

Comments
 (0)