Skip to content

ENH: add a smoke testing mechanism for distro and test-suite-less installs - #33411

Open
rgommers wants to merge 4 commits into
numpy:mainfrom
rgommers:enh-smoke-test
Open

rgommers wants to merge 4 commits into
numpy:mainfrom
rgommers:enh-smoke-test

Conversation

@rgommers

Copy link
Copy Markdown
Member

There are two motivations for adding smoke testing:

  1. It's a prerequisite for separating out the test suite from installed wheels (see Making the numpy test suite separately installable #26289)
  2. It is useful for distro packaging and other use cases where quick checks are needed. It can replace for example this manually maintained list of module names in the conda-forge numpy recipe

The idea is to check (1) imports of all public modules and a set of key extension modules, (2) do some basic functionality tests, one test per module so this is very quick (~1 second).

AI Disclosure

Developed with Codex Terra 6.1. Ideas mine, and all diffs manually polished.

The try-except was ugly, and it's better to have this in
`numpy/_core` where it's used. Related to the smoke test
introduction, which must work without `pytest` installed.

@jorenham jorenham left a comment

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.

Nice! Stub changes look fine.

Comment thread numpy/_public_api.py Resolved
This is helpful to test installs where the test suite is left out,
as well as for downstream/distro testing (e.g., see the conda-forge
numpy recipe, which lists many separate modules for import testing
right now - that can now be a one-liner).
@andyfaff

Copy link
Copy Markdown
Member

I've recently been chatting to a linux package maintainer about this kind of thing. There are certainly things we could be doing better to improve their life with regards to how we package and release numpy. Hopefully they can contribute to the conversation here.

@rgommers

Copy link
Copy Markdown
Member Author

That's be very welcome! I think I have a decent sense of distro maintainer wishes (this is probably not near the top, more a nice-to-have), but getting first-hand input is always nice.

This branch has not been deployed

No deployments
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