Skip to content

Conversation

@mpsonntag
Copy link
Contributor

This tiny PR fixes

  • a bug in setup.py which prohibits local install if the dependencies are not already installed.
  • closes fix bool value conversion for version 1.4 #222; boolean false values depending on lower case string conversion are now properly converted to False in python 2 as well.

if string is None:
return None
if isinstance(string, unicode):
if type(string) in (unicode, str):
Copy link
Member

Choose a reason for hiding this comment

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

You can use isinstance() with a tuple as second argument. No need to switch to type()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since type(sthg) is used for nearly every comparable check in odml/dtypes.py i'd rather keep it consistent for now and change all type checks to isinstance checks in one go.

Copy link
Member

@achilleas-k achilleas-k Feb 21, 2018

Choose a reason for hiding this comment

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

Fair enough.
Opened issue #226 as a reminder to fix this.

from odml.info import AUTHOR, CONTACT, CLASSIFIERS, HOMEPAGE, VERSION

try:
from odml.info import AUTHOR, CONTACT, CLASSIFIERS, HOMEPAGE, VERSION
Copy link
Member

Choose a reason for hiding this comment

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

Now that I see it, perhaps it's better to just do the except block and not try to import.

I wonder if it's possible to end up in a situation where the setup imports an exiting installation that has a different version number.

Since the parsing code is there, might as well, right?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 70.468% when pulling e200571 on mpsonntag:fixNRefactors into 7c031af on G-Node:master.

@achilleas-k achilleas-k merged commit 99b2eba into G-Node:master Feb 21, 2018
@mpsonntag mpsonntag deleted the fixNRefactors branch February 21, 2018 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix bool value conversion for version 1.4

3 participants