Commit 55344e7d authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'mnt/2.8.1' into 'v2.8'

Mnt/2.8.1

See merge request fsl/fslpy!196
parents a06cd037 0b2246ae
Pipeline #4962 passed with stages
in 2 minutes and 26 seconds
......@@ -2,6 +2,17 @@ This document contains the ``fslpy`` release history in reverse chronological
order.
2.8.1 (Thursday 20th February 2020)
-----------------------------------
Fixed
^^^^^
* Fixed a bug where an error would be raised on attempts to load an image file
without a BIDS-compatible name from a BIDS-like directory.
2.8.0 (Wednesday 29th January 2020)
-----------------------------------
......
......@@ -67,9 +67,9 @@ numbers::
The version number in the ``master`` branch should be of the form
``major.minor.patch.dev``, to indicate that any releases made from this branch
are development releases (although development releases are not part of the
release model).
``major.minor.patch.dev0``, to indicate that any releases made from this
branch are development releases (although development releases are not part of
the release model).
Releases
......@@ -94,6 +94,44 @@ example, the first release off the ``v1.0`` branch would be tagged with
``1.0.1``, ``1.0.2``, etc.
Major/minor releases
^^^^^^^^^^^^^^^^^^^^
Follow this process for major and minor releases. Steps 1 and 2 should be
performed via a merge request onto the master branch, and step 4 via a merge
request onto the relevant minor branch.
1. Update the changelog on the master branch to include the new version number
and release date.
2. On the master branch, update the version number in ``fsl/version.py`` to
a development version of **the next** minor release number. For example,
if you are about to release version ``1.3.0``, the version in the master
branch should be ``1.4.0.dev0``.
3. Create the new minor release branch off the master branch.
4. Update the version number on the release branch. If CI tests fail on the
release branch, postpone the release until they are fixed.
5. Tag the new release on the minor release branch.
Bugfix/patch releases
^^^^^^^^^^^^^^^^^^^^^
Follow this process for patch releases. Step 1 should be performed via
a merge request onto the master branch, and step 2 via a merge request onto
the relevant minor branch.
1. Add the fix to the master branch, along with an updated changelog including
the version number and date for the bugfix release.
2. Cherry-pick the relevant commit(s) from the master branch onto the minor
release branch, and update the version number on the minor release branch.
If CI tests fail on the release branch, go back to step 1.
3. Tag the new release on the minor release branch.
Testing
-------
......
......@@ -1540,7 +1540,8 @@ def loadMetadata(image):
basename = op.basename(removeExt(filename))
dirname = op.dirname(filename)
if fslbids.inBIDSDir(image.dataSource):
if fslbids.isBIDSFile(image.dataSource) and \
fslbids.inBIDSDir( image.dataSource):
return fslbids.loadMetadata(image.dataSource)
jsonfile = op.join(dirname, '{}.json'.format(basename))
......
......@@ -47,7 +47,7 @@ import re
import string
__version__ = '2.8.0'
__version__ = '2.8.1'
"""Current version number, as a string. """
......
......@@ -1401,6 +1401,25 @@ def test_loadMeta():
assert img.getMeta('b') == 2
def test_loadMeta_nonBids():
with tempdir():
# non-bids file in a BIDS-like directory
imgfile = op.join('data', 'sub-01', 'anat', 'sub-01_T1w_nonbids.nii.gz')
os.makedirs(op.dirname(imgfile))
make_image(imgfile)
with open(op.join('data', 'dataset_description.json'), 'wt') as f:
pass
img = fslimage.Image(imgfile, loadMeta=True)
assert list(img.metaKeys()) == []
def test_loadMetadata():
with tempdir():
make_image('image.nii.gz')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment