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

python3Packages.numpy: add hypothesis to checkInputs #94989

Merged
merged 1 commit into from Aug 15, 2020

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Aug 9, 2020

Motivation for this change

numpy has added hypothesis as a dependency for running property-based
tests:

numpy/numpy#15189

However, hypothesis is not an input of the derivations. And thus tests
have been failing with:

ERROR .. - ModuleNotFoundError: No module named 'hypothesis'

https://hydra.nixos.org/build/124613306/nixlog/1

This change adds hypothesis to checkInputs, so that tests are run
again.

I guess a separate issue is that the build should probably fail when tests fail?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member

FRidh commented Aug 9, 2020

I don't know whether we should run hypothesis tests in Nixpkgs. Hypothesis tests are by itself very useful, but typically take up quite some more time and we have to consider resources in Nixpkgs. Tests in Nixpkgs are mostly to see that "are things still working" after packaging.

Being complete dependencies-wise is a good thing though. Note that hypothesis tests can easily be disabled with pytest -m "not hypothesis". So, let's see how it turns out.

@danieldk
Copy link
Contributor Author

danieldk commented Aug 9, 2020

I don't know whether we should run hypothesis tests in Nixpkgs. Hypothesis tests are by itself very useful, but typically take up quite some more time and we have to consider resources in Nixpkgs. Tests in Nixpkgs are mostly to see that "are things still working" after packaging.

Being complete dependencies-wise is a good thing though. Note that hypothesis tests can easily be disabled with pytest -m "not hypothesis". So, let's see how it turns out.

I see, thanks! The tests do run pretty fast on my machine though (74s on a Ryzen 3700X), didn't check what portion are hypothesis-based tests.

@danieldk
Copy link
Contributor Author

danieldk commented Aug 9, 2020

@ofborg build python2Packages.numpy python37Packages.numpy python38Packages.numpy

numpy has added hypothesis as a dependency for running property-based
tests:

numpy/numpy#15189

However, hypothesis is not an input of the derivations. And thus tests
have been failing with:

ERROR .. - ModuleNotFoundError: No module named 'hypothesis'

https://hydra.nixos.org/build/124613306/nixlog/1

This change adds hypothesis to checkInputs, so that tests are run
again.
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM, the numpy test suite already takes a bit, i don't think this will add too much

@FRidh FRidh merged commit 22089bf into NixOS:staging Aug 15, 2020
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.

None yet

3 participants