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

Full pyproject conversion #1065

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Full pyproject conversion #1065

merged 3 commits into from
Sep 22, 2023

Conversation

jmahlik
Copy link
Contributor

@jmahlik jmahlik commented Sep 20, 2023

Code of Conduct

Description

Continuing on the conversation from #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 #1062

Pull Request Checklist

  • Added a note about the modification or contribution to the ./docs/sources/CHANGELOG.md file (if applicable)
  • Added appropriate unit test functions in the ./mlxtend/*/tests directories (if applicable)
  • Modify documentation in the corresponding Jupyter Notebook under mlxtend/docs/sources/ (if applicable)
  • Ran PYTHONPATH='.' pytest ./mlxtend -sv and make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g., PYTHONPATH='.' pytest ./mlxtend/classifier/tests/test_stacking_cv_classifier.py -sv)
  • Checked for style issues by running flake8 ./mlxtend

@jmahlik
Copy link
Contributor Author

jmahlik commented Sep 20, 2023

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

@rasbt
Copy link
Owner

rasbt commented Sep 21, 2023

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

@jmahlik
Copy link
Contributor Author

jmahlik commented Sep 21, 2023

I'll close out #1064 if you like this one better.

@rasbt
Copy link
Owner

rasbt commented Sep 22, 2023

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

@jmahlik
Copy link
Contributor Author

jmahlik commented Sep 22, 2023

Rebased it

@codecov
Copy link

codecov bot commented Sep 22, 2023

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
@@           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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rasbt
Copy link
Owner

rasbt commented Sep 22, 2023

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

@rasbt rasbt merged commit 451eb26 into rasbt:master Sep 22, 2023
4 checks passed
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.

Add a pyproject.toml
2 participants