Metadata-Version: 2.4
Name: bitvector-modern
Version: 0.0.1
Summary: A memory-efficient packed representation for bit arrays in pure Python
Project-URL: Homepage, https://engineering.purdue.edu/kak/dist/BitVector-3.5.0.html
Project-URL: Download, https://engineering.purdue.edu/kak/dist/BitVector-3.5.0.tar.gz
Author-email: Avinash Kak <kak@purdue.edu>
Maintainer-email: Avinash Kak <kak@purdue.edu>
License: PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
        
        1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and
           the Individual or Organization ("Licensee") accessing and otherwise using this
           software ("Python") in source or binary form and its associated documentation.
        
        2. Subject to the terms and conditions of this License Agreement, PSF hereby
           grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
           analyze, test, perform and/or display publicly, prepare derivative works,
           distribute, and otherwise use Python alone or in any derivative
           version, provided, however, that PSF's License Agreement and PSF's notice of
           copyright, i.e., "Copyright © 2001 Python Software Foundation; All Rights
           Reserved" are retained in Python alone or in any derivative version
           prepared by Licensee.
        
        3. In the event Licensee prepares a derivative work that is based on or
           incorporates Python or any part thereof, and wants to make the
           derivative work available to others as provided herein, then Licensee hereby
           agrees to include in any such work a brief summary of the changes made to Python.
        
        4. PSF is making Python available to Licensee on an "AS IS" basis.
           PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.  BY WAY OF
           EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
           WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
           USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
        
        5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
           FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
           MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE
           THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
        
        6. This License Agreement will automatically terminate upon a material breach of
           its terms and conditions.
        
        7. Nothing in this License Agreement shall be deemed to create any relationship
           of agency, partnership, or joint venture between PSF and Licensee.  This License
           Agreement does not grant permission to use PSF trademarks or trade name in a
           trademark sense to endorse or promote products or services of Licensee, or any
           third party.
        
        8. By copying, installing or otherwise using Python, Licensee agrees
           to be bound by the terms and conditions of this License Agreement.
License-File: LICENSE
Keywords: bit array,bit string,bit vector,logical operations on bit fields
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Utilities
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# BitVector

[![Test](https://github.com/schwehr/bitvector-modern/actions/workflows/test.yml/badge.svg)](https://github.com/schwehr/bitvector-modern/actions/workflows/test.yml)
[![Check Links](https://github.com/schwehr/bitvector-modern/actions/workflows/lychee.yml/badge.svg)](https://github.com/schwehr/bitvector-modern/actions/workflows/lychee.yml)

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:

- [`examples/demo.py`](examples/demo.py)

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

## Development

This project uses [`uv`](https://docs.astral.sh/uv/) for dependency management
and [`pre-commit`](https://pre-commit.com/) 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:

```bash
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:

```bash
uv run pytest
```

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

```bash
uv run hypothesis fuzz tests/test_properties.py
```

## Releasing

Releases are automated via GitHub Actions. We strictly adhere to
[Semantic Versioning 2.0.0](https://semver.org/).

### 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`).
1. **Commit and Push**: Push the version change to `main` (typically via a pull
   request).
1. **Tag and Push**: Create and push a git tag matching the version, prefixed
   with a `v`:
   ```bash
   # 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.
