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.starfish: init at 0.1.3 #64692

Merged
merged 8 commits into from Jul 16, 2019

Conversation

costrouc
Copy link
Member

Motivation for this change

Great scipy talk and wanted to package starfish.

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 nix-review --run "nix-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.

@costrouc costrouc requested a review from FRidh as a code owner July 13, 2019 03:46
@costrouc
Copy link
Member Author

Result of nix-review 1

15 package were build:
  • python27Packages.asciitree
  • python27Packages.diskcache
  • python27Packages.regional
  • python27Packages.showit
  • python27Packages.slicedimage
  • python27Packages.trackpy
  • python27Packages.validators
  • python37Packages.asciitree
  • python37Packages.diskcache
  • python37Packages.regional
  • python37Packages.showit
  • python37Packages.slicedimage
  • python37Packages.starfish
  • python37Packages.trackpy
  • python37Packages.validators

@costrouc
Copy link
Member Author

Result of nix-review pr 64692 1

15 package were build:
  • python27Packages.asciitree
  • python27Packages.diskcache
  • python27Packages.regional
  • python27Packages.showit
  • python27Packages.slicedimage
  • python27Packages.trackpy
  • python27Packages.validators
  • python37Packages.asciitree
  • python37Packages.diskcache
  • python37Packages.regional
  • python37Packages.showit
  • python37Packages.slicedimage
  • python37Packages.starfish
  • python37Packages.trackpy
  • python37Packages.validators

@risicle
Copy link
Contributor

risicle commented Jul 13, 2019

To get python27Packages.trackpy's tests passing on darwin:

  checkPhase = stdenv.lib.optionalString stdenv.isDarwin ''
    export HOME=$(mktemp -d)
    mkdir -p $HOME/.matplotlib
    echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
  '' + ''
    pytest tra...

Note I often tend to take stdenv as an argument because it not only removes the need for .lib, but also gives you useful things I often need like platform tests.

(TBH it might be worth taking the condition out of that and just doing it for all platforms as it will remove the risk of any platform attempting to e.g. open an X server)

Copy link
Contributor

@risicle risicle left a comment

Choose a reason for hiding this comment

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

Given the above fix, nox-review is happy for me on non-nixos linux x86_64 and macos 10.13.

Great work on the tests 👍

@costrouc
Copy link
Member Author

costrouc commented Jul 13, 2019

@risicle your requested change has been made.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

Quick little review, forgot to request changes. See above comments

@costrouc
Copy link
Member Author

    # specifically needed for darwin
    export HOME=$(mktemp -d)
    mkdir -p $HOME/.matplotlib
    echo "backend: ps" > $HOME/.matplotlib/matplotlibrc

@worldofpeace this is needed for the darwin compatibility. Should I do an if stdenv.isdarwin then ... else ... instead of putting it together?

@worldofpeace
Copy link
Contributor

    # specifically needed for darwin
    export HOME=$(mktemp -d)
    mkdir -p $HOME/.matplotlib
    echo "backend: ps" > $HOME/.matplotlib/matplotlibrc

@worldofpeace this is needed for the darwin compatibility. Should I do an if stdenv.isdarwin then ... else ... instead of putting it together?

Yeah or even wrap it with

${lib.optionalString (stdenv.isDarwin) ''
  
''}

inside the checkPhase.

@costrouc
Copy link
Member Author

@worldofpeace changes have been made and it builds locally for me.

@costrouc
Copy link
Member Author

Result of nix-review pr 64692 1

15 package were build:
  • python27Packages.asciitree
  • python27Packages.diskcache
  • python27Packages.regional
  • python27Packages.showit
  • python27Packages.slicedimage
  • python27Packages.trackpy
  • python27Packages.validators
  • python37Packages.asciitree
  • python37Packages.diskcache
  • python37Packages.regional
  • python37Packages.showit
  • python37Packages.slicedimage
  • python37Packages.starfish
  • python37Packages.trackpy
  • python37Packages.validators

@costrouc
Copy link
Member Author

Ready for merge

@worldofpeace worldofpeace merged commit 568395c into NixOS:master Jul 16, 2019
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