ajdawson / eofs

EOF analysis in Python
http://ajdawson.github.io/eofs/
GNU General Public License v3.0
199 stars 60 forks source link

modernize packaging #137

Closed ocefpaf closed 1 year ago

ocefpaf commented 1 year ago

Use setuptools_scm instead of versioneer and pyproject.toml instead of setup.*.

Only review this one after #136 is sorted out.

ocefpaf commented 1 year ago

Twine check is failing with:

Checking eofs-0.1.dev1+g23a45fe-py3-none-any.whl: FAILED
ERROR    `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         No content rendered from RST source.                                   
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.   
Checking eofs-0.1.dev1+g23a45fe.tar.gz: PASSED with warnings
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.   
WARNING  `long_description` missing.                                            
Error: Process completed with exit code 1.

I can reproduce that locally and I see that it still packages the deleted setup.cfg, no idea why/how that id happening :-/


Edit: I missed an entry for the dynamic README and it should be fixed in https://github.com/ajdawson/eofs/pull/137/commits/30cc5c8d90f53cfd42db94d005972de113be3179.

ajdawson commented 1 year ago

Ok, so again I won't pretend that I understand every part of this, but I think this is going in the right direction so I will be happy to merge it. Thanks for the hard work (and it does look like quite a lot of work!). I'm not sure about the pypi secrets, you'll have to fill me in on what needs to be done there.

ocefpaf commented 1 year ago

I'm not sure about the pypi secrets, you'll have to fill me in on what needs to be done there.

You will need to:

  1. In your PyPI account settings, scroll down to the "add API token" button

Screenshot from 2023-06-21 13-06-37

I usually name it <pkgname>__token__ and choose the scope of the package only.

  1. In you GitHub settings for eofs go to Secrets and VariablesActions → and create a Repository secret named PYPI_PASSWORD with the token value you got from 1.

Screenshot from 2023-06-21 13-10-07

PS: There is also the Trusted Publisher route but I did not try that one yet.

ajdawson commented 1 year ago

Sorry that took so long @ocefpaf, was locked out of PyPI account when I went to resolve this back in June, and then just forgot about it. I think this should all be set up properly now. Thanks for the effort!