-
Notifications
You must be signed in to change notification settings - Fork 160
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
replace setup.py with pyproject.toml workflow #941
Conversation
f0e1591
to
cb84bd7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #941 +/- ##
=======================================
Coverage 75.29% 75.29%
=======================================
Files 80 80
Lines 6285 6286 +1
=======================================
+ Hits 4732 4733 +1
Misses 1553 1553
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! What is the reason to remove .vscode
?
simulate_for_sbi, | ||
) | ||
from sbi.inference.base import NeuralInference # noqa: F401 | ||
from sbi.inference.base import check_if_proposal_has_default_x, infer, simulate_for_sbi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit surprised about the black changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In particular, I do not get these changes when I run black
(v24.2.0) locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am surprised as well, but it seems to be due to isort
and because of the comment.
I removed Therefore, I suggest to remove it from the git index. But I am open for the discussion. What is the benefit of sharing the |
I think I am fine with removing the vs code settings. The only advantage I see is that we can automatically define rulers etc here which match our black settings. |
Feel free to merge. I think it might be nice if somebody (@manuelgloeckler ?) could test if installation works smoothly on windows. |
We can set formatting and linting settings in Yes, absolutely. Before I merge:
|
Worked like a charm. |
0638523
to
9bbc225
Compare
9bbc225
to
4852b60
Compare
Both |
This PR
setup.py
etc withpyproject.toml
.The
pyproject.toml
specifiessetuptools>65
to allow for editable installs),requirements.txt
, but I think it's nice to have it all in one place.black
,isort
andflake8
, all copied from the previoussetup.cfg
. We might want to replace those withruff
in a future PR, see Switch to ruff for linting and formatting #934pytest
configurations, e.g., markersDoes this close any currently open issues?
Fixes #940
See #940
Any other comments?
Resources:
Uploading to PyPI
Previously, we used the upload command specified in
setup.py
to build the package withbuild
and upload it to PyPI withtwine
.With this PR, we now have to do it manually like this.
In the project root directory:
rm -r dist/
python -m pip install --upgrade pip
pip install build twine
python3 -m build
twine upload dist/*
These steps should be added to https://github.com/sbi-dev/sbi/wiki/Release-workflow to fix #940
We might want to set up GitHub actions that run the publishing pipeline with every release we make, as described here:
https://carpentries-incubator.github.io/python_packaging/instructor/05-publishing.html#extra-automating-package-publishing-with-github-actions