Releases: hdmf-dev/hdmf
Releases · hdmf-dev/hdmf
3.4.0
HDMF 3.4.0 (August 5, 2022)
Minor improvements
- Allow manual triggering of some GitHub Actions. @rly (#744)
- Relax input validation of
HDF5IO
to allow for s3fs support. Existing arguments ofHDF5IO
are modified as follows: i)mode
was given a default value of "r", ii)path
was given a default value ofNone
, and iii)file
can now accept anS3File
type argument. @bendichter (#746) - Added ability to create and get back handle to empty HDF5 dataset. @ajtritt (#747)
- Added
AbstractContainer._in_construct_mode
that is set and modified only by the ObjectMapper when constructing an
object from a builder read from a file. Subclasses ofAbstractContainer
can check_in_construct_mode
during the initialization phase as part of__init__
to distinguish between actions during construction
(i.e., read from disk) vs. creation by the user, e.g., to determine whether to raise a warning or error when
encountering invalid data to support reading and correcting data that is invalid while preventing creation
of new data that is invalid. @rly (#751)
Bug fixes
3.3.2
3.3.1
3.2.1
3.1.1
3.1.0
New features
- Added several features to simplify interaction with
DynamicTable
objects that link to other tables via
DynamicTableRegion
columns. @oruebel (#645)- Added
DynamicTable.get_foreign_columns
to find all columns in a table that are aDynamicTableRegion
- Added
DynamicTable.has_foreign_columns
to identify if aDynamicTable
containsDynamicTableRegion
columns - Added
DynamicTable.get_linked_tables
to retrieve all tables linked to either directly or indirectly from
the current table viaDynamicTableRegion
- Implemented the new
get_foreign_columns
,has_foreign_columns
, andget_linked_tables
also for
AlignedDynamicTable
- Added new module
hdmf.common.hierarchicaltable
with helper functions to facilitate conversion of
hierarchically nestedDynamicTable
objects via the following new functions:to_hierarchical_dataframe
to merge linked tables into a single consolidated pandas DataFrame.drop_id_columns
to remove "id" columns from a DataFrame.flatten_column_index
to replace apandas.MultiIndex
with a regularpandas.Index
- Added
Bug fixes
- Do not build wheels compatible with Python 2 because HDMF requires Python 3.7. @rly (#642)
AlignedDynamicTable
did not overwrite itsget
function. When usingDynamicTableRegion
to refereneceAlignedDynamicTable
this led to cases where the columns of the category subtables where omitted during data access (e.g., conversion to pandas.DataFrame). This fix adds theAlignedDynamicTable.get
based on the existingAlignedDynamicTable.__getitem__
. @oruebel (#645)- Fixed #651 to support selection of cells in an
AlignedDynamicTable
via slicing with[int, (str, str)]
(and[int, str, str]
) to select a single cell, and[int, str]
to select a single row of a category table. @oruebel (#645)
Minor improvements
- Updated
DynamicTable.to_dataframe()
andDynamicTable.get
functions to set the.name
attribute
on generated pandas DataFrame objects. @oruebel (#645) - Added
AlignedDynamicTable.get_colnames(...)
to support look-up of the full list of columns as the
AlignedDynamicTable.colnames
property only includes the columns of the main table for compliance with
DynamicTable
@oruebel (#645) - Fix documentation for
DynamicTable.get
andDynamicTableRegion.get
. @rly (#650) - Allow passing string column name to
DynamicTableRegion
, i.e.,dtr['col_name']
is a shortcut to
dtr.table['col_name']
. @rly (#657)
3.0.1
3.0.0
New features
- Add support for Python 3.9, drop support for Python 3.6. @rly (#620)
- Add support for h5py 3. @ajtritt (#480)
- h5py 3 introduced [breaking changes regarding how strings are handled]
(https://docs.h5py.org/en/latest/whatsnew/3.0.html#breaking-changes-deprecations), specifically that
variable-length UTF-8 strings in datasets are now read asbytes
objects instead ofstr
by default.
To reduce the impact of this change on HDMF users, when HDMF reads a variable-length UTF-8 string
dataset, instead of returning anh5py.Dataset
that is read asbytes
objects, HDMF will return a
hdmf.utils.StrDataset
object that extendsh5py.Dataset
and is read asstr
objects, which preserves
previous behavior. For example, under HDMF 2.x, an HDF5 datasetd
with data ['a', 'b'] is read as a
h5py.Dataset
object, andd[:]
returnsstr
objects. Under HDMF 3.x, the same datasetd
is read
as ahdmf.utils.StrDataset
object andd[:]
still returnsstr
objects.
- h5py 3 introduced [breaking changes regarding how strings are handled]
- Add RRID to docs. @oruebel (#633)
- Allow passing
index=True
toDynamicTable.to_dataframe()
to support returningDynamicTableRegion
columns
as indices or Pandas DataFrame. @rly (#579) - Improve
DynamicTable
documentation. @rly (#639) - Updated external resources tutorial. @mavaylon (#611)
Breaking changes and deprecations
- Previously, when using
DynamicTable.__getitem__
orDynamicTable.get
to access a selection of a
DynamicTable
containing aDynamicTableRegion
, new columns with mangled names for the table data referred to
by theDynamicTableRegion
were added to the returned DataFrame. This did not work properly for ragged
DynamicTableRegion
, multiple levels of nesting, or multiple rows returned.
Now, these methods will by default return columns of indices of theDynamicTableRegion
. Ifindex=False
is
passed toDynamicTable.get
, then nested DataFrames will be returned, one DataFrame per row of the original
resulting DataFrame. @rly (#579)
Minor improvements
Bug fixes
- Update the validator to allow extensions to data types which only define data_type_inc. @dsleiter (#609)
- Fix error when validating lazy-loaded datasets containing references. @dsleiter (#609)
- Fix error when using
DynamicTable.__getitem__
orDynamicTable.get
when table has a ragged
DynamicTableRegion
. @rly (#579)