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

pythonPackages.imgaug: init at 0.2.6 #43720

Merged
merged 1 commit into from Aug 3, 2018
Merged

Conversation

CMCDragonkai
Copy link
Member

@CMCDragonkai CMCDragonkai commented Jul 18, 2018

Motivation for this change

Added pythonPackages.imgaug. Should work on python 3.6 and python 2.

One thing I didn't understand is why nix_run_setup test would result in a segmentation fault. The current imgaug.tar.gz does not bundle any tests in the source archive so there are no tests to run anyway. But can there be a better error than just segmentation fault?

Also while imgaug doesn't require dask, the scikit-image when installed by setup.py appears to require dask now.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@CMCDragonkai CMCDragonkai requested a review from FRidh as a code owner July 18, 2018 06:02
@FRidh
Copy link
Member

FRidh commented Jul 18, 2018

One thing I didn't understand is why nix_run_setup test would result in a segmentation fault. The current imgaug.tar.gz does not bundle any tests in the source archive so there are no tests to run anyway. But can there be a better error than just segmentation fault?

Looks like a regression in Python 3 (maybe setuptools) since it does not happen with Python 2 and the Nixpkgs code is exactly the same for both.

dask
];

doCheck = false;
Copy link
Member

Choose a reason for hiding this comment

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

Include the motivation for disabling tests as a comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is due to segmentation fault. And there being no tests?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but you can't know that when looking at the expression.

meta = with stdenv.lib; {
homepage = https://github.com/aleju/imgaug;
description = "Image augmentation for machine learning experiments";
license = licenses.mit;
Copy link
Member

Choose a reason for hiding this comment

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

maintainership

Copy link
Member Author

Choose a reason for hiding this comment

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

This is done!

@CMCDragonkai
Copy link
Member Author

CMCDragonkai commented Jul 18, 2018

Added everything. Except reason for no tests.

@CMCDragonkai
Copy link
Member Author

Added the comment about the segmentation fault for the test.

@CMCDragonkai
Copy link
Member Author

I've moved dask to buildInputs instead of propagatedBuildInputs here as well.

@CMCDragonkai
Copy link
Member Author

Regarding dask: #43723 (comment)

sha256 = "1wy8ydkqq0jrwxwdv04q89n3gwsr9pjaspsbw26ipg5a5lnhb9c2";
};

buildInputs = [ dask ];
Copy link
Member

Choose a reason for hiding this comment

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

as I mentioned in another PR, this needs to be removed

@CMCDragonkai
Copy link
Member Author

@FRidh Just did it.

@CMCDragonkai
Copy link
Member Author

@FRidh Is this ready to be merged?

@dotlambda
Copy link
Member

@CMCDragonkai There's a merge conflict. Please resolve that.

@GrahamcOfBorg build python2.pkgs.imgaug python3.pkgs.imgaug

six
];

# disable tests due to python 3 segmentation fault
Copy link
Member

Choose a reason for hiding this comment

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

If there are no tests, that's what the comment should say.

Copy link
Member Author

Choose a reason for hiding this comment

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

@dotlambda imgaug has tests, it just doesn't work due to python 3 segmentation fault. #43720 (comment)

Copy link
Member

@dotlambda dotlambda Aug 2, 2018

Choose a reason for hiding this comment

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

The current imgaug.tar.gz does not bundle any tests in the source archive so there are no tests to run anyway.

If I understand it correctly, there are tests but not in the tarball. The comment could read something like No tests in PyPI tarball.
The segfault likely happens because the tests are missing.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Merge failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

Merge failed

@CMCDragonkai
Copy link
Member Author

@dotlambda Merge conflicts resolved by rebasing PR on master.

@CMCDragonkai
Copy link
Member Author

@dotlambda Comment changed.

@dotlambda
Copy link
Member

@GrahamcOfBorg eval
@GrahamcOfBorg build python2.pkgs.imgaug python3.pkgs.imgaug

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.imgaug, python3.pkgs.imgaug

Partial log (click to expand)

Successfully installed imgaug-0.2.6
/build/imgaug-0.2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/fx958h5000w6whs85rzpwhhlpcqs4icf-python3.6-imgaug-0.2.6
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/fx958h5000w6whs85rzpwhhlpcqs4icf-python3.6-imgaug-0.2.6/lib
patching script interpreter paths in /nix/store/fx958h5000w6whs85rzpwhhlpcqs4icf-python3.6-imgaug-0.2.6
checking for references to /build in /nix/store/fx958h5000w6whs85rzpwhhlpcqs4icf-python3.6-imgaug-0.2.6...
/nix/store/0phyzwsr7wb2kaf1c7714qw8rgs4mcsw-python2.7-imgaug-0.2.6
/nix/store/fx958h5000w6whs85rzpwhhlpcqs4icf-python3.6-imgaug-0.2.6

@dotlambda dotlambda merged commit 83cc1e3 into NixOS:master Aug 3, 2018
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python2.pkgs.imgaug, python3.pkgs.imgaug

Partial log (click to expand)

    return self._engine.get_loc(key)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
 5 failed, 16889 passed, 1036 skipped, 11894 deselected, 37 xfailed, 2 xpassed, 6 warnings in 1520.07 seconds
builder for '/nix/store/v9g5l67xxd9vna2qljywd6kzkyihzkd7-python3.6-pandas-0.23.3.drv' failed with exit code 1
cannot build derivation '/nix/store/f4h17md0advik19jayq3izawhipgyc2i-python3.6-partd-0.3.8.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/iw12nkmh5n4r9klsqyd5z96aqn10z86x-python3.6-dask-0.18.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/6lzmz31fhxwdiysm7dza8h25691whp77-python3.6-scikit-image-0.14.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/g9iabmwclxy7lsn7c9h2i186aibznyv7-python3.6-imgaug-0.2.6.drv': 1 dependencies couldn't be built
error: build of '/nix/store/5bi6ca2gbwal42k2rahnl86611q89lpn-python2.7-imgaug-0.2.6.drv', '/nix/store/g9iabmwclxy7lsn7c9h2i186aibznyv7-python3.6-imgaug-0.2.6.drv' failed

@CMCDragonkai CMCDragonkai deleted the imgaug branch August 8, 2018 11:34
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

4 participants