Skip to content
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

[MRG] put black dependency as optional #120

Merged
merged 4 commits into from Feb 1, 2019

Conversation

wdevazelhes
Copy link
Contributor

Fixes #119

I couldn't install skggm with python2.7 because black does not seem to exist in python 2.7 (see https://github.com/ambv/black#installation). I thought this could be a fix (putting black as an optional dependency), but I may be totally wrong here

setup.py Outdated
@@ -71,6 +71,7 @@
'inverse_covariance.profiling',
'inverse_covariance.pyquic'],
install_requires=INSTALL_REQUIRES,
extras_require=dict(contribute=['black==18.6b4']),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe instead of "contribute" something like "style" ?

@wdevazelhes
Copy link
Contributor Author

I checked and with this modification the install works with python2.7

@jasonlaska
Copy link
Member

I think the right thing to do here is split out the dev requirements into a separate file as I've done here: https://github.com/jasonlaska/spherecluster

@wdevazelhes
Copy link
Contributor Author

That's nice, something like this ?

.travis.yml Outdated
@@ -27,6 +27,7 @@ install:

# command to run tests
script:
- pip install black
Copy link
Member

Choose a reason for hiding this comment

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

Instead of this, change line 25 to install the dev-requirements

Copy link
Member

Choose a reason for hiding this comment

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

(the dev requirements are a superset of the requirements so you should only need to reference the one file)

Copy link
Member

Choose a reason for hiding this comment

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

Side note: since this version of black isn't tied to the version in dev-requirements, the tests fail (Black makes minor breaking changes to formatting in each version).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, indeed, thanks !

@jasonlaska
Copy link
Member

Minor comment about the travis script, but yes, this is good.

@jasonlaska
Copy link
Member

LGTM, I think the tests are breaking due to a non-deterministic bug.

@jasonlaska jasonlaska merged commit 8c3b23b into skggm:develop Feb 1, 2019
@jasonlaska
Copy link
Member

Thank you @wdevazelhes for your contribution.

@wdevazelhes wdevazelhes deleted the fix/remove_black_dependency branch February 4, 2019 08:51
@flyingrobin
Copy link

Is it possible to deploy a release to PyPI to include this update?

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.

cannot install in python 2.7
3 participants