Closed Adamtaranto closed 2 months ago
Was using toml library because I didn't know about tomllib. Will look into it.
@ctb Looks like tomllib
was introduced in Python 3.11.
Do we want 3.11 to be the min version required for this package? or keep the external toml
import?
I'm going to leave it for now and merge this branch. Can update later.
New dunder methods for more Pythonic interaction:
__setitem__
, Set values using the indexing syntaxobj[key] = value
__getitem__
, Query an object to using the indexing syntaxobj[key]
len()
method, returns number of keys in KmerCountTable.New attributes:
.version
, returns oxli version that object was created with (will use later when serialising objects).consumed
, returns total number of bases consumed using eithercount()
orconsume()
.sum_counts
, returns sum total of all counts in table.Note: Have added "toml" package as a conditional dependency for testing
.version
. It is inpyproject.toml
under optional dependencies. Will be installed if installing oxli from repo viapip install -e .[test]
Closes #20