Skip to main content

A memory-efficient packed representation for bit arrays in pure Python

Project description

BitVector

Test Check Links

The BitVector.py module is for a memory-efficient packed representation of bit vectors and for the processing of such vectors.

If you wish, you can execute the code in BitVector.py directly in this directory prior to the installation of the module. This will execute all of the example code in the module file.

To see a working example of the BitVector module, see the file:

This is a fork from Avi Kak's BitVector 3.5.0.

Development

This project uses uv for dependency management and pre-commit to enforce code quality and conventional commit messages.

After cloning the repository, set up the development environment and register both pre-commit and commit-msg git hooks:

uv sync
uv run pre-commit install --hook-type pre-commit --hook-type commit-msg

To execute the automated test suite and check code coverage:

uv run pytest

To continuously run adaptive, coverage-guided property-based fuzzing on the hypothesis test suite (tests/test_properties.py):

uv run hypothesis fuzz tests/test_properties.py

Releasing

Releases are automated via GitHub Actions. We strictly adhere to Semantic Versioning 2.0.0.

Release Process

To trigger a new package build and release:

  1. Bump Version: Update the version string in pyproject.toml.
    • For final releases, use X.Y.Z (e.g., 1.0.0).
    • For release candidates, append -rc.N (e.g., 1.0.0-rc.1, 1.0.0-rc.2).
  2. Commit and Push: Push the version change to main (typically via a pull request).
  3. Tag and Push: Create and push a git tag matching the version, prefixed with a v:
    # Example for a release candidate
    git tag v1.0.0-rc.1
    git push origin v1.0.0-rc.1
    
    # Example for a final release
    git tag v1.0.0
    git push origin v1.0.0
    

Release Workflow Execution

The Release workflow is triggered by tags matching v[0-9]*.[0-9]*.[0-9]*. It executes the following steps:

  • Verification: Runs the test suite to ensure the package builds cleanly.
  • Build: Compiles package wheels and source distributions using uv build.
  • Publish to PyPI: Publishes the package to PyPI (requires PyPI Trusted Publishing setup).
    • Prerelease versions (like v1.0.0-rc.1) are published as pre-releases on PyPI.
  • GitHub Release: Creates a GitHub Release, uploads the built artifacts (dist/*), and auto-generates release notes.
    • Prerelease tags (containing -rc, -beta, -alpha, or -pre) are automatically marked as Pre-release on GitHub.

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

bitvector_modern-0.0.1.tar.gz (121.2 kB view details)

Uploaded Source

Built Distribution

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

bitvector_modern-0.0.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file bitvector_modern-0.0.1.tar.gz.

File metadata

  • Download URL: bitvector_modern-0.0.1.tar.gz
  • Upload date:
  • Size: 121.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bitvector_modern-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4b3f7d773c2988dee8850fdfab4742182a6d60f6d78391983caf81530dd653db
MD5 13ac0b5aa22fa3ae3f9fc22b7bb54ab8
BLAKE2b-256 c720d9d052cd7600219c04300901261d8ceca6f86bb7ca4182027764ce559990

See more details on using hashes here.

File details

Details for the file bitvector_modern-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bitvector_modern-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf55f9361ff5b48d8b539ee0481b684632803d4ed07069e1641de86cf38bd99c
MD5 9e9388371af0b3daf26e9ddb499cb81d
BLAKE2b-256 8a3e3d8717a34b21e452d8f8759073d3dedd94dad3454674696531fa5d71cc99

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