Releases: AlexandreDecan/portion
Releases · AlexandreDecan/portion
Faster IntervalDict operations
Much faster get
, copy
and |
operations for IntervalDict
.
2.1.3-post1 (soften dependency constraint)
Soften dependency constraint towards sortedcontainers (#47).
Hotfix for #41
Fixed
- Empty intervals are contained in all intervals (#41).
Hot fix for #38, #39 and small changes to support #37
Added
IntervalDict
supports|
and|=
, the same waydict
will do starting from Python 3.9 (#37).
Fixed
Fix regression for IntervalDict
Fix a regression introduced in 2.1.0 for IntervalDict
(#36).
IntervalDict views and fixes
Added
IntervalDict.as_dict()
to export its content to a classical Pythondict
.
Changed
IntervalDict.keys()
,values()
anditems()
return view objects instead of lists.
Fixed
IntervalDict.popitem()
now returns a (key, value) pair instead of anIntervalDict
.- The documentation of
IntervalDict.pop()
now correctly states that the value (and not the key)
is returned.
Bug fix #28
Fixes #28
2.0.1 - Bug fix
Fix invalid representations of non-atomic intervals composed of a singleton (#22).
2.0.0 - Renamed library, large refactoring and improved performance
Added
i.empty
to check for interval emptiness.i.atomic
to check for interval atomicity.- An
adjacent
method to test whether two intervals are adjacent. i.__getitem__
supports slices.- Infinities define a hash value.
- Static method
Interval.from_atomic(left, lower, upper, right)
to create an interval composed of a single atomic interval (replacesAtomicInterval(left, lower, upper, right)
).
Changed
- (breaking)
python-intervals
has been renamedportion
. - (breaking) Many (optional) parameters are converted to keyword-only arguments:
- for
from_string
andto_string
:bound
,disj
,sep
,left_open
,left_closed
,right_open
,right_closed
,pinf
andninf
; - for
from_data
andto_data
:pinf
andninf
; - for
iterate
:base
andreverse
; - for
Interval.replace
:ignore_inf
.
- for
- (breaking)
incr
is replaced bystep
initerate
. - (breaking) For consistency with
range
, thestep
parameter initerate
is always added even ifreverse=True
. - (breaking)
i.enclosure
is a property and no longer a method. - (breaking) Indexing or iterating on the atomic intervals of an
Interval
returnsInterval
instances instead ofAtomicInterval
ones. - (breaking) An interval is hashable if and only if its bounds are hashable.
- Huge performance increase for creation, union, intersection, complement and difference of intervals (#21).
CLOSED
andOPEN
are members of theBound
enumeration.- Large refactoring to encapsulate
AtomicInterval
and all its operations inInterval
. - Restructure package in modules instead of a flat file.
- Reorganise tests in modules and classes instead of a flat file.
- Reorganise changelog with explicit categories.
Removed
- (breaking) Drop support for Python 2.7 and 3.4 since they reached end-of-life.
- (breaking)
AtomicInterval
is anamedtuple
and is no longer part of the public APP. - (breaking) Remove
i.to_atomic()
(usei.enclosure
instead). - (breaking) Remove
i.is_empty()
(usei.empty
instead). - (breaking) Remove
i.is_atomic()
(usei.atomic
instead). - (breaking)
CLOSED
andOPEN
do no longer define an implicit Boolean value. Use~
instead ofnot
to invert a bound. - (breaking) Remove deprecated
permissive
ini.overlaps
. - (breaking) Remove
adjacent
ini.overlaps
, usei.adjacent
method instead.
Fixed
Rename to portion
1.10.0-post1, rename library to portion
.