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

use PyPI upload workflow from OpenAstronomy #7912

Merged
merged 12 commits into from
Dec 5, 2023

Conversation

zacharyburnett
Copy link
Collaborator

@zacharyburnett zacharyburnett commented Sep 19, 2023

Resolves SCSB-108

closes #8054

This PR changes the PyPI upload process to use the OpenAstronomy workflow instead of the STScI one. The workflow in this PR is configured to test the build with each pull request push, and then publish upon an official release.

This will facilitate catching build issues early on (ideally within the PR) before the release date. The reusable workflow uses cibuildwheel to build wheels for all supported Pythons on Linux, macOS X64, and macOS ARM64 (we don't currently have automated testing for ARM64, but we should soon with the on-prem regtesting effort)

We can't use this workflow until we make a PyPI token (with write / upload permission to packages) for the STScI maintainer account. Currently, we use a username and password to PyPI; however, this method will be deprecated at some point in the future in favor of tokens.

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

@zacharyburnett zacharyburnett self-assigned this Sep 19, 2023
@zacharyburnett zacharyburnett changed the title use OpenAstronomy PyPI action use PyPI upload workflow from OpenAstronomy Sep 19, 2023
@github-actions github-actions bot added the automation Continuous Integration (CI) and testing automation tools label Sep 19, 2023
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f13f8f5) 75.94% compared to head (d523bb6) 75.94%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7912   +/-   ##
=======================================
  Coverage   75.94%   75.94%           
=======================================
  Files         460      460           
  Lines       37629    37629           
=======================================
  Hits        28577    28577           
  Misses       9052     9052           
Flag Coverage Δ *Carryforward flag
nightly 77.37% <ø> (ø) Carriedforward from f13f8f5

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zacharyburnett
Copy link
Collaborator Author

The following error occurred while building:
https://github.com/spacetelescope/jwst/actions/runs/6262235017/job/17003963430#step:7:703

                  Optimized (vendor) Blas libraries are not found.
                  Falls back to netlib Blas library which has worse performance.
                  A better performance should be easily gained by switching
                  Blas library.
                if self._calc_info(blas):
              /tmp/pip-install-x3ogdb8y/numpy_88331d5ab39a42d0ade0340a4d4d111e/numpy/distutils/system_info.py:1914: UserWarning:
                  Blas (http://www.netlib.org/blas/) libraries not found.
                  Directories to search for the libraries can be specified in the
                  numpy/distutils/site.cfg file (section [blas]) or by setting
                  the BLAS environment variable.

@zacharyburnett zacharyburnett marked this pull request as ready for review September 22, 2023 14:08
@zacharyburnett zacharyburnett requested a review from a team as a code owner September 22, 2023 14:08
@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Sep 22, 2023

specifying CPython in the build targets fixed the issue

@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Nov 17, 2023

the source distribution issue in the OpenAstronomy workflow is now resolved (see OpenAstronomy/github-actions-workflows#169); I see no other blockers for merging

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still no Windows support? Didn't someone fixed it being broken on Windows at some point? Is it broken again?

.github/workflows/build.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if this is a high traffic repo and building the wheels is resource intensive, should consider only building them when a special label is applied for pull requests. Probably also wise to auto-cancel duplicate builds. See astropy on how this is done in production.

.github/workflows/build.yml Show resolved Hide resolved
Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left what comments I can. Someone from your team should approve.

I think this fixes #8054 . Thanks!

@nden
Copy link
Collaborator

nden commented Dec 5, 2023

Is the dev job fixed in a different PR?
Changes look good. I'm OK with merging as is and fixing the dev tests in another PR if that's what @zacharyburnett prefers.

@pllim
Copy link
Contributor

pllim commented Dec 5, 2023

Re: devdeps -- You need pyerfa-dev, see:

But even with that, I don't think you can resolve the numpy ABI failure. You have a lot of dependencies that build their own C-extensions. Anything that builds their own need to be built with numpy 2.0 to work with numpy 2.0 (drizzle, spherical-geometry, scikit-image, etc). NumPy claims that stuff built with numpy 2.0 would be backward compatible with 1.x (up to a point).

And if you have your own C-extensions, you might also run into compatibility issues in your own build after you resolve the dependencies, so be on the lookout for that.

I know that scikit-image is still struggle to provide a dev wheel that is compatible with numpy 2.0, please follow:

tl;dr -- You probably can merge this as-is and deal with devdeps later because it is going to be painful.

@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Dec 5, 2023

Ok, when the tests pass I will merge this as-is then, and work on #7910 and #6847

Copy link
Collaborator

@nden nden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving - given that dev builds are going to be handled in a different PR.

@zacharyburnett zacharyburnett merged commit 00110b3 into spacetelescope:master Dec 5, 2023
29 of 30 checks passed
@zacharyburnett zacharyburnett deleted the ci/openastronomy branch December 5, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Continuous Integration (CI) and testing automation tools no-changelog-entry-needed testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moar release wheels
3 participants