scikit-learn-contrib / metric-learn

Metric learning algorithms in Python
http://contrib.scikit-learn.org/metric-learn/
MIT License
1.4k stars 234 forks source link

[MRG] Allow installation from conda #283

Closed bellet closed 4 years ago

bellet commented 4 years ago

Anaconda is widely used so it would be nice to be able to install metric-learn with conda install. After a bit of research I think the best option is to add metric-learn to the popular conda-forge channel instead of creating a specific channel

I have created the recipe and PR there: https://github.com/conda-forge/staged-recipes/pull/11168

@perimosocordiae @terrytangyuan @wdevazelhes I put you in the list of maintainers, so you have to post a comment on the above PR to let them know that you are willing to be listed there

Note: I also noticed that the PyPi entry is somewhat outdated, for instance the badges for travis and codecov do not work probably due to outdated URL. metric-learn appears in the "My projects" section but the "manage" button is greyed out. Can someone give me the management rights and/or fix the small problems in the PyPi entry? Thanks!

perimosocordiae commented 4 years ago

I commented on the conda PR. Thanks for setting this up!

terrytangyuan commented 4 years ago

Thanks. This looks great!

bellet commented 4 years ago

As requested in the conda-forge PR, I modified setup.cfg to include the license file to future source distributions. I checked locally and it works when running python setup.py sdist

synapticarbors commented 4 years ago

@bellet If you checked that the entry in setup.cfg works, that's great. I had a hard time finding explicit documentation. In the past I've always suggested including a MANIFEST.in with the proper entry:

https://packaging.python.org/guides/using-manifest-in/#using-manifest-in

but if the setup.cfg route works, that's obviously fine too.

bellet commented 4 years ago

@bellet If you checked that the entry in setup.cfg works, that's great. I had a hard time finding explicit documentation. In the past I've always suggested including a MANIFEST.in with the proper entry:

https://packaging.python.org/guides/using-manifest-in/#using-manifest-in

but if the setup.cfg route works, that's obviously fine too.

Yes, I read about both solutions. I checked on my local machine and the added line in setup.cfg works (the tarball does contain the license file after the change). But I don't know how robust this behavior is. @perimosocordiae @terrytangyuan @wdevazelhes maybe you guys can give it a try on your local machine? Otherwise we can also add a MANIFEST.in file with the appropriate entry

terrytangyuan commented 4 years ago

@bellet @synapticarbors I think adding it in setup.cfg has the same effect (reference). It works for me locally.

bellet commented 4 years ago

Just tested the conda recipe for both Python 2 & 3 and it works well

perimosocordiae commented 4 years ago

Thanks again, merged.

bellet commented 4 years ago

Note: I also noticed that the PyPi entry is somewhat outdated, for instance the badges for travis and codecov do not work probably due to outdated URL. metric-learn appears in the "My projects" section but the "manage" button is greyed out. Can someone give me the management rights and/or fix the small problems in the PyPi entry? Thanks!

@perimosocordiae @terrytangyuan @wdevazelhes can one of you check this? It looks like at least the CI badge urls need to be updated

terrytangyuan commented 4 years ago

@bellet It seems like I cannot update the description manually. The issue is that our last release's README has the outdated URLs. The only solution would be release a new version. Also we need to make sure our README is correct and up-to-date before submitting release to PyPI next time.

bellet commented 4 years ago

OK, I did not realize this was directly rendering the README file!

terrytangyuan commented 4 years ago

@bellet Just added you as owner on PyPI in case I am away. Hope we'll all be safe around COVID-19 situation. Take care!

bellet commented 4 years ago

Thanks!