It is now possible to specify a fixed structure for NTable.from_nested_object.
INCOMPATIBLE CHANGE: Renamed :postprocess option in NTable.from_nested_object to :postprocess_labels.
NTable.from_nested_object learned :postprocess_range, which postprocesses a range for an IndexedAxis.
NTable.from_nested_object raised NoSuchCellError if you used :postprocess_label to remove a label accessed in the data. Now the data is just thrown away silently.
Calling decompose on a “shared” table (i.e. a slice previously obtained from decompose or shared_slice) yielded the wrong table. (The offset into the original table was incorrect.) Fixed.
Implemented a slightly nicer inspect for each type.
NTable::Structure and NTable::AxisInfo are now Enumerable, letting you iterate over the axes and labels, respectively.
You can now postprocess the labels generated by NTable.from_nested_object. Useful for filling in labels missing in the data.
Creating a table from a nested object, using a label conversion procedure, tended to fail with NoSuchCellError. Fixed and added test cases.
Support cell lookup using the 0-based row index as well as the label.
I took a long look at ntable’s interface, and the usage patterns of my own personal projects that depended on it, and decided some simplification was needed.
INCOMPATIBLE CHANGE: Renamed the “index_to_label” and “label_to_index” methods on axis objects to “label” and “index”, respectively.
INCOMPATIBLE CHANGE: Renamed the “axis”, “index”, and “name” methods on AxisInfo to “axis_object”, “axis_index”, and “axis_name”, respectively.
Added “index”, “label”, and “size” methods to AxisInfo, delegating to the underlying axis object. This means AxisInfo is now effectively a proxy for the axis implementation, which should normally no longer need to be accessed.
INCOMPATIBLE CHANGE: Renamed the “axis_info” and “all_axis_info” methods of Structure to “axis” and “all_axes”, respectively.
The “axis” and “all_axes” methods of Structure are now exposed on Table, so you should not need to access the structure too often.
The “preferred” construction methods are now module methods on ::NTable.
Added an ObjectAxis type that lets labels be any arbitrary object.
NTable.from_nested_object now understands :objectify and :stringify options. These control whether the axis ends up as an ObjectAxis or LabeledAxis, and optionally let you provide a proc to convert the labels yourself.
INCOMPATIBLE CHANGE: Table#get and Table#set! now raise NoSuchCellError if the cell specification doesn’t exist.
Added Table#include? to test for the correctness of a cell specification.
# Table#set!, Table#load!, and Table#fill! now return self so they can be chained.
Filled out some more documentation.
Initial test release