Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork37
Releases: AlexandreDecan/portion
Releases · AlexandreDecan/portion
The pyproject.toml release
Added
- A
__version__attribute relying onimportlib.metadata. - A
uv.locklock-file for reproducible builds.
Changed
- Drop official support for Python 3.8.
- Switch from
blacktorufffor code style. - Fully migrate to a
pyproject.toml-based project. - Ensure code style consistency (see selected rules in
pyproject.toml). - Extra dependencies are part of the
devdependency group (PEP 735). - Switch from
setuptoolstohatchlingfor buildingportion. - Switch from
coveragetopytest-covfor test coverage.
Assets2
Uh oh!
There was an error while loading.Please reload this page.
2.6.0 - pass_interval in combine
Added
- The
howfunction ofcombinecan access the current interval ifpass_intervalis set (see#97).
Assets2
Uh oh!
There was an error while loading.Please reload this page.
1 person reacted
2.5.0 - Combine IntervalDicts
Assets2
Uh oh!
There was an error while loading.Please reload this page.
1 person reacted
Hotfix 2.4.2
Fixes import error increate_api for Python 3.10+ (see#87)
Assets2
Uh oh!
There was an error while loading.Please reload this page.
1 person reacted
Hotfix 2.4.1
Fix import error when usingcreate_api outside a REPL (see#85).
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Specialized and customized intervals
Added
- An
AbstractDiscreteIntervalclass to ease the creation of specialized discrete intervals (experimental). - A
create_apifunction to generate an API similar to the one ofportionbut configured to use a given subclass ofInterval(experimental, seeSpecialize & customize intervals).
Changed
- Speed up
reprandto_stringforIntervalinstances (see#76, adm271828). - Some internal changes to ease subclassing:
from_stringandfrom_dataaccepts aklassparameter to specify which class should be used to createIntervalinstances (default isInterval).- Add a
klassparameter foropen,closed,openclosed,closedopen,singletonandempty(default isInterval). - Add a
_klassclass attribute inIntervalDictto specify how to createIntervalinstances (default isInterval). IntervalDictusesself.__class__to preserve subclasses when creating new instances.
Assets2
Uh oh!
There was an error while loading.Please reload this page.
2.3.1 - Hotfix for #75
Changed
- Speed up lookups in
IntervalDictfor non-interval keys. - Speed up
iterateby no longer creating singleton instances under the hood. - Drop official support for Python 3.6.
Fixed
- Infinite recursion when a subclass of an
Intervalis compared using>with anIntervalinstance (see#75).
Assets2
Uh oh!
There was an error while loading.Please reload this page.
1 person reacted
2.3.0
104cd6d This commit was created on GitHub.com and signed with GitHub’sverified signature. The key has expired.
Added
- Support Python 3.10.
IntervalDict.as_dicthas an optionalatomic=Falseparameter that, if set toTrue, returns intervals that are atomic.- Experimental support for structural pattern matching (on
left,lower,upperandright).
Fixed
- (breaking) Set
list(P.empty()) == [], i.e., the empty interval is a disjunction of no interval (see#72). - (breaking) For consistency, the empty interval is never
<,>,<=, nor>=when compared to another interval. - Comparing an interval and a value is deprecated since it is ill-defined when the value is on the left of
<=or>=. Convert values to singletons first.
Assets2
Uh oh!
There was an error while loading.Please reload this page.
2.2.0 - Subclassing & speed-ups
Added
- SupportPEP 517.
Changed
- Some internal changes to ease subclassing
Interval(see#58):- Use
self.__class__instead ofIntervalto create new instances; - Deprecate and move
mergeablefunction toInterval._mergeableclass method; Interval.from_atomicis now a class method instead of a static method.
- Use
- Speed up lookups in
IntervalDict(#65, Jeff Trull). - Speed up removals in
IntervalDict. - Speed up intersection for non-overlapping intervals (#66, Jeff Trull).
- Speed up
.overlapsand.containsfor non-overlapping intervals/items.
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Hot fix for `from_string`
Fixed
from_stringraises aValueErrorif given string cannot be parsed to an interval (#57).
Changed
- Drop official support for Python 3.5.
- Use
blackas official code formatting.
Assets2
Uh oh!
There was an error while loading.Please reload this page.