Skip to main content

Add verbosal information in logs for pipen.

Project description

pipen-verbose

Add verbosal information in logs for pipen.

Additional information

  • Following process properties if not None and different from pipeline-level configurations: scheduler, lang, forks, cache, dirsig, size, template
  • Ellapsed time for a process. Note that this is time ellapsed from process initialization to completion, no matter the jobs are cached or not, so this is not the real running time for the jobs.
  • Process envs if set.
  • Computed input data for processes.
  • The indices of failed jobs if any.
  • The stderr, paths to script, stdout file, stderr file, of the first failed jobs if any.
  • The input/output data of the first job.

Installation

pip install -U pipen-verbose

Enabling/Disabling the plugin

The plugin is registered via entrypoints. It's by default enabled. To disable it: plugins=[..., "no:verbose"], or uninstall this plugin.

Usage

example.py

from pipen import Proc, Pipen

class Process(Proc):
    input = 'a'
    input_data = range(10)
    output = 'b:file:a.txt'
    cache = False
    script = 'echo {{in.a}} > {{out.b}}'

Pipen().run(Process)
> python example.py
[09/12/21 22:57:01] I main                   _____________________________________   __
[09/12/21 22:57:01] I main                   ___  __ \___  _/__  __ \__  ____/__  | / /
[09/12/21 22:57:01] I main                   __  /_/ /__  / __  /_/ /_  __/  __   |/ /
[09/12/21 22:57:01] I main                   _  ____/__/ /  _  ____/_  /___  _  /|  /
[09/12/21 22:57:01] I main                   /_/     /___/  /_/     /_____/  /_/ |_/
[09/12/21 22:57:01] I main
[09/12/21 22:57:01] I main                                version: 0.1.0
[09/12/21 22:57:01] I main
[09/12/21 22:57:01] I main    ╭═════════════════════════════ PIPEN-0 ══════════════════════════════╮
[09/12/21 22:57:01] I main    ║  # procs          = 1                                              ║
[09/12/21 22:57:01] I main    ║  plugins          = ['main', 'verbose-0.0.1']                      ║
[09/12/21 22:57:01] I main    ║  profile          = default                                        ║
[09/12/21 22:57:01] I main    ║  outdir           = pipen-0_results                                ║
[09/12/21 22:57:01] I main    ║  cache            = True                                           ║
[09/12/21 22:57:01] I main    ║  dirsig           = 1                                              ║
[09/12/21 22:57:01] I main    ║  error_strategy   = ignore                                         ║
[09/12/21 22:57:01] I main    ║  forks            = 1                                              ║
[09/12/21 22:57:01] I main    ║  lang             = bash                                           ║
[09/12/21 22:57:01] I main    ║  loglevel         = info                                           ║
[09/12/21 22:57:01] I main    ║  num_retries      = 3                                              ║
[09/12/21 22:57:01] I main    ║  plugin_opts      = {}                                             ║
[09/12/21 22:57:01] I main    ║  plugins          = None                                           ║
[09/12/21 22:57:01] I main    ║  scheduler        = local                                          ║
[09/12/21 22:57:01] I main    ║  scheduler_opts   = {}                                             ║
[09/12/21 22:57:01] I main    ║  submission_batch = 8                                              ║
[09/12/21 22:57:01] I main    ║  template         = liquid                                         ║
[09/12/21 22:57:01] I main    ║  template_opts    = {}                                             ║
[09/12/21 22:57:01] I main    ║  workdir          = ./.pipen                                       ║
[09/12/21 22:57:01] I main    ╰════════════════════════════════════════════════════════════════════╯
[09/12/21 22:57:02] I main
[09/12/21 22:57:02] I main    ╭═════════════════════════════ Process ══════════════════════════════╮
[09/12/21 22:57:02] I main    ║ Undescribed                                                        ║
[09/12/21 22:57:02] I main    ╰════════════════════════════════════════════════════════════════════╯
[09/12/21 22:57:02] I main    Process: Workdir: '.pipen/pipen-0/process'
[09/12/21 22:57:02] I main    Process: <<< [START]
[09/12/21 22:57:02] I main    Process: >>> [END]
[09/12/21 22:57:02] I verbose Process: cache: False
[09/12/21 22:57:02] I verbose Process: size : 10
[09/12/21 22:57:02] I verbose Process: [0/9] in.a: 0
[09/12/21 22:57:02] I verbose Process: [0/9] out.b:
                      /home/pwwang/github/pipen-verbose/pipen-0_results/Process/0/a.txt
[09/12/21 22:57:04] I verbose Process: Time elapsed: 00:00:02.043s
[09/12/21 22:57:04] I main

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

pipen_verbose-0.4.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

pipen_verbose-0.4.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pipen_verbose-0.4.0.tar.gz.

File metadata

  • Download URL: pipen_verbose-0.4.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-1034-azure

File hashes

Hashes for pipen_verbose-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7a0e2082510ed9daa270e9f74a7a22385baa288426bb5a56994cf5a849e657d9
MD5 bb52b9830ba824c32c0a4efb136b3595
BLAKE2b-256 4cea7720f5813eb9d722b815265ad966e9c4bcd593e4c4428b25c7f57a90e2f4

See more details on using hashes here.

File details

Details for the file pipen_verbose-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pipen_verbose-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-1034-azure

File hashes

Hashes for pipen_verbose-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2f52c6cbbaf8e430b064d91a86ca04a64e25818cee3faf70faa7356665f26e8
MD5 a8e20fd066d0ee5b3a9c5b9aeee33895
BLAKE2b-256 babb786ab2909f4c999ede7caa0b90a2b9c0205ac845d7b538fb2e15d6715b91

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page