-
Notifications
You must be signed in to change notification settings - Fork 27
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
Update to packaging tools and logic #403
Conversation
Hello @dougiesquire! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-01-22 04:26:34 UTC |
The |
d2eea74
to
dc445a1
Compare
Hey @dougiesquire! With regards to #403 (comment) |
Sure. The current We could do something like upload the dist resulting from the PyPA build to TestPyPI and then try and build the conda build from that, but I'm not sure how the tag-based versioning would work... |
I've worked out a way to dynamically input the dependencies in Regarding the build tests in the CI, I see three options:
Curious on thoughts @CodeGat, @aidanheerdegen. 1 or 3 are probably my most preferred options. ADDED: e.g. 3 might look something like this commit. |
I can't work out why the trusted publishing to TestPyPI is not working (it says here that it's supported). I'm going to stop working on this and give @aidanheerdegen and @CodeGat some time to respond to my questions above. And if anyone has ideas about why trusted publishing isn't working, please let me know! |
This looks like a great approach. Jinja templating is a standard feature of
One clear goal is that the PyPI and One route to making the deployment identical is to deploy to PyPI and then deploy conda from PyPI which is what We’re running our CD for PyPI and I can't see a lot of downside to that. |
This is what I've currently set up in
Yeah, I don't think there's a downside. I liked the idea of also testing the upload using TestPyPI and got fixated on why it's not working. I'll try creating a new PyPI account and if that doesn't fix the issue I'll give up. |
Okay, I gave up on trying to test the upload via TestPyPI. The conda build is now being done from local source, rather than from the PyPI build. So not that much has actually changed in the end. I'll edit the original description to be accurate about what's changed and then I think I'll leave it there. Sorry for the messy commit history. I took the "suck it and see" approach to debugging ci workflows... |
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.
Looks great. Thanks for a comprehensive piece of work that ended up touching a lot.
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.
It all looks good to me. I didn't know much about PyPI builds, versioneer
and jinja templating so learnt a bit - Thanks!
e094ac4
Ugh sorry, did my OCD changing of the title dismiss your reviews @aidanheerdegen and @jo-basevi? |
Looks like it eh? |
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.
LGTM 👍
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.
LGTM (still)
This PR implements some changes discussed in #398:
pyproject.toml
. Removedsetup.cfg
test
andmitgcm
dependencies now with e.g.pip install .[test]
versioneer
supportUpdate conda build to build from PyPI dist. I've modified the CD Github workflow so that the conda build only happens if the PyPI upload is successful.NO LONGER TRUEpypa-build
job to the CI Github workflow and renamed the oldbuild
job totests
In doing this, I discovered that the
um
driver requiresimp
, which has been deprecated. I’ve updated the driver to use the replacementimportlib
instead and the tests still pass, but I'm not sure the tests actually touch the modified code...I've also removed the
tools
andbin
directories (#396 and #397). This doesn't have to be done here, but it felt relevant since these are places where the hard-coded version was being used.I couldn’t work out a easy/tidy way to have dependencies defined in only one location for the PyPI and conda builds, so dependencies are currently listed in both. NO LONGER TRUE - the dependencies and entry points inpyproject.toml
andmeta.yaml
meta.yaml
are input dynamically frompyproject.toml
.I’ve tested building the PyPI dist, uploading to TestPyPI and then doing the conda build locally from that. But the true test will be actually issuing a new release.Closes #398, closes #401, closes #397, closes #396