I just did the first proper release of bitvector-modern with version 0.0.3. I hadn't setup 2 factor authentication (2FA) for my personal PyPI identity, but now I have so I can actually send updates out. I have been out of town with only mobile phone access to the internet, so I have been doing a bunch of updates to the package via Google Jules. That process went really well in general. I had some trouble getting it to do more ambitious changes line adding mmap and numpy based implementations, but you should see from release notes that there were plenty of successes.
Sadly, I did the 0.0.2 release just before this incorrectly, so that's where the changes are listed, but that triggered a 0.0.1 pypi release. I could yank it, but I don't think I need to as nothing is broken. The changes for 0.0.3 are in 0.0.1 on pypi.
I wouldn't recommend using bitvector-modern now for anything other than experimental work as I intend to rework the API in a few intrusive ways. Top of the list is simplifying __init__ and putting the extra functionality into class methods of the for from_. I have already removed the filename and filepointer args from __init__, but I have yet to add back file reading outside of __init__.
At this point, there are quite a few performance improvements over the old library. For starters, I switched the array.array storage from 16-bit to 64-bit blocks. This means that BitVectors smaller than 48-bits will take more storage, but that should not be a problem unless folks are working with large numbers of very small bitvectors that have to remain in memory. With the in-progress Protocol class work, that issue should be mitigated as the package should be able to let the user pick an implementation that works best with their use case.
I hope to start working on my old noaadata package soon and port it to bitvector-modern. I'm excited for the increase performance and improved usability.
The release:
- https://pypi.org/project/bitvector-modern/0.0.3/
- https://github.com/schwehr/bitvector-modern/releases/tag/v0.0.3
- docs: add Code of Conduct by @schwehr in #33
- style(docs): format CODE_OF_CONDUCT.md with mdformat by @schwehr in #35
- test(properties): add hypothesis property-based testing and fix iadd padding bug by @schwehr in #44
- ci(github): add zizmor static analysis of GitHub Actions by @schwehr in #46
- refactor: convert asserts to ValueErrors and add bandit check by @schwehr in #52
- ci: remove osv-scanner workflow by @schwehr in #54
- ⚡ perf: optimize
runsto avoid unnecessary list allocation by @google-labs-jules[bot] in #55 - ๐งน Refactor complex type ignoring map into list comprehension by @google-labs-jules[bot] in #57
- ๐งน [Code Health] Remove commented-out code in BitVector.py by @google-labs-jules[bot] in #58
- ⚡ Optimize divide_into_two to use native slicing by @google-labs-jules[bot] in #56
- ⚡ Optimize integer conversion using bitwise shifts by @google-labs-jules[bot] in #59
- ⚡ [Performance] Optimize string concatenation in
_readblockby @google-labs-jules[bot] in #60 - ๐ Use cryptographically secure pseudo-random number generator by @google-labs-jules[bot] in #61
- docs: add mkdocs and initial documentation outline by @google-labs-jules[bot] in #65
- chore: add .editorconfig file by @google-labs-jules[bot] in #68
- Add slots to BitVector class by @google-labs-jules[bot] in #70
- Create BitVectorProtocol by @google-labs-jules[bot] in #67
- Migrate BitVector to use 64-bit array (Q type) by @google-labs-jules[bot] in #71
- feat: add py.typed marker for PEP 561 compliance by @google-labs-jules[bot] in #75
- fix: resolve
hexlisttype collision in BitVector constructor by @google-labs-jules[bot] in #78 - Refactor BitVector array type "Q" to a constant ARRAY_TYPE by @google-labs-jules[bot] in #81
- Remove list option from self.vector in BitVector by @google-labs-jules[bot] in #82
- Change divide_into_two to return a tuple instead of a list by @google-labs-jules[bot] in #86
- Refactor: Rename local variable intVal to int_val by @google-labs-jules[bot] in #85
- Rename _getsize to len by @google-labs-jules[bot] in #87
- build(deps): bump astral-sh/setup-uv from e58605a9b6da7c637471fab8847a5e5a6b8df081 to d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 by @dependabot[bot] in #83
- Refactor BitVector to use getitem instead of _getbit by @google-labs-jules[bot] in #88
- Optimize BitVector.eq using zip by @google-labs-jules[bot] in #95
- Refactor
gf_MIto return f-string instead of string tuple by @google-labs-jules[bot] in #97 - style: Rename
reverseListtoreverse_listby @google-labs-jules[bot] in #98 - Simplify is_power_of_2_sparse conditional by @google-labs-jules[bot] in #99
- Refactor tuple return syntax in divide_into_two by @google-labs-jules[bot] in #100
- Optimize permute and unpermute methods by @google-labs-jules[bot] in #101
- Refactor get_bitvector_in_ascii to use comprehension by @google-labs-jules[bot] in #102
- refactor: rename int_val to int by @google-labs-jules[bot] in #103
- Remove _setbit and only use setitem by @google-labs-jules[bot] in #104
- Refactor BitVector size attribute to be private by @google-labs-jules[bot] in #105
- refactor: simplify get_bitvector_in_hex with comprehension by @google-labs-jules[bot] in #106
- Optimize shift_left and shift_right implementations by @google-labs-jules[bot] in #107
- Remove Any from reset signature by @google-labs-jules[bot] in #108
- Optimize
resetmethod performance using direct array operations by @google-labs-jules[bot] in #109 - Remove deprecated length method from BitVector by @google-labs-jules[bot] in #110
- Optimize BitVector.reverse() by @google-labs-jules[bot] in #111
- docs: Add explanatory comment to ARRAY_TYPE by @google-labs-jules[bot] in #112
- Remove file I/O operations from BitVector by @google-labs-jules[bot] in #113
- chore: remove array like subscripting comment by @google-labs-jules[bot] in #116
- Refactor: Extract
textstringinstantiation tofrom_stringby @google-labs-jules[bot] in #115 - chore(github): setup CODEOWNERS with repository owners by @schwehr in #119
- Add
__reversed__benchmark and optimized implementation by @schwehr in #121 - ci(github): configure PyPI secret token for release publishing by @schwehr in #122