Skip to content

[FIX] Bugs found after #1572 and #1591 #1623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 14, 2016

Conversation

oesteban
Copy link
Contributor

Found corner cases that failed when calculating the hash of dicts - fixes #1620.

Also found that list of lists of ints do not work in #1591.

Found corner cases that failed when calculating the hash of dicts - fixes nipy#1620.

Also found that list of lists of ints do not work in nipy#1591. Fixes also that one.
Improved the way interfaces were initialized to prevent that lists of lists of int
are not set. Fixes nipy#1625
@oesteban oesteban changed the title [WIP,FIX] Bugs found after #1572 and #1591 [FIX] Bugs found after #1572 and #1591 Sep 13, 2016

"""

reg = Registration(from_file='./smri_ants_registration_settings.json')
reg = Registration(from_file=example_data('smri_ants_registration_settings.json'))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this settings file from examples to the example data, since now I use it in tests

@codecov-io
Copy link

codecov-io commented Sep 13, 2016

Current coverage is 70.88% (diff: 94.66%)

Merging #1623 into master will increase coverage by 0.01%

@@             master      #1623   diff @@
==========================================
  Files          1020       1020          
  Lines         51240      51277    +37   
  Methods           0          0          
  Messages          0          0          
  Branches       7259       7265     +6   
==========================================
+ Hits          36314      36347    +33   
- Misses        13840      13849     +9   
+ Partials       1086       1081     -5   

Powered by Codecov. Last update a746633...e970941

@oesteban
Copy link
Contributor Author

@satra please have a look, this is ready to merge

dict_withhash.append((name,
self._get_sorteddict(val, True, hash_method=hash_method,
hash_files=hash_files)))
for name, val in sorted(self.get_traitsfree().items()):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason i used get in the previous version was to speed up the hashval computation. since get_traitsfree requires a dictionary cleanup. if using get doesn't change assumptions here, it may be cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, back to the original 👍

@oesteban
Copy link
Contributor Author

@satra, @chrisfilo this is ready, and fixes a couple of well-identified problems with the python 2/3 compatibility. I have added 3 tests based on ants.Registration to make sure we cover the (possibly) most complex case of nipype interfaces.

@oesteban oesteban merged commit 7a3317d into nipy:master Sep 14, 2016
@oesteban oesteban deleted the fix/FromFileWorkflows branch September 14, 2016 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Problems hashing inputs derived from encoding in corner cases
3 participants