Skip to content

MAINT: remove hypothesis from testing - #90

Open
andyfaff wants to merge 2 commits into
numpy:mainfrom
andyfaff:hyp
Open

andyfaff wants to merge 2 commits into
numpy:mainfrom
andyfaff:hyp

Conversation

@andyfaff

Copy link
Copy Markdown
Member
  • updated pyproject.toml via sync_dependency_groups
  • updates uv.lock via upgrade_lock.sh

- updated pyproject.toml via sync_dependency_groups
- updates uv.lock via upgrade_lock.sh

@rgommers rgommers 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.

This needs a tweak in cibw_before_test.sh, to fix one Pyodide job failing with:

error: Group `hypothesis` is not defined in the project's `dependency-groups` table

Other changes LGTM (I didn't check the lock file diff in detail yet).

@rgommers rgommers 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.

Actually, on closer inspection, I still found hypothesis in the lock file, which in turn led me to the test group which is still used for most jobs. So effectively, this PR in its current form only removes hypothesis from the 3.14 Emscripten job.

We can still merge this PR as is with a title tweak, or expand the scope. I think what we really want is minimal test dependencies, meaning test-core plus a subset of test. I think the part from test that is essential is to test compiled extensions - meaning we need ninja/meson/Cython. Everything else is best removed: packages like pytest-cov, charset-normalizer, numpy_quaddtype and hypothesis add essentially no value and are just a maintenance and supply chain worry that we don't need.

We do need two dependency groups:

  1. test-core for the platforms that cannot test compiled extensions
  2. test for the other platforms

We can arrange it like that in tools/sync_dependency_groups.py with exclusions, or we can add a new dependency group test-extensions in numpy/numpy. I'm inclined to do the latter. WDYT @andyfaff?

@andyfaff

Copy link
Copy Markdown
Member Author

When I ported everything to use groups I was trying to keep the same layout as before.

For me it makes sense to remove charset-normalizer, pytest-cov, numpy_quaddtype from test-extending. I don't know where they fit then. Do they then fit into the test group, or a test-extra? I'm not a fan of excluding things in configurations.

@rgommers

Copy link
Copy Markdown
Member

I agree, they fit in the test group but not in test-extending.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants