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.5.tar.gz (18.2 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.5-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zuu-202602.1.5.tar.gz
Algorithm Hash digest
SHA256 b9149f9c0f11e8edd1118ea326e7e6936ddc52839da894114b5534cfa7120f9e
MD5 0dcd66f5898d908e2f235754900e7330
BLAKE2b-256 8e6e773e59263477c271b25165e2caba9669054f2bc1fc1bc79262a194dca1af

See more details on using hashes here.

Provenance

The following attestation bundles were made for zuu-202602.1.5.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.5-py3-none-any.whl.

File metadata

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

File hashes

Hashes for zuu-202602.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 799ceb221977818a8e9dd7a8a1bc928879a6bcc4d6a509c6ce14922a8906eb98
MD5 10e42fe416c75791bc64734904a3bddb
BLAKE2b-256 b925c67007526cdda1959f78b631ab85772a62c3e12dc1d1a560f232b2cc3556

See more details on using hashes here.

Provenance

The following attestation bundles were made for zuu-202602.1.5-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