Skip to main content

Zack's Useful Utilities

Project description

zuu

zack's useful utilities

Note

This library has gone through several structural changes, which made it harder for other packages to depend on it reliably.

To avoid that going forward, the package now follows a permanent versioned-folder design. If a future change would alter existing behavior, a new feature-version folder will be created instead of changing the previous implementation in place.

The package version format is:

{yearquarter}.{feature version}.{no breaking change build}

The package structure is:

zuu/
|- v202601_1/  // starting implementation quarter + feature version
    ...

Setup

Install the development environment with uv:

uv sync --only-dev

Install Lefthook for local git hooks:

uv tool install lefthook
lefthook install

Refresh Current

src/zuu/current is a generated thin export layer. It should re-export the newest version folder by resolving the highest folder name matching v{yearquarter}_{minor}.

Refresh it with:

uv run python scripts/update_current.py

Check whether it is already up to date without modifying files:

uv run python scripts/update_current.py --check

The pre-commit hook uses an automatic mode instead. If src/zuu/current is stale, the hook regenerates it and stages the updated files automatically.

For example, if both v202602_1 and v202603_1 exist, the script points current at v202603_1. If both v202602_1 and v202602_3 exist, it points current at v202602_3.

Bump Micro Version

When a change stays within the existing newest version folder and does not introduce a new v{yearquarter}_{minor} folder under src/zuu, bump the third segment of the package version with:

uv run python scripts/bump_micro_version.py

This script only updates pyproject.toml when the current package version already matches the newest versioned source folder. If a newer version folder exists, it fails instead of guessing the next feature version.

To verify that staged changes under the newest version folder include the required micro version bump without modifying files:

uv run python scripts/bump_micro_version.py --check

The pre-commit hook uses an automatic mode instead. If the newest version folder changed and the staged package version has not been bumped yet, the hook increments pyproject.toml and stages that file for the commit.

Hooks

The repo includes lefthook.yml with pre-commit automation for both generated src/zuu/current exports and micro version bumps. If a commit still fails, it means the hook could not safely fix the problem automatically and you should run uv run python scripts/update_current.py or uv run python scripts/bump_micro_version.py, review the resulting changes, and commit again.

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

zuu-202602.1.2.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

zuu-202602.1.2-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file zuu-202602.1.2.tar.gz.

File metadata

  • Download URL: zuu-202602.1.2.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zuu-202602.1.2.tar.gz
Algorithm Hash digest
SHA256 3578474c29a01928c6c785e85cbdb173c0e7b0a499827752eb87db6079ed3835
MD5 21c488038c1dce7a53fb52486893287b
BLAKE2b-256 794dc562de565386818b5951d94e09b02206c1ba9b5174d3670f26f1aa4ced75

See more details on using hashes here.

Provenance

The following attestation bundles were made for zuu-202602.1.2.tar.gz:

Publisher: publish.yml on ZackaryW/zuu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zuu-202602.1.2-py3-none-any.whl.

File metadata

  • Download URL: zuu-202602.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zuu-202602.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f38793dd7f0151498e0ca731b5d3737ff546b50a0cf1add712de3e15129afabf
MD5 2ec1df50420a9b4fefd5d767a6121202
BLAKE2b-256 3629bbf44c037b40314f79ec358225ada16037d611045096818465dab7b9a8e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for zuu-202602.1.2-py3-none-any.whl:

Publisher: publish.yml on ZackaryW/zuu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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