Closed billbrod closed 1 year ago
I also added ci.yml
, which runs pytest tests/
in python 3.7 through 3.10 weekly, on PRs to main, when you push to main, and whenever you want to dispatch it. You can edit the values in the top of the file to change that. (they won't run on your version until you merge this, but you can see them on my fork).
I also removed requirements.txt
(it wasn't being used and is redundant with what you have in setup.py
) and modified setup.py
: I removed test_require
and setup_require
, since the first is deprecated the second is discouraged, and neither are used (setuptools docs). I also added matplotlib
to install_require,
since you use it in several places (and it's necessary for tests). If you'd rather have that be optional, I can just install it for tests and we can add something to readme saying when it should be installed.
Finally, I added a link to documentation in setup.py
, so it will show up on the pypi page. You should also add it on the github page. I'd recommend it as the website in the About section (I added this for mine, but I'm pretty sure this doesn't get included in the PR)
This PR adds
deploy.yml
, which will deploy the package to pypi when you publish a github release. It requires two things:PYPI_API_TOKEN
to your repo's secrets (see here for how to do that, this guide may also be helpful). You only have to do this once.VERSION
variable in yoursetup.py
. pypi only sees that version number, not the github release name (I haven't found a way to tie them together yet)Finally, I also added
long_description
to yoursetup.py
. This was necessary for me to deploy my package correctly, though there might be a work-around. It just makes your readme show up on the pypi page, which I figure is worth doing.You probably should test this first, in which case, see the guide linked earlier about how to publish to test.pypi.org instead.
Let me know if you have any issues!