Repository navigation
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. |
michaeldeistler
left a comment
There was a problem hiding this comment.
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.
I am a bit surprised about the black changes.
There was a problem hiding this comment.
In particular, I do not get these changes when I run black (v24.2.0) locally.
There was a problem hiding this comment.
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.pyetc withpyproject.toml.The
pyproject.tomlspecifiessetuptools>65to allow for editable installs),requirements.txt, but I think it's nice to have it all in one place.black,isortandflake8, all copied from the previoussetup.cfg. We might want to replace those withruffin a future PR, see Switch to ruff for linting and formatting #934pytestconfigurations, 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.pyto build the package withbuildand 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 pippip install build twinepython3 -m buildtwine 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