What's Changed
This release comes with relatively few user-facing changes, mostly concerning supporting Python 3.14 (including experimental support for free-threaded builds) and improving library ergonomics by supporting context managers with opening or creating files.
with hictkpy.File("matrix.cool") as f:
print(f.resolution())This is especially useful when creating .hic or .cool files, as this will ensure that files are correctly finalized and/or closed even in case of exceptions.
In addition, there are a handful of improvements around performance and memory usage.
For example, the to_csr() and to_coo() methods on hictkpy.PixelSelector objects gained an optional parameter to reduce memory usage when reading interactions into sparse matrices (in most cases, this is at the expense of performance):
with hictkpy.File("matrix.cool") as f:
sel = f.fetch()
m = sel.to_csr(low_memory=True)
print(m)Changelog
Improvements
- Support using file handles with context managers by @robomics in #193
- Add support for Python 3.14 and drop Python 3.9 by @robomics in #191
- Build wheels targeting free-threaded Python by @robomics in #199
- Initial support for multi-threading by @robomics in #202
- Refactor code to avoid unnecessary memory copies by @robomics in #189
- Support creating .cool and .hic files without external dependencies by @robomics in #214
Bugfix
- Fix UB in pixel aggregator by @robomics in #188
- Re-enable logging on Windows by @robomics in #197
- Make sure all required files are included in SDist archives by @robomics in #206
- Improve robustness of mapping of numeric Python types to C++ types by @robomics in #179 and #215
Various
- Simplify and improve the build system by @robomics in #187
- Add .gitattributes by @robomics in #190
- Bump dependency versions and simplify by @robomics and @dependabot[bot] in #185, #204, #216, and #198
- Add group for dependencies to build the docs to pyproject.toml by @robomics in #196
- Refactor the CI pipeline by @robomics in #195
hictkpy/pull/196, #207, and #210 - Restructure project layout by @robomics in #212
- Address clang-tidy warnings by @robomics in #213
Full Changelog: v1.3.0...v1.4.0