There is a newer version of the record available.

Published May 21, 2019 | Version 0.9.0
Software Open

bids-standard/pybids: 0.9.0

  • 1. University of Texas at Austin
  • 2. Stanford University
  • 3. Department of Psychology, Stanford University
  • 4. Florida International University
  • 5. Dartmouth College
  • 6. University of Oregon
  • 7. McGill University
  • 8. Institute for Problems of Information Transmission
  • 9. Concordia University
  • 10. National Institute of Mental Health
  • 11. MRC Cognition and Brain Sciences Unit
  • 12. Montreal Neurological Institute and Hospital
  • 13. Alan Turing Institute; Department of Psychiatry, University of Cambridge
  • 14. Psychoinformatics Lab, Institute of Psychology, Otto-von-Guericke University Magdeburg
  • 15. CorticoMetrics LLC
  • 16. Télécom ParisTech, France
  • 17. Otto-von-Guericke-University Magdeburg, Germany
  • 18. Center for Adaptive Rationality, Max Planck Institute for Human Development, Berlin, Germany
  • 19. Berkeley Institute for Data Science; University of California at Berkeley
  • 20. Queen Mary University London
  • 21. The University of Washington eScience Institute
  • 22. INRIA
  • 23. Rutgers University
  • 24. NIMH IRP
  • 25. UC Berkeley
  • 26. The Laboratory for Investigative Neurophysiology (The LINE), Department of Radiology and Department of Clinical Neurosciences, Lausanne, Switzerland; Center for Biomedical Imaging (CIBM), Lausanne, Switzerland
  • 27. Sainte-Anne Hospital Center, Université Paris Descartes

Description

Release notes

Version 0.9 replaces the native Python backend with a SQLite database managed via SQLAlchemy. The layout module has been refactored (again), but API changes are minimal. This release also adds many new features and closes a number of open issues.

API CHANGES/DEPRECATIONS:

  • The extensions argument has now been banished forever; instead, use extension, which is now defined as a first-class entity. The former will continue to work until at least the 0.11 release (closes #404).
  • Relatedly, values for extension should no longer include a leading ., though this should also continue to work for the time being.
  • The BIDSLayout init argument index_associated has been removed as the various other filtering/indexing options mean there is longer a good reason for users to manipulate this.
  • bids.layout.MetadataIndex no longer exists. It's unlikely that anyone will notice this.
  • BIDSLayout.get_metadata() no longer takes additional entities as optional keyword arguments (they weren't necessary for anything).
  • Direct access to most BIDSFile properties is discouraged, and in one case is broken in 0.9 (for .metadata, which was unavoidable, because it's reserved by SQLAlchemy). Instead, users should use getters (get_metadata, get_image, get_df, etc.) whenever possible.

NEW FUNCTIONALITY:

  • All file and metadata indexing and querying is now supported by a relational (SQLite) database (see #422). While this has few API implications, the efficiency of many operations is improved, and complex user-generated queries can now be performed via the SQLAlchemy .session stored in each BIDSLayout.
  • Adds .save() method to the BIDSLayout that saves the current SQLite DB to the specified location. Conversely, passing a filename as database_file at init will use the specified store instead of re-indexing all files. This eliminates the need for a pickling strategy (#435).
  • Related to the above, the BIDSLayout init adds a reset_database argument that forces reindexing even if a database_file is specified.
  • The BIDSLayout has a new index_metadata flag that controls whether or not the contents of JSON metadata files are indexed.
  • Added metadata flag to BIDSLayout.to_df() that controls whether or not metadata columns are included in the returned pandas DataFrame (#232).
  • Added get_entities() method to BIDSLayout that allows retrieval of all Entity instances available within a specified scope (#346).
  • Adds drop_invalid_filters argument to BIDSLayout.get(), enabling users to (optionally) ensure that invalid filters don't clobber all search results (#402).
  • BIDSFile instances now have a get_associations() method that returns associated files (see #431).
  • The BIDSFile class has been split into a hierarchy, with BIDSImageFile and BIDSDataFile subclasses. The former adds a get_image() method (returns a NiBabel image); the latter adds a get_df() method (returns a pandas DF). All BIDSFile instances now also have a get_entities() method.

BUG FIXES AND OTHER MINOR CHANGES:

  • Metadata key/value pairs and file entities are now treated identically, eliminating a source of ambiguity in search (see #398).
  • Metadata no longer bleeds between raw and derivatives directories unless explicitly specified (see #383).
  • BIDSLayout.get_collections() no longer drops user-added columns (#273).
  • Various minor fixes/improvements/changes to tests.
  • The tutorial Jupyter notebook has been fixed and updated to reflect the latest changes.

Files

bids-standard/pybids-0.9.0.zip

Files (6.1 MB)

Name Size Download all
md5:29c39bce509f5e7a4d953e4d138a81ac
6.1 MB Preview Download

Additional details

Related works