Skip to content

Repository files navigation

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 run coverage without benchmark tests and generate an HTML report:

uv run pytest --benchmark-skip --cov-report=html

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.

About

A bit vector module in pure Python. Use git VCS and improve the overall system to use the current best practices for a Python project. The API is changing while the project version is pre-1.0. Fork of https://engineering.purdue.edu/kak/dist/

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages