-
Notifications
You must be signed in to change notification settings - Fork 61
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
modernize packaging #137
modernize packaging #137
Conversation
7a76801
to
ba6b6b4
Compare
0764309
to
b227394
Compare
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.
@ajdawson let me know if you need help navigating this PR. Sorry I ended up bloating it but this will get the CIs back online/
@@ -1,33 +0,0 @@ | |||
"""Test coding standards compliance.""" |
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.
@ajdawson I replaced this test with pre-commits. We can add more checks there if you want but I would do that in another PR to avoid bloating this one more than it already is.
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.
This is fine I think
[tool.setuptools.dynamic] | ||
readme = {file = "README.md", content-type = "text/markdown"} | ||
|
||
[tool.setuptools_scm] |
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.
Using setuptools_scm instead of versioneer b/c that one is better maintained and "blessed" by the Python packaging community.
@@ -0,0 +1,75 @@ | |||
[build-system] |
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.
This replaces both setup.py and setup.cfg with "modern" python packaging practices.
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] |
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.
To support all the extras on Windows and Python 3.11 we would need to drop cdms2
.
xref.: conda-forge/cdms2-feedstock#80 (comment) and conda-forge/cdtime-feedstock#52 (comment)
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.
Maybe the time is coming to remove the cdms2 interface in this module...
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.
But we can leave it like this for now and deal with that separately.
Twine check is failing with:
I can reproduce that locally and I see that it still packages the deleted Edit: I missed an entry for the dynamic README and it should be fixed in 30cc5c8. |
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. |
You will need to:
I usually name it
PS: There is also the Trusted Publisher route but I did not try that one yet. |
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! |
Use setuptools_scm instead of versioneer and pyproject.toml instead of setup.*.
Only review this one after #136 is sorted out.