Skip to content

Releases: oliverm91/processes

v7.0.4

Choose a tag to compare

@oliverm91 oliverm91 released this 22 Jun 15:08

v7.0.4 (2026-06-22)

Fix

  • test style

v7.0.3 (2026-06-22)

Fix

  • test: test

v7.0.2 (2026-06-22)

Fix

  • ProcessExecutionReport.notify: fix in logic excluding non errors report when only_errors kwargs is set to true

v7.0.1 (2026-06-22)

v7.0.1

Choose a tag to compare

@oliverm91 oliverm91 released this 22 Jun 14:16

v7.0.1 (2026-06-22)

Fix

  • ProcessExecutionReport.notify: when kwarg only_errors set to true and no errors in entries, then don't notify

v7.0.0 (2026-06-20)

Processes v7.0.0

Choose a tag to compare

@oliverm91 oliverm91 released this 21 Jun 03:58

v7.0.0 (2026-06-20)

BREAKING CHANGE

  • Task(channels=...) and the NotificationChannel API are removed;
    HTMLEmailStyle.style and traced_vars_frame_filter are removed (the latter moves
    to Task). Per-task email/webhook alerts are replaced by report.notify.

Feat

  • add process name to report, email subject, and webhook payload
  • normalize task names to lowercase for case-insensitive matching
  • delegate notifications to ProcessExecutionReport, drop per-task channels
  • replace notify_errors with notify(only_errors=...) and add task filter
  • implement WebhookChannel and EmailChannel send_report
  • add ReportChannel architecture for report notifications
  • add ProcessExecutionReport.notify/.notify_errors stubs
  • add ProcessExecutionReport.to_json
  • add graph mutation methods to Process

Refactor

  • group communication code into a comms/ package
  • unify SMTP and webhook transport behind single classes
  • extract task value types to leaf module, break import cycle

Perf

  • cache palette CSS and report template loading
  • cache language string loading
  • add slots=True to frozen value types

v6.0.0 (2026-06-15)

BREAKING CHANGE

  • Process.run() returns ProcessExecutionReport instead of
    ProcessResult. Use report.successes / report.errored / report.skipped
    instead of passed_tasks_results / errored_tasks / skipped_tasks, and
    report.entries[name].result / .error instead of
    passed_tasks_results[name] / failed_tasks_results[name].

Feat

  • remove ProcessResult, have Process.run() return ProcessExecutionReport
  • expand TaskStatus with PENDING and add status field to TaskResult
  • add ProcessExecutionReport for per-task execution summaries
  • track failed task results in ProcessRunner and ProcessResult
  • promote ErrorData to public API and add timing/attempts to TaskResult

Fix

  • make Task.run never propagate dependency-resolution failures

Refactor

  • drop _is_unrunnable side effect and reuse TaskResult helpers

v5.0.0 (2026-06-14)

BREAKING CHANGE

  • log_path and func swap positions; existing positional
    Task(name, log_path, func, ...) calls must be updated to
    Task(name, func, log_path, ...).

Feat

  • add nest_under option to WebhookConfig for nested payload envelopes
  • make Task.log_path optional, reorder constructor signature

v4.1.0 (2026-06-14)

Feat

  • add extra_payload to WebhookConfig for service-specific routing keys
  • include traced variables in task logfiles
  • add generic WebhookChannel with optional HMAC body signing

Refactor

  • make traced_vars a plain {name: repr(value)} dict

v4.0.0 (2026-06-14)

BREAKING CHANGE

  • Task no longer accepts smtp_config or email_style.
    Pass channels=[EmailChannel(smtp_config, style)] instead.

Feat

  • add NotificationChannel abstraction with file and email channels

Refactor

  • configure email alerts via channels instead of Task smtp_config
  • keep file and email channel implementations internal
  • build task handlers through notification channels

v3.1.1 (2026-06-13)

Processes v3.1.1

Choose a tag to compare

@oliverm91 oliverm91 released this 14 Jun 02:09

v3.1.1 (2026-06-13)

Refactor

  • rename _log_formatting to _logfile_formatting and _TaskLogFormatter to _TaskLogfileFormatter

v3.1.0 (2026-06-13)

Processes v3.1.0

Choose a tag to compare

@oliverm91 oliverm91 released this 14 Jun 01:48

v3.1.0 — Failure Context in Logfiles, PEP 561, Docs Refresh

✨ New Features

  • Failure context in task logfiles: when a task fails, its logfile now
    includes the same structured information shown in the HTML failure email —
    function name, args/kwargs, downstream impact, traced-vars location, and
    the traceback — not just the bare exception message and stack trace.

🔧 Refactoring

  • Introduced _ErrorData, a typed view over the internal task_context
    payload, and _ErrorContextFormatter, a shared base class for the email
    and logfile formatters. Both formatters now read one typed object instead
    of independently pulling fields out of an untyped dict.
  • Extracted plain-text logfile rendering into a new _log_formatting module
    (_TaskLogFormatter), keeping _email_internals focused on SMTP/HTML
    concerns only.

