What’s new
v1.9.1 (2022-01-27)
Note that installing genno[pyam]
(including via genno[compat]
) currently forces the installation of an old version of pint
; version 0.17 or earlier.
Users wishing to use genno.compat.pyam
should first install genno[pyam]
, then pip install --upgrade pint
to restore a recent version of pint (0.18 or newer) that is usable with genno.
v1.9.0 (2021-11-23)
Fix error messages raised by
AttrSeries.sel()
on incorrect usage (PR #52).genno
no longer supports Python 3.6 or earlier, followingxarray
(PR #52).
v1.8.1 (2021-07-27)
Bug fixes
v1.8.0 (2021-07-27)
Improve caching (PR #50):
Handle a lambda functions in
cache()
-decorated code.Add
Encoder.register()
andEncoder.ignore()
for downstream code to extend hashing of function arguments into cache keys.Expand docs.
v1.7.0 (2021-07-22)
Add
computations.interpolate()
and supportingAttrSeries.interp()
(PR #48). This code works around issues pandas#25460 and pandas#31949.Computer.cache()
now also invalidates cache if the compiled bytecode of the decorated function changes (PR #48).Separate and expand docs of Caching to show how to check modification time and/or contents of files (#49, PR #48).
Add
Quantity.units
attribute for access to units (PR #48).AttrSeries.dims
andAttrSeries.coords
behave likeDataArray
for 1-D quantities (PR #48)
v1.6.0 (2021-07-07)
v1.5.2 (2021-07-06)
v1.5.1 (2021-07-01)
Bug fix:
infer_keys()
raisesAttributeError
under some circumstances (PR #45).
v1.5.0 (2021-06-27)
Adjust
test_assign_coords()
for xarray 0.18.2 (PR #43).Make
Key.dims
order-insensitive so thatKey("foo", "ab") == Key("foo", "ba")
(PR #42); make corresponding changes toComputer
(PR #44).Fix “
AttributeError
: ‘COO’ object has no attribute ‘item’” onSparseDataArray.item()
(PR #41).
v1.4.0 (2021-04-26)
plotnine.Plot.save()
automatically converts inputs (specified withPlot.inputs
) fromQuantity
toDataFrame
, but others (e.g. basic Python types) are passed through unchanged (PR #40).plotnine.Plot.save()
generates no output file ifgenerate()
returnsNone
/emptylist
.Quote
dict
argument toComputer.aggregrate()
(for grouped aggregation) to avoid collisions between its contents and other graph keys.
v1.3.0 (2021-03-22)
Bump minimum version of
sparse
from 0.10 to 0.12 and adjust to changes in this version (PR #39)Remove
SparseDataArray.equals()
, obviated by improvements insparse
.
Improve
AttrSeries
(PR #39)Implement
drop_vars()
andexpand_dims()
.assign_coords()
can relabel an entire dimension.sel()
can acceptDataArray
indexers and rename/combine dimensions.
v1.2.1 (2021-03-08)
Bug fix: Provide abstract
Quantity.to_series
method for type checking in packages that depend ongenno
.
v1.2.0 (2021-03-08)
Quantity
becomes an actual class, rather than a factory function;AttrSeries
andSparseDataArray
are subclasses (PR #37).AttrSeries
gains methodsbfill()
,cumprod()
,ffill()
, andshift()
(PR #37)computations.load_file()
uses the skipinitialspace parameter topandas.read_csv()
; extra dimensions not mentioned in the dims parameter are preserved (PR #37).AttrSeries.sel()
acceptsxarray.DataArray
for xarray-style indexing (PR #37).
v1.1.1 (2021-02-22)
Bug fix:
Computer.add_single()
incorrectly callscheck_keys()
on iterables (e.g.pandas.DataFrame
) that are not computations (PR #36).
v1.1.0 (2021-02-16)
computations.add()
transforms compatible units, and raises an exception for incompatible units (PR #31).Improve handling of scalar quantities (PR #31).
Plot
is fault-tolerant: if any of the input quantities are missing, it becomes a no-op (PR #31).Computer.configure()
accepts a fail argument, allowing partial handling of configuration data/files, with errors logged but not raised (PR #31).New
computations.pow()
(PR #31).
v1.0.0 (2021-02-13)
Adjust for usage by
ixmp.reporting
andmessage_ix.reporting
(PR #28):Reduce minimum Python version to 3.6. This is lower than the minimum version for xarray (3.7), but matches ixmp, etc.
Remove
compat.ixmp
; this code has been moved toixmp.reporting
, replacing what was there. Likewise, removecompat.message_ix
.Simplify the form & parsing of
iamc:
section entries in configuration files:Remove unused feature to add
group_sum()
to the chain of tasks.Keys now conform more closely to the arguments of
Computer.convert_pyam()
.
Move argument-checking from
as_pyam()
toconvert_pyam()
.- Simplify semantics of
genno.config.handles()
decorator. Remove
CALLBACKS
feature, for now.
- Simplify semantics of
Computer.get_comp()
andrequire_compat()
are now public methods.Expand tests.
Protect
Computer
configuration fromdask.optimization.cull()
; this prevents infinite recursion if the configuration contains strings matching keys in the graph. Addunquote()
(#25, PR #26).Simplify
collect_units()
and improve unit handling inratio()
(#25, PR #26).Add file-based caching via
Computer.cache()
andgenno.caching
(#20, PR #24).
v0.4.0 and earlier
v0.4.0 (2021-02-07)
Add file-based configuration in
genno.config
and associated documentation (#8, PR #16).
v0.3.0 (2021-02-05)
Add Plotnine (compat.plotnine) compatibility (PR #15).
Add a Concepts and usage overview to the documentation (PR #13).
v0.2.0 (2021-01-18)
Increase test coverage to 100% (PR #12).
Port code from
message_ix.reporting
(PR #11).Add
compat.pyam
.Add a name parameter to
load_file()
.
v0.1.0 (2021-01-10)
Initial code port from
ixmp.reporting
.