NicolasHug / Surprise

A Python scikit for building and analyzing recommender systems
http://surpriselib.com
BSD 3-Clause "New" or "Revised" License
6.28k stars 1k forks source link

Implement packaging using `pyproject.toml` #476

Closed abhi8893 closed 2 months ago

abhi8893 commented 2 months ago

Description

scikit-surprise currently relies on the legacy setup.py to describe the python package build. While this is needed for including cythonized extensions, most of the config can be moved to pyproject.toml.

This would probably solve open installation issues: #466, #468, #470 etc

This PR does the following:

  1. add build to dev requirements
  2. remove setup.cfg
  3. document version directly in surprise.__init__.py
  4. create minimal required setup.py, and transfer most conf to pyproject.toml
  5. create sdist using build, test on sdist with [test] requirements installed

Merging this will gave back the community a really good recommender system library! 🙂

pshelby commented 2 months ago

@NicolasHug I'm currently having trouble installing Surprise with Poetry. This would be a great improvement! Thanks @abhi8893 !

bhatiaakshay8 commented 2 months ago

@NicolasHug This solved the problem for me! Please merge and make a new release.

thanks @abhi8893

rodrigc commented 2 months ago

I didn't realize @abhi8893 came up with this, and implemented something very similar in #477. However, this PR is slightly better, so I closed #477 in favor of this.

I only have some minor suggestions for this PR, please consider incorporating.

rodrigc commented 2 months ago

You can delete requirements.txt and requirements_dev.txt since you copied those dependencies into pyproject.toml

abhi8893 commented 2 months ago

Thanks @rodrigc for reviewing! I have incorporated the comments. On the versioning part, I have a differing view, but let me know what you think 🙂

dhpancor commented 2 months ago

Good job on this PR. @NicolasHug please merge and make a new release.

NicolasHug commented 2 months ago

@abhi8893 thank you so much for putting out this PR @rodrigc thank you so much as well for your previous PR and for reviewing this one.

I've pushed a bunch of minor changes but I think it's good to merge now. I'll try to push 1.1.4 soon. :pray:

abhi8893 commented 2 months ago

Thanks a lot for merging this and making a new release so quickly @NicolasHug! Confirming it installs flawlessly now, even with uv ! 🚀

rodrigc commented 2 months ago

Nice job @abhi8893 and @NicolasHug !