Skip to content
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

Fix the "Publish to PyPI" workflow #3736

Open
seisman opened this issue Jan 1, 2025 · 7 comments · May be fixed by #3742
Open

Fix the "Publish to PyPI" workflow #3736

seisman opened this issue Jan 1, 2025 · 7 comments · May be fixed by #3742
Labels
maintenance Boring but important stuff for the core devs
Milestone

Comments

@seisman
Copy link
Member

seisman commented Jan 1, 2025

See #3691 (comment) for details.

Generally speaking, we have the following options:

I think we should go for option 2, since it is recommended in the official packaging guides at https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#separate-workflow-for-publishing-to-testpypi

@seisman seisman added the maintenance Boring but important stuff for the core devs label Jan 1, 2025
@seisman seisman added this to the 0.15.0 milestone Jan 1, 2025
@weiji14
Copy link
Member

weiji14 commented Jan 2, 2025

Agree with option 2, even though it's a bit more work to rewrite the workflow. Could you also remove the 'Temporary token for PyGMT' used for the PyGMT v0.14.0 release?

@weiji14 weiji14 linked a pull request Jan 3, 2025 that will close this issue
6 tasks
@seisman
Copy link
Member Author

seisman commented Jan 3, 2025

Could you also remove the 'Temporary token for PyGMT' used for the PyGMT v0.14.0 release?

Did you remove it already?

@weiji14
Copy link
Member

weiji14 commented Jan 3, 2025

Could you also remove the 'Temporary token for PyGMT' used for the PyGMT v0.14.0 release?

Did you remove it already?

No, I don't think I can remove it since you created it.

@weiji14
Copy link
Member

weiji14 commented Jan 3, 2025

Originally posted by @seisman in #3691 (comment)

We need to decide what to do with the workflow, but before that we need to decide what to do with v0.14.0 release. We can either manually upload v0.14.0 to PyPI or have a v0.14.1 release after fixing the workflow.

I've decided to manually upload v0.14.0 following instructions at https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#packaging-your-project. Now v0.14.0 is on PyPI.

Btw, it looks like the manual PyPI upload at https://pypi.org/project/pygmt/0.14.0/#pygmt-0.14.0-py3-none-any.whl is bigger (428.4 kB) than the one on TestPyPI at https://test.pypi.org/project/pygmt/#pygmt-0.14.0-py3-none-any.whl (290.1 kB) for PyGMT v0.14.0:

TestPyPI PyPI
image image

Looking inside the pygmt-0.14.0-py3-none-any.whl file, it seems that the tests/ folder was included in the manual PyPI upload, hence the size difference. Is running make package not excluding test files again (xref #2956)?

@seisman
Copy link
Member Author

seisman commented Jan 3, 2025

Could you also remove the 'Temporary token for PyGMT' used for the PyGMT v0.14.0 release?

Did you remove it already?

No, I don't think I can remove it since you created it.

I can't see the token now. Maybe I've removed it after uploading the release?

@seisman
Copy link
Member Author

seisman commented Jan 3, 2025

Looking inside the pygmt-0.14.0-py3-none-any.whl file, it seems that the tests/ folder was included in the manual PyPI upload, hence the size difference. Is running make package not excluding test files again (xref #2956)?

Just tried to run make package locally. The wheel doesn't have the tests folder. Not sure what was happening.

@weiji14
Copy link
Member

weiji14 commented Jan 3, 2025

Looking inside the pygmt-0.14.0-py3-none-any.whl file, it seems that the tests/ folder was included in the manual PyPI upload, hence the size difference. Is running make package not excluding test files again (xref #2956)?

Just tried to run make package locally. The wheel doesn't have the tests folder. Not sure what was happening.

Yeah, I get the same on my side running make package locally, so wondering if you were doing something differently. That's ok though, we'll just make sure the auto upload works next time for PyGMT v0.15.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants