Skip to content

Include a limited API build in CI, disabling incompatible extensions - #18236

Merged
astrofrog merged 9 commits into
astropy:mainfrom
astrofrog:py-limited-api-build
Jun 9, 2025
Merged

astrofrog merged 9 commits into
astropy:mainfrom
astrofrog:py-limited-api-build

Conversation

@astrofrog

Copy link
Copy Markdown
Member

This adds a simple CI job which checks whether building against the limited API works. This is a very fast job that does not run the tests, so I have included it in the main CI. This is to avoid having to enable all the time consuming CI anytime someone wants to fix something related to the limited API.

Here I make use of the newly released extension-helpers 1.4.0 which includes the ability to opt in to limited API builds via an environment variable.

The idea is that @neutrinoceros could in his PRs remove the removal of the extensions he is fixing.

This PR is a much simple alternative to #18211

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@github-actions

github-actions Bot commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@neutrinoceros neutrinoceros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

did you forget to set the env var ?

Comment thread .github/workflows/ci_workflows.yml Outdated
Comment thread astropy/io/fits/hdu/compressed/src/compression.c
Comment thread .github/workflows/ci_workflows.yml
Comment thread astropy/io/votable/src/tablewriter.c
Comment thread .github/workflows/ci_workflows.yml Outdated
@astrofrog

Copy link
Copy Markdown
Member Author

@neutrinoceros - thanks for the review! I was setting the env var but globally. It's now done just for the build step as you suggested. This is ready for another review.

@astrofrog
astrofrog requested a review from neutrinoceros June 9, 2025 13:23
Comment thread .github/workflows/ci_workflows.yml Outdated

@neutrinoceros neutrinoceros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Apart from this one last nit, LGTM !

Co-authored-by: Clément Robert <[email protected]>
@astrofrog
astrofrog enabled auto-merge June 9, 2025 13:38
@astrofrog
astrofrog merged commit 4f0eb85 into astropy:main Jun 9, 2025
- cp311-manylinux_x86_64


test_limited_api_build:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this allowed to fail or not? If not, I will have to add it to branch protection. Please advise. Thanks!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No it is not allowed to fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants