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.
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-msgTo execute the automated test suite and check code coverage:
uv run pytestTo run coverage without benchmark tests and generate an HTML report:
uv run pytest --benchmark-skip --cov-report=htmlTo continuously run adaptive, coverage-guided property-based fuzzing on the
hypothesis test suite (tests/test_properties.py):
uv run hypothesis fuzz tests/test_properties.pyReleases are automated via GitHub Actions. We strictly adhere to Semantic Versioning 2.0.0.
To trigger a new package build and release:
- 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).
- For final releases, use
- Commit and Push: Push the version change to
main(typically via a pull request). - 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
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.
- Prerelease versions (like
- 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.
- Prerelease tags (containing