rasbt / mlxtend

A library of extension and helper modules for Python's data analysis and machine learning libraries.
https://rasbt.github.io/mlxtend/
Other
4.82k stars 853 forks source link

Full pyproject conversion #1065

Closed jmahlik closed 9 months ago

jmahlik commented 9 months ago

Code of Conduct

Description

Continuing on the conversation from https://github.com/rasbt/mlxtend/issues/1062. Converted all the way to a pyproject. This is really slick. Everything builds and installs as expected. The __version__ thing is no longer a problem. If it's changed in the __init__.py, it is picked up automatically.

Was able to delete the setup.py and setup.cfg entirely by moving the pytest config and the setuptools wheel config. The "universal" wheel section in the setup.cfg was causing it to make python 2 compatible wheels (with py2-py3-non-any.whl). Now it just makes a py3 wheel.

Let me know thoughts. Happy to make any changes. The PR is coming from a github org so you might not be able to edit it directly.

Alternative to #1064

Build output:

python -m build
...
Successfully built mlxtend-0.23.0.dev0.tar.gz and mlxtend-0.23.0.dev0-py3-none-any.whl

ls -l ./dist
mlxtend-0.23.0.dev0.tar.gz
mlxtend-0.23.0.dev0-py3-none-any.whl

# Now change the version to 500 in the __init__.py
python -m build
...
Successfully built mlxtend-500.0.0.tar.gz and mlxtend-500.0.0-py3-none-any.whl

Related issues or pull requests

Fixes https://github.com/rasbt/mlxtend/issues/1062

Pull Request Checklist

jmahlik commented 9 months ago

The only thing I could fit in was the long description. But the readme can take its place if that's acceptable.

rasbt commented 9 months ago

Thanks a lot, this is awesome! (And no worries, I will try to debug the CI issues)

jmahlik commented 9 months ago

I'll close out https://github.com/rasbt/mlxtend/pull/1064 if you like this one better.

rasbt commented 9 months ago

Could you try to update the branch by pulling or rebasing from master? The CI should be fixed now.

jmahlik commented 9 months ago

Rebased it

codecov[bot] commented 9 months ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (fe92dd0) 77.26% compared to head (ecf4a87) 77.26%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1065 +/- ## ======================================= Coverage 77.26% 77.26% ======================================= Files 200 200 Lines 11297 11297 Branches 1513 1513 ======================================= Hits 8729 8729 Misses 2350 2350 Partials 218 218 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rasbt commented 9 months ago

It seems to work now. Thanks a lot for this great PR and restructuring. I will make a PyPI release later today.