dyce release notes
0.6.2
- Adds the
H.drawconvenience method for treating a histogram as a deck rather than a die.
0.6.1
- Fixes
P.totalto return1for empty pools, consistent with the empty product. (See this explanation). - Renames
dyce.evaluation._LimitTtodyce.evaluation.LimitT. - Fixes issues pertaining to histograms with zero totals after allowing outcomes with zero counts in non-normalized
Hobjects. - Fixes issue that would lead to incorrect results when making certain arbitrary selections with heterogeneous pools (e.g., with
P.rolls_with_counts).
0.6.0
- Now requires
numerary~=0.4.3. - Adds the
expandabledecorator as well as theforeachandexplodeconvenience functions. - Deprecates
P.foreach,H.foreach, andH.substitute. - Allows outcomes with zero counts in non-normalized
Hobjects. Outcomes with zero counts are dropped when callingH.lowest_terms. Adds theH.zero_fillconvenience method. - Fixes memoization in Risus multi-round combat translation.
- Migrates from
setuptools_scmtoversioningitfor more flexible version number formatting. - Allows deployments to PyPI from CI based on tags.
- Uses JupyterLite instead of Binder for examples.
- Refactors
P.is_homogeneousproperty into a similarly-named method and adds theP.totalmethod property. - Removes
H.order_stat_func_for_nand instead caches order stat functions forninsideH.order_stat_for_n_at_pos.
0.5.2
- Updates binder links that fix requirements ranges.
0.5.1
- Fixes broken binder links in docs.
- Adds the
precision_limitargument toH.substituteandH.explode.
0.5.0
- Breaks
dyce.vizout intoanydyce. - Removes use of
numerary.types.…SCUtypes. - Adds the
H.foreachandP.foreachclass methods. - Migrates
resolve_dependent_probabilityto theH.foreachclass method.
0.4.5
- Fixes this bullshit (no, really, I’m serious this time).
- Adds
FilterRoller. - Adds
SubstitutionRoller.
0.4.4
- Removes
…_gh.pnghack now that this dumpster fire is at least partially resolved. - Refines Tension Pool example.
- Adds Ironsworn example.
- Removes faulty (correctly-derived, but misapplied) math in Risus “Evens Up” example.
- Adds detail around dependent probabilities.
- Adds experimental
dyce.h.resolve_dependent_probabilityfunction.
0.4.3
- Removes dependencies on deprecated
numerary.types.…SCTtuples - Adds Angry GM Tension Pool mechanic translation.
0.4.2
- Removes calls to
os.get_terminal_sizeto retain utility in environments without terminals. Fixes #5. Thanks @sudo-simon!!
0.4.1
- Splits out protocol checking into its own fancy library:
numerary! - Is now available on PyPI as
dyce_, thanks to the generosity of David Eyk! - Introduces experimental generic
walkfunction and supporting visitor data structures. - Uses
pygraphvizto automate class diagram generation. (See the note on special considerations for regenerating class diagrams in the hacking quick start.) - Introduces experimental use of
numpyfor RNG, if present. - Migrates to using
pyproject.tomlandsetup.cfg. - Adds missing
py.typedto ensure clients get type checking. (Whoops.)
0.4.0
Breaking changes
Warning
The following changes are not backward compatible. Please review before upgrading.
- Renames
HAbleTandHAbleOpsMixintoHableTandHableOpsMixin. Uses alternate spellings. - Removes deprecated non-flattening unary operation methods
P.__neg__andP.__pos__. Uses, e.g.,P.umap(operator.__neg__)orP(-h for h in p)instead. - Removes deprecated synonym methods
H.evenandH.odd. UsesH.is_evenandH.is_oddinstead. - Removes deprecated synonym package
dyce.plt. Usesdyce.vizinstead. -
Removes special case handling of
H({})for addition and subtraction. Check for code that relied on, e.g.,h + H({})resolving toh. It is probably not correct. If the behavior is desired, consider eliminating empty histograms before performing calculations. E.G.,h1 + h2 if h2 else h1.See also the
sum_hfunction, which ensures the result is always a histogram:1 2 3 4 5
>>> from dyce.h import sum_h >>> sum(()) 0 >>> sum_h(()) H({})Note, however, that sums including empty histograms will be always result in empty histograms:
1 2 3 4
>>> from dyce import H >>> hs = (H(6), H(6), H(6), H({})) >>> sum_h(hs) H({})If a different result was desired, adapting our advice from above would yield something like:
1 2
>>> sum_h(h for h in hs if h) H({3: 1, 4: 3, 5: 6, 6: 10, ..., 16: 6, 17: 3, 18: 1})
Other changes
- Documentation overhaul including augmented examples and reorganized images and JavaScript.
- Fixes
H({}).format()bug. - Adds
beartyperuntime type checking. - Maintains support for Python 3.7 (for now).
0.3.2
- Emergency release to
cover upaddress thisembarrassmenttypo. 😬😅
0.3.1
- Adds these release notes.
- Boosts
isinstanceperformance withdyce’s proprietary numericProtocols. - Reinstates support for Python 3.7
(for now). - Adds
H.is_evenandH.is_odd. - Deprecates synonym methods
H.evenandH.odd. - Introduces experimental
H.totalproperty. - Removes incorrectly non-flattening unary operation methods
P.__abs__andP.__invert__. - Deprecates non-flattening unary operation methods
P.__neg__andP.__pos__. - Renames experimental
P.homogeneousproperty toP.is_homogeneous. - Introduces experimental
RandRollprimitives. - Removes
coerceparameter fromH.map,H.rmap, andH.umap. - Renames
dyce.plttodyce.viz. - Deprecates synonym package
dyce.plt.
0.3.0
dyce goes beta!
Non-experimental features should be considered stable.