Skip to main content

Template-driven package recipe updater powered by nvchecker

Project description

pkgpulse

pkgpulse is a template-driven package recipe updater with a broad scope:

  • one TOML config file
  • nvchecker Python API for update detection
  • Jinja2 templates with user-defined template and output paths
  • actions as plugins, with git, webhook, and exec at the same level

It is aimed at package recipe repositories rather than one packaging format.

Quick Start

cd pkgpulse
uv sync
uv run pkgpulse --help
uv run pkgpulse check
uv run pkgpulse diff
uv run pkgpulse render
uv run ruff check .
uv run pytest

Local Hooks

This repository is configured for local hook management with prek.

cd pkgpulse
prek validate-config .pre-commit-config.yaml
prek install
prek install-hooks
prek run --all-files

If you invoke prek from the monorepo root, point it at this project:

prek -C pkgpulse validate-config .pre-commit-config.yaml
prek -C pkgpulse run --all-files

Hook policy:

  • pre-commit: standard file hygiene checks plus ruff

For full project validation, keep using:

uv run pkgpulse validate
uv run pytest -q

Automation Templates

Repository-local automation templates live here:

  • GitHub: .github/actions/pkgpulse/action.yaml
  • Forgejo: .forgejo/actions/pkgpulse/action.yaml
  • GitLab: .gitlab/pkgpulse.yml

Use these when you want reusable platform-native execution templates instead of inlining setup and pkgpulse invocation logic in every pipeline file.

Configuration

The default config file is pkgpulse.toml.

[state]
oldver = ".pkgpulse/oldver.json"
newver = ".pkgpulse/newver.json"

[nvchecker]
max_concurrency = 8
tries = 2

[[targets]]
name = "nvchecker-release"
template = "templates/example.recipe.j2"
output = "build/nvchecker-release.txt"

[targets.check]
source = "github"
github = "lilydjwg/nvchecker"
use_max_tag = true

[targets.context]
package_name = "nvchecker"
summary = "Example package rendered by pkgpulse"
homepage = "https://github.com/lilydjwg/nvchecker"
archive_base = "https://github.com/lilydjwg/nvchecker/archive/refs/tags"

[[targets.actions]]
type = "exec"
when = "changed"
command = ["printf", "rendered %s -> %s\\n", "{{ job.name }}", "{{ paths.output }}"]

Additional example configs live under examples/:

  • examples/config/pkgpulse.example.toml: render example with an exec action
  • examples/config/pkgpulse-webhook-action.example.toml: webhook example for downstream triggers
  • examples/config/pkgpulse-git-action.example.toml: commit example with a git action
  • examples/config/pkgpulse-strategies.example.toml: multi-target example showing release and latest-commit packaging side by side

Example templates live under examples/templates/.

Template Context

Every target render gets these objects:

  • job: target metadata, template path, output path, and user context
  • check: latest nvchecker result, including version, old_version, changed, url, revision, gitref
  • paths: project root, template path, output path
  • context: the raw [targets.context] mapping
  • now: current UTC timestamp

The keys from [targets.context] are also merged into the top-level template namespace.

Action Types

  • exec
  • webhook
  • git

Each action supports when = "always" | "changed" | "updated" | "rendered".

Multi-Strategy Layout

pkgpulse models this by defining multiple targets:

  • one target can follow tags directly from the upstream git remote
  • another target can follow the latest upstream commit with source = "git" and use_commit = true

See examples/config/pkgpulse-strategies.example.toml for a concrete example that renders both a release spec and a git snapshot spec from the same upstream project.

Commands

  • pkgpulse check
  • pkgpulse render
  • pkgpulse diff
  • pkgpulse validate
  • pkgpulse run

pkgpulse run --dry-run renders in memory and prints diffs without writing files or executing actions.

Workflow Examples

Repository automation examples for GitHub Actions, GitLab CI, and Forgejo Actions live under examples/workflows/. They are optional outer workflow examples. The primary reusable automation entrypoints are the local templates listed above.

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

pkgpulse-0.1.3.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pkgpulse-0.1.3-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file pkgpulse-0.1.3.tar.gz.

File metadata

  • Download URL: pkgpulse-0.1.3.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pkgpulse-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6ff0600721203bf04595652b11b336f86250e7cd40ce686ba9d3da4cb57838c7
MD5 992c1eb736c8b566063edab0220bc73b
BLAKE2b-256 2102a3ddbba2c16bd963f5fbf697aa7e1bfbc5d6f047b1dd842be8677dc974c7

See more details on using hashes here.

File details

Details for the file pkgpulse-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pkgpulse-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pkgpulse-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc3f83c818ee5db2d416eab22fd5019d553defe9f3b4938bcf6144036245de19
MD5 12d1db5735173d0a9966d2dc4968687e
BLAKE2b-256 32b227b02c942accad266271e67f33ca63676a7e48b71895eafc7fe989c038d4

See more details on using hashes here.

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