📦 Packaging

  • Added PEP 561 support: shipped py.typed marker and the
    "Typing :: Typed" classifier, so downstream mypy/pyright runs pick up
    this package's type hints.
  • Removed the stale version_files entry from [tool.commitizen] (version
    is sourced from git tags via hatch-vcs).
  • Refined the package description to lead with what the library does and
    call out that tasks are plain callables.

📚 Documentation

  • Configured mkdocstrings for NumPy-style docstrings (docstring_style: numpy) and enabled heading/signature rendering — the API Reference page
    now shows class names, method sections, and proper parameter/attribute
    lists instead of flat paragraphs.
  • Updated the "Customizing the HTML email" section and Quick Start example
    to use SMTPConfig/HTMLEmailStyle (the old HTMLSMTPHandler references
    were stale after the v3.0.0 API change).
  • Added a "Retries & Timeouts" section to the advanced example, documenting
    timeout, retries, and retry_on.

🧹 CI

  • Bumped actions/checkout and astral-sh/setup-uv to their latest
    available major tags (v6) across all workflows to silence Node 20
    deprecation warnings.

Processes v3.0.1

Choose a tag to compare

@oliverm91 oliverm91 released this 14 Jun 00:39

v3.0.1 — Email API Overhaul, Task Retries & Timeouts

⚠️ Breaking Changes

  • Removed HTMLSMTPHandler and html_mail_handler. Email alerting is now configured with two plain dataclasses passed to Task:

    • SMTPConfig — SMTP transport settings (host, credentials, sender/recipients, TLS).
    • HTMLEmailStyle — presentation settings (style, color palette, language, traced-vars frame filter).
    Task(..., smtp_config=SMTPConfig(...), email_style=HTMLEmailStyle(style="modern", palette="catppuccin"))

✨ New Features

  • Per-task timeouts: Task(..., timeout=30) raises TimeoutError if an attempt exceeds the limit.
  • Automatic retries: Task(..., retries=3, retry_on=(ConnectionError, TimeoutError)) retries failed attempts on the specified exception types (defaults to ConnectionError/TimeoutError).
  • Structured exceptions: DependencyNotFoundError, TaskNotFoundError, and CircularDependencyError now carry structured attributes (task_name, missing_dep) instead of plain messages.
  • Traced variables in error emails: failure emails include a "Traced Variables" section showing local variables at the relevant stack frame, with a configurable traced_vars_frame_filter to target a specific module.

🔧 Refactoring

  • Centralized failure-context extraction: Task._resolve_args and Task._build_failure_context cleanly separate dependency-result injection from failure reporting.
  • Split traceback/frame-walking utilities (_tb_utils.py) from email-rendering internals (_email_internals.py) — each module now has a single responsibility.
  • Each Task now gets a unique per-instance logger, preventing handler leakage between tasks with the same name.
  • Minor cleanups in Process: bare raise for re-raised exceptions, extracted _is_done() helper for the parallel runner loop.

🐛 Bug Fixes

  • Fixed a logging bug where logger.exception(...) was called outside an except block, resulting in empty exception details (None) in failure emails. Errors now log with full exc_info and a structured task_context payload.
  • Fixed Task.run() not reporting the actual exception when retries were exhausted.

🧪 Testing & CI

  • Migrated the test suite to a shared BaseTest base class with consistent per-test log directories and cleanup.
  • Added dedicated tests for timeout and retry behavior.
  • Bumped GitHub Actions (actions/checkout → v6, astral-sh/setup-uv → v6) to silence deprecation warnings.

Processes v2.0.1

Choose a tag to compare

@oliverm91 oliverm91 released this 13 Jun 03:39

v2.0.1 (2026-06-12)

Fix

  • publish.yml: remove unneeded step ruff format check in quality-gate

v2.0.0 (2026-06-12)

Processes v2.0.0

Choose a tag to compare

@oliverm91 oliverm91 released this 13 Jun 03:31

v2.0.0 (2026-06-12)

BREAKING CHANGE

  • log records no longer carry
    post_traceback_html_body. Consumers introspecting that attribute
    must read record.task_context instead.

Feat

  • email_alerting: Traced Variables section with file:line reference in email body
  • email_alerting: language alternatives for HTML email body
  • email_alerting: template-driven HTML body from pure metadata

Fix

  • process: parallel runner no longer raises on unrunnable tail

v1.0.5 (2026-01-19)

v1.0.5

Choose a tag to compare

@oliverm91 oliverm91 released this 19 Jan 15:57

v1.0.5 (2026-01-19)

Fix

  • docs: added urls to pyproject file

v1.0.4 (2026-01-19)

v1.0.4

Choose a tag to compare

@oliverm91 oliverm91 released this 19 Jan 15:49

v1.0.4 (2026-01-19)

Fix

  • docs: added pypi badge and pip install instruction to readme

v1.0.3 (2026-01-19)