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

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 checks that fail when src/zuu/current is stale relative to the newest v{yearquarter}_{minor} folder or when staged changes update the newest version folder without the required micro version bump. If the hook fails, run uv run python scripts/update_current.py or uv run python scripts/bump_micro_version.py as appropriate, 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.1.tar.gz (6.5 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.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zuu-202602.1.1.tar.gz
  • Upload date:
  • Size: 6.5 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.1.tar.gz
Algorithm Hash digest
SHA256 9759350e3287c2d4cb3453ea3430bb2469f2464d557b98eea0cae5c22882d101
MD5 8d6d1419cd43d2ecb6d1d245bc632630
BLAKE2b-256 3f634f73f023e41975d55de31a5c267c00d55926e8add23bed02f1d6a9e336f9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zuu-202602.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ea9d676968868027a39bad0f1c872258ff45d904924b36d32e8c7dd650cdbd
MD5 e74878a8c2753da481bf0d2cdd31b2df
BLAKE2b-256 9b6825f7eac66f91d9cb154b2c61853d6ab7bd00622be8c6bb55da9a8f0f0521

See more details on using hashes here.

Provenance

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