Skip to content

Commit

Permalink
Merge tag 'v0.6.0' into debian
Browse files Browse the repository at this point in the history
[0.6.0] - 2019-12-16

This is largely a bug fix.  Metadata and order of `_key-value` fields in BIDS
could change from the result of converting using previous versions, thus minor
version boost.
14 people contributed to this release -- thanks
[everyone](https://github.com/nipy/heudiconv/graphs/contributors)!

Enhancement

- Use [etelemetry](https://pypi.org/project/etelemetry) to inform about most
  recent available version of heudiconv. Please set `NO_ET` environment variable
  if you want to disable it ([#369][])
- BIDS:
  - `--bids` flag became an option. It can (optionally) accept `notop` value
    to avoid creation of top level files (`CHANGES`, `dataset_description.json`,
    etc) as a workaround during parallel execution to avoid race conditions etc.
    ([#344][])
  - Generate basic `.json` files with descriptions of the fields for
    `participants.tsv` and `_scans.tsv` files ([#376][])
  - Use `filelock` while writing top level files. Use
    `HEUDICONV_FILELOCK_TIMEOUT` environment to change the default timeout value
    ([#348][])
  - `_PDT2` was added as a suffix for multi-echo (really "multi-modal")
    sequences ([#345][])
- Calls to `dcm2niix` would include full output path to make it easier to
  discern in the logs what file it is working on ([#351][])
- With recent [datalad]() (>= 0.10), created DataLad dataset will use
  `--fake-dates` functionality of DataLad to not leak data conversion dates,
  which might be close to actual data acquisition/patient visit ([#352][])
- Support multi-echo EPI `_phase` data ([#373][] fixes [#368][])
- Log location of a bad .json file to ease troubleshooting ([#379][])
- Add basic pypi classifiers for the package ([#380][])

Fixed

- Sorting `_scans.tsv` files lacking valid dates field should not cause a crash
  ([#337][])
- Multi-echo files detection based number of echos ([#339][])
- BIDS
  - Use `EchoTimes` from the associated multi-echo files if `EchoNumber` tag is
    missing ([#366][] fixes [#347][])
  - Tolerate empty ContentTime and/or ContentDate in DICOMs ([#372][]) and place
    "n/a" if value is missing ([#390][])
  - Do not crash and store original .json file is "JSON pretification" fails
    ([#342][])
- ReproIn heuristic
  - tolerate WIP prefix on Philips scanners ([#343][])
  - allow for use of `(...)` instead of `{...}` since `{}` are not allowed
    ([#343][])
  - Support pipolar fieldmaps by providing them with `_epi` not `_magnitude`.
    "Loose" BIDS `_key-value` pairs might come now after `_dir-` even if they
    came first before ([#358][] fixes [#357][])
- All heuristics saved under `.heudiconv/` under `heuristic.py` name, to avoid
  discrepancy during reconversion ([#354][] fixes [#353][])
- Do not crash (with TypeError) while trying to sort absent file list ([#360][])
- heudiconv requires nipype >= 1.0.0 ([#364][]) and blacklists `1.2.[12]` ([#375][])

* tag 'v0.6.0':
  Boost perspective release date in changelog to today
  ENH(TST): Fix version to older pytest to ease backward compatibility testing
  RF: use tmpdir not tmp_path fixture
  FIX: minor typo in CHANGELOG.md
  • Loading branch information
yarikoptic committed Dec 16, 2019
2 parents ef40fd4 + ea4bb74 commit abac818
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented (for humans) in this file
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.6.0] - 2019-12-05
## [0.6.0] - 2019-12-16

This is largely a bug fix. Metadata and order of `_key-value` fields in BIDS
could change from the result of converting using previous versions, thus minor
Expand Down Expand Up @@ -50,7 +50,7 @@ version boost.
- Do not crash and store original .json file is "JSON pretification" fails
([#342][])
- ReproIn heuristic
- tollerate WIP prefix on Philips scanners ([#343][])
- tolerate WIP prefix on Philips scanners ([#343][])
- allow for use of `(...)` instead of `{...}` since `{}` are not allowed
([#343][])
- Support pipolar fieldmaps by providing them with `_epi` not `_magnitude`.
Expand Down
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-r requirements.txt
pytest
# Fix version to older pytest to ease backward compatibility testing
pytest==3.6.4
tinydb
inotify
8 changes: 4 additions & 4 deletions heudiconv/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ def test_json_dumps_pretty():
assert pretty({'WipMemBlock': tstr}) == '{\n "WipMemBlock": "%s"\n}' % tstr


def test_load_json(tmp_path, caplog):
def test_load_json(tmpdir, caplog):
# test invalid json
ifname = 'invalid.json'
invalid_json_file = str(tmp_path / ifname)
create_tree(str(tmp_path), {ifname: u"I'm Jason Bourne"})
invalid_json_file = str(tmpdir / ifname)
create_tree(str(tmpdir), {ifname: u"I'm Jason Bourne"})

with pytest.raises(JSONDecodeError):
load_json(str(invalid_json_file))
Expand All @@ -81,7 +81,7 @@ def test_load_json(tmp_path, caplog):
# test valid json
vcontent = {"secret": "spy"}
vfname = "valid.json"
valid_json_file = str(tmp_path / vfname)
valid_json_file = str(tmpdir / vfname)
save_json(valid_json_file, vcontent)

assert load_json(valid_json_file) == vcontent

0 comments on commit abac818

Please sign in to comment